Cookie rejected: Cannot connect to API

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

Cookie rejected: Cannot connect to API

Postby Ashwin.302 » Fri Aug 14, 2009 10:35 pm

Heres my code

try {
URL link = new URL(apiUrl.toString().trim().replaceAll(" ", "%20"));
Log.i(TAG, "-----URL: "+link.toString());
getResponse(link.toString()); /*DISPLAYS THE HTTP RESPONSE ON SCREEN AS DEBUG MESSAGES*/

URLConnection conn = link.openConnection();
conn.connect();
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
// Log.i
Log.i(TAG, "-----RESPONSE START-----");
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
in.close();
Log.i(TAG, "-----RESPONSE END-----");
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

The Logcat output is as follows:

I/DELICIOUS ADApTER SERVICE( 1280): -----URL: https://ashwin_loves_android%20:th
e2009nissangtr@api.del.icio.us/v1/posts/add?url=http://www.google.com/&descripti
on=Google&replace=no
D/InetAddress( 1280): api.del.icio.us: 76.13.6.208 (family 2, proto 6)
D/dalvikvm( 1280): GC freed 10180 objects / 636520 bytes in 165ms
I/dalvikvm( 1280): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 1280): Ljava/lang/IllegalStateException;: Finalizing cursor android.
database.sqlite.SQLiteCursor@430ff730 on bookmarks that has not been deactivated
or closed
I/dalvikvm( 1280): at android.database.sqlite.SQLiteCursor.finalize(SQLiteC
ursor.java:596)
I/dalvikvm( 1280): at dalvik.system.NativeStart.run(Native Method)
D/dalvikvm( 1280): GC freed 8351 objects / 592432 bytes in 216ms
D/dalvikvm( 706): GC freed 111 objects / 6128 bytes in 224ms
D/dalvikvm( 1280): GC freed 9159 objects / 478240 bytes in 148ms
D/OpenSSLSessionImpl( 1280): Freeing OpenSSL session
W/ResponseProcessCookies( 1280): Cookie rejected: "[version: 0][name: delicious_
us_production][value: 0MYX_iTE_WJRglbnXQltmbcAVib9uQ9eKKlGb4iO3.Q7a8n6ymY4p8.P4f
DggPKOhJQHUtYBJLE0b8QhcwLdY_NZCg5jGHuKmMawRibf_owBHCjK4alYXZmkpJnJ4gUFnYjpj2NoXl
upfyK1F.rNL_yT1R_zaXuagaMUK1fBTjtIbNRcyTt3bb72eU4A6yhZaJ3UT_6zIP9v4po64cX3g1i_7o
z6yRMNbG5Mlo5CR6tpE9sh0Unv2uX.8oUTTQTGlwEuxYx3getYGLP9l_ieTsgZD11bvulWVKs1bqnWeO
mnsh771_PgceCofgqISH.YTkVzEyghFrI-][domain: .delicious.com][path: /][expiry: Sat
Aug 14 14:06:13 PDT 2010]". Illegal domain attribute "delicious.com". Domain of
origin: "api.del.icio.us"
I/HTTP GET RESPONSE: ( 1280): org.apache.http.message.BasicHttpResponse@43199800

I/HTTP STREAM CONTENT: ( 1280): org.apache.http.conn.EofSensorInputStream@430cf9
b0
D/dalvikvm( 1280): GC freed 8024 objects / 523520 bytes in 147ms
D/dalvikvm( 1280): GC freed 8921 objects / 826880 bytes in 148ms
I/ActivityManager( 59): Start proc com.tni.TasKiller for broadcast com.tni.Tas
Killer/.TaskBarWidget: pid=1474 uid=10029 gids={}
I/dalvikvm( 1474): Debugger thread not active, ignoring DDM send (t=0x41504e4d l
=38)
I/dalvikvm( 1474): Debugger thread not active, ignoring DDM send (t=0x41504e4d l
=38)
I/ActivityManager( 59): Process android.process.media (pid 1444) has died.
W/System.err( 1280): java.lang.NullPointerException
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.readln(HttpURLConnection.java:1181)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection$ChunkedInputStream.readChunkSize(HttpURLConnection.java:394)

W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection$ChunkedInputStream.<init>(HttpURLConnection.java:346)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.getContentStream(HttpURLConnection.java:1077)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.doRequestInternal(HttpURLConnection.java:1652)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.doRequest(HttpURLConnection.java:1547)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
p.HttpURLConnection.getInputStream(HttpURLConnection.java:1055)
W/System.err( 1280): at org.apache.harmony.luni.internal.net.www.protocol.htt
ps.HttpsURLConnection.getInputStream(HttpsURLConnection.java:257)
W/System.err( 1280): at com.android.angel.delicious.gateway.DeliciousUpdateSe
rvice.processPrimaryUser(DeliciousUpdateService.java:155)
W/System.err( 1280): at com.android.angel.delicious.gateway.DeliciousUpdateSe
rvice.startUpdateService(DeliciousUpdateService.java:72)
W/System.err( 1280): at com.android.angel.delicious.service.DeliciousSyncServ
ice$SyncJob.run(DeliciousSyncService.java:93)
W/System.err( 1280): at com.android.angel.delicious.service.WakeWorkManager.p
rocess(WakeWorkManager.java:65)
W/System.err( 1280): at com.android.angel.delicious.service.WakeWorkManager.a
ccess$0(WakeWorkManager.java:61)
W/System.err( 1280): at com.android.angel.delicious.service.WakeWorkManager$1
.run(WakeWorkManager.java:53)
W/System.err( 1280): at java.lang.Thread.run(Thread.java:1058)
I/ActivityManager( 59): Stopping service: com.android.angel.delicious/.service
.DeliciousSyncService

The null pointer exception is thrown because the connection is null since the cookie gets rejected.
There is also cursor finalize error but that would not cause this error, right ?

what is the reason for the cookie reject responst ?
-Ashwin.
Ashwin.302
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Aug 14, 2009 10:18 pm
Location: San francisco, CA

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 4 guests