Unknown socket error -1 (HTTP, Socket, URL, Internet)

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Unknown socket error -1 (HTTP, Socket, URL, Internet)

Postby plusminus » Fri Oct 03, 2008 4:06 am

Hey fellow devs,

if you receive an error like this ( [font=Courier New]unknown socket error -1[/font] ), doing anything with a web-connection. you'll have to add the following Entry to your [font=Courier New]AndroidManifest.xml[/font] directly under the [font=Courier New]<manifest ... />[/font] -node:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <uses-permission android:name="android.permission.INTERNET" />
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


This is how your error might look like:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. 10-01 13:07:00.072: ERROR/OSNetworkSystem(2834): unknown socket error -1
  2. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834): WeatherQueryError
  3. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834): java.net.SocketException: unknown error
  4. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834):     at org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl(Native Method)
  5. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834):     at org.apache.harmony.luni.platform.OSNetworkSystem.createSocket(OSNetworkSystem.java:79)
  6. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834):     at org.apache.harmony.luni.net.PlainSocketImpl2.create(PlainSocketImpl2.java:59)
  7. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834):     at java.net.Socket.checkClosedAndCreate(Socket.java:763)
  8. 10-01 13:07:00.093: ERROR/WeatherForcaster(2834):     at java.net.Socket.connect(Socket.java:910)
  9. ........
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby ninor » Fri Oct 03, 2008 10:14 am

What a weird message if the only mistake is a missing permission...

Thanks!
Image AndDev: Your Android Development Community / Tutorials | Here's my Basic ToolKit
User avatar
ninor
Moderator
Moderator
 
Posts: 180
Joined: Thu Aug 14, 2008 6:30 pm
Location: Barcelona, Spain

Postby anurahim » Wed Oct 15, 2008 7:37 am

Thnx it worked.. may b helpful to many!!!!
anur
anurahim
Junior Developer
Junior Developer
 
Posts: 24
Joined: Fri Jun 27, 2008 11:26 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests