wirralsman
|
Posted: February 10, 2012 12:14 by wirralsman
|
|
Encountering this issue with TwitterAPIme 1.8.2 for Android using Android 4.0 when trying to authorise an account: 02-10 12:07:27.662: E/AndroidRuntime(1184): FATAL EXCEPTION: main 02-10 12:07:27.662: E/AndroidRuntime(1184): android.os.NetworkOnMainThreadException 02-10 12:07:27.662: E/AndroidRuntime(1184): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1084) 02-10 12:07:27.662: E/AndroidRuntime(1184): at java.net.InetAddress.lookupHostByName(InetAddress.java:391) 02-10 12:07:27.662: E/AndroidRuntime(1184): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242) 02-10 12:07:27.662: E/AndroidRuntime(1184): at java.net.InetAddress.getAllByName(InetAddress.java:220) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:71) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpConnection.connect(HttpConnection.java:128) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:460) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:432) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:479) 02-10 12:07:27.662: E/AndroidRuntime(1184): at libcore.net.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:133) 02-10 12:07:27.662: E/AndroidRuntime(1184): at impl.android.com.twitterapime.io.HttpConnectionImpl.getResponseCode(HttpConnectionImpl.java:53) 02-10 12:07:27.662: E/AndroidRuntime(1184): at com.twitterapime.io.HttpResponse.<init>(HttpResponse.java:62) 02-10 12:07:27.662: E/AndroidRuntime(1184): at com.twitterapime.io.HttpRequest.send(HttpRequest.java:173) 02-10 12:07:27.662: E/AndroidRuntime(1184): at com.twitterapime.xauth.ui.OAuthDialogWrapper.trackUrl(OAuthDialogWrapper.java:437) 02-10 12:07:27.662: E/AndroidRuntime(1184): at impl.android.com.twitterapime.xauth.ui.WebViewOAuthDialogWrapper.access$100(WebViewOAuthDialogWrapper.java:39) 02-10 12:07:27.662: E/AndroidRuntime(1184): at impl.android.com.twitterapime.xauth.ui.WebViewOAuthDialogWrapper$WebViewClientOAuth.onPageStarted(WebViewOAuthDialogWrapper.java:139) 02-10 12:07:27.662: E/AndroidRuntime(1184): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:267) 02-10 12:07:27.662: E/AndroidRuntime(1184): at android.os.Handler.dispatchMessage(Handler.java:99) 02-10 12:07:27.662: E/AndroidRuntime(1184): at android.os.Looper.loop(Looper.java:137) 02-10 12:07:27.662: E/AndroidRuntime(1184): at android.app.ActivityThread.main(ActivityThread.java:4340) 02-10 12:07:27.662: E/AndroidRuntime(1184): at java.lang.reflect.Method.invokeNative(Native Method) 02-10 12:07:27.662: E/AndroidRuntime(1184): at java.lang.reflect.Method.invoke(Method.java:511) 02-10 12:07:27.662: E/AndroidRuntime(1184): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 02-10 12:07:27.662: E/AndroidRuntime(1184): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 02-10 12:07:27.662: E/AndroidRuntime(1184): at dalvik.system.NativeStart.main(Native Method) |
android.os.NetworkOnMainThreadException in Android 4.0
Replies: 3 - Last Post: March 12, 2012 19:13
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior
showing 1 - 4 of 4
Ernandes Mourao Junior
|
Posted: February 27, 2012 12:08 by Ernandes Mourao Junior
|
|
So far we have identified a likely cause of this error. Find below an e-mail that a developer sent to me last week: "(...)I have one concern with the API though, on Android 4.0 when using the webview for the oauth login there is a NetworkOnMainThread exception, this is because on 4.0 network calls must be made in either an ASyncTask or called through a Handler on 4.0. (...)" I wish to work on it soon. On the other hand, as usual, if anybody has already the solution for that, please send to me. Regards, Support this project: Donate now! |
Ernandes Mourao Junior
|
Posted: March 06, 2012 12:29 by Ernandes Mourao Junior
|
|
I have now a fix for this issue. Is anybody up to perform some tests to make sure this issue is really fixed for your app? If so, send me an email: support@twitterapime.com Thanks in advance. Regards, Support this project: Donate now! |
Ernandes Mourao Junior
|
Posted: March 12, 2012 19:13 by Ernandes Mourao Junior
|
|
Nobody is up to perform this test? Support this project: Donate now! |
Replies: 3 - Last Post: March 12, 2012 19:13
by: Ernandes Mourao Junior
by: Ernandes Mourao Junior







