Line sdk 5.8.1 - login issue - crash
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 149
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
## Crash Stack
java.lang.NullPointerException
Attempt to invoke virtual method 'com.linecorp.linesdk.auth.internal.LineAuthenticationStatus$Status com.linecorp.linesdk.auth.internal.LineAuthenticationStatus.getStatus()' on a null object reference
1 com.linecorp.linesdk.auth.internal.LineAuthenticationActivity.onNewIntent(LineAuthenticationActivity.java:119)
2 android.app.Activity.performNewIntent(Activity.java:7977)
3 android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1406)
4 android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1419)
5 android.app.ActivityThread.deliverNewIntents(ActivityThread.java:3752)
6 android.app.ActivityThread.handleNewIntent(ActivityThread.java:3764)
7 android.app.servertransaction.NewIntentItem.execute(NewIntentItem.java:53)
8 android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
9 android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
10 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2239)
11 android.os.Handler.dispatchMessage(Handler.java:107)
12 android.os.Looper.loop(Looper.java:227)
13 android.app.ActivityThread.main(ActivityThread.java:7822)
14 java.lang.reflect.Method.invoke(Native Method)
15 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
16 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
## What happened actually?
In Android developer options - enable do not keep activities, this problem must appear
In com.linecorp.linesdk.auth.internal.LineAuthenticationActivity
Cause by LineAuthenticationStatus.getStatus()' on a null object reference
In this case, the system is in power saving mode and background activities have been terminated
## Your environment?
Line SDK 5.8.1
Android Studio Chipmunk | 2021.2.1 Patch 2
Gradle 7.3.3
AGP 7.2.2
### EndUser Environment
RMX2020
Android 10,level 29
Oppo/COLOROS
arm64-v8a
## App Tracking
0 2023-04-17 20:55:07 com.linecorp.linesdk.auth.internal.LineAuthenticationCallbackActivity onCreated
1 2023-04-17 20:55:08 com.linecorp.linesdk.auth.internal.LineAuthenticationCallbackActivity onCreated
2 2023-04-17 20:55:08 com.linecorp.linesdk.auth.internal.LineAuthenticationActivity onCreated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in com.linecorp.linesdk.auth.internal.LineAuthenticationActivity, especially onNewIntent at line 119, and review how LineAuthenticationStatus is restored when activities are recreated. Reproduce with Android developer options enabled for “do not keep activities” on the reported Android 10 environment. Done means the login flow no longer crashes with a null status in this lifecycle scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100