pstuifzand / micropub-android

Android client for sending micropub posts
GNU General Public License v3.0
15 stars 0 forks source link

Login to commentpara.de: Crash #16

Closed cweiske closed 6 years ago

cweiske commented 6 years ago

When logging into commentpara.de, Wrimini crashes when returning from the browser:

04-23 20:32:21.872 14898 14898 D AndroidRuntime: Shutting down VM
04-23 20:32:21.876 14898 14898 E AndroidRuntime: FATAL EXCEPTION: main
04-23 20:32:21.876 14898 14898 E AndroidRuntime: Process: eu.stuifzand.micropub, PID: 14898
04-23 20:32:21.876 14898 14898 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.stuifzand.micropub/eu.stuifzand.micropub.auth.AuthenticationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2684)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread.-wrap12(ActivityThread.java)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6186)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
04-23 20:32:21.876 14898 14898 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1321)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at okhttp3.HttpUrl.parse(HttpUrl.java:901)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at eu.stuifzand.micropub.auth.AuthenticationActivity.onCreate(AuthenticationActivity.java:53)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:6684)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637)
04-23 20:32:21.876 14898 14898 E AndroidRuntime:    ... 9 more

Steps to reproduce:

  1. Start Wrimini fresh (without existing login)
  2. Input "commentpara.de", click "Sign In"
  3. In the browser, click "Login"
  4. Android jumps from the browser to Wrimini, and a crash dialog pops up asking me if I want to restart.
pstuifzand commented 6 years ago

Have you tried with the latest version from Google Play or GitHub releases. I don't have this problem.

The exception throws because of a missing/not found authorization endpoint.

Perhaps this occured because of a strange combination with #15.

(Originally published at: https://p83.nl/p/607)

cweiske commented 6 years ago

Yes, this happens with the latest release 0.0.11-alpha.

pstuifzand commented 6 years ago

Same problem as #18.

Can you confirm which web browser you are using?

cweiske commented 6 years ago

Version 0.0.14 fixed it for me.

I previously tried logging into Wrimini using the "Lightning" browser (https://f-droid.org/en/packages/acr.browser.lightning/) and IceCat Mobile (https://f-droid.org/packages/org.gnu.icecat/).

At least with Lightning it works now; didn't try Icecat.

Thanks!