Skip to content

NullPointerException at ContributionsFragment.onAuthCookieAcquire when starting the app after a few hours #3217

@nicolas-raoul

Description

@nicolas-raoul

I have noticed this kind of crashes recently:

  1. Use the app
  2. Do other things
  3. The next day, tap the Commons icon to launch it
  4. Immediate crash
APP_VERSION_CODE=494
APP_VERSION_NAME=2.11.0.494
ANDROID_VERSION=9
PHONE_MODEL=SM-G970F
STACK_TRACE=java.lang.RuntimeException: Unable to start activity ComponentInfo{fr.free.nrw.commons/fr.free.nrw.commons.contributions.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ComponentName android.content.Intent.getComponent()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3107)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3250)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1947)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7032)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.ComponentName android.content.Intent.getComponent()' on a null object reference
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1596)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1752)
at android.app.ContextImpl.bindService(ContextImpl.java:1701)
at android.content.ContextWrapper.bindService(ContextWrapper.java:711)
at fr.free.nrw.commons.contributions.ContributionsFragment.onAuthCookieAcquire

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions