mrinalblr / socialauth-android

Automatically exported from code.google.com/p/socialauth-android
0 stars 0 forks source link

publishStory #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use adapter.updateStory() when sharing through Facebook

What is the expected output? What do you see instead?
The app should be able to share a message through Facebook, but the app crashes 
due to errors below.

E/AndroidRuntime(2433): FATAL EXCEPTION: main
E/AndroidRuntime(2433): android.os.NetworkOnMainThreadException
E/AndroidRuntime(2433):     at 
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
E/AndroidRuntime(2433):     at 
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLOutputStream.write(Op
enSSLSocketImpl.java:699)
E/AndroidRuntime(2433):     at 
java.io.BufferedOutputStream.flushInternal(BufferedOutputStream.java:185)
E/AndroidRuntime(2433):     at 
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:85)
E/AndroidRuntime(2433):     at 
libcore.net.http.HttpEngine.readResponse(HttpEngine.java:818)
E/AndroidRuntime(2433):     at 
libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:28
3)
E/AndroidRuntime(2433):     at 
libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.jav
a:495)
E/AndroidRuntime(2433):     at 
libcore.net.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.j
ava:134)
E/AndroidRuntime(2433):     at 
org.brickred.socialauth.util.Response.getStatus(Response.java:77)
E/AndroidRuntime(2433):     at 
org.brickred.socialauth.android.SocialAuthAdapter$6$1.run(SocialAuthAdapter.java
:790)
E/AndroidRuntime(2433):     at android.os.Handler.handleCallback(Handler.java:725)
E/AndroidRuntime(2433):     at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(2433):     at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(2433):     at 
android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime(2433):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(2433):     at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(2433):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(2433):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime(2433):     at dalvik.system.NativeStart.main(Native Method)

What version of the product are you using? On what operating system?
socialauth-4.2 and socialauth-android-2.6. Operating System: Android 4.2.2

Please provide any additional information below.

Original issue reported on code.google.com by vineet.a...@3pillarglobal.com on 19 Jul 2013 at 8:27

GoogleCodeExporter commented 8 years ago

Original comment by vineet.a...@3pillarglobal.com on 19 Jul 2013 at 8:27

GoogleCodeExporter commented 8 years ago
Hi,

This issue might be due to trageting new sdk in manifest.
        <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

You can fix it currently 

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy); 

We will fix it in next update.

Original comment by vineet.a...@3pillarglobal.com on 19 Jul 2013 at 8:30

GoogleCodeExporter commented 8 years ago

Original comment by vineet.a...@3pillarglobal.com on 19 Jul 2013 at 8:32

GoogleCodeExporter commented 8 years ago
Hi,

Thanks for the update. I'll test by adding the ThreadPolicy code

And Looking forward on the next update.

Original comment by dizy...@gmail.com on 19 Jul 2013 at 8:47

GoogleCodeExporter commented 8 years ago
We have fixed this issue to be release on Monday.

Original comment by vineet.a...@3pillarglobal.com on 4 Oct 2013 at 12:13