Process recreation causes LINE Login result to be lost (LINE SDK 5.11.0)
- Dominant language
- Java
- Stars
- 149
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
# Process recreation causes LINE Login result to be lost (LINE SDK 5.11.0)
## Summary
When integrating LINE Login with the LINE Android SDK (v5.11.0), the login flow fails if the host application's process is killed by the Android system while the user is authenticating in the LINE application.
After the process is recreated, the authentication result is never delivered back to the application, making it impossible to complete the login flow.
---
## Environment
- LINE Android SDK: **5.11.0**
- Login method: App-to-App LINE Login
- Result handling: `onActivityResult()`
- Device:
- **Moto G64y 5G**
- Android 14
- 4 GB RAM
- Reproducibility:
- Frequently reproducible on low-memory devices
---
## Steps to Reproduce
1. Launch LINE Login from the host application.
2. The LINE application is opened for authentication.
3. While the user is interacting with the LINE application, the Android system kills the host application's process because of memory pressure.
4. The user successfully completes authentication in the LINE application.
5. The application is recreated after returning from LINE.
---
## Expected Behavior
Even if the host application's process is killed and recreated during authentication, the login result should still be recoverable, or the SDK should provide an official recovery mechanism to continue the login flow.
---
## Actual Behavior
After process recreation:
- `Application.onCreate()` is executed again.
- A new Activity instance is created.
- The original Activity no longer exists.
- `onActivityResult()` is never invoked.
- `LineLoginResult` cannot be obtained.
- The application cannot determine whether the login succeeded, failed, or was cancelled.
As a result, the login flow becomes unrecoverable.
---
## Investigation
We have confirmed that this issue is caused by **process death**, not Activity recreation.
Specifically:
- The application's PID changes after returning from LINE.
- `Application.onCreate()` is called again.
- The original process no longer exists.
- Android kills the process while the LINE application is in the foreground due to memory pressure.
This is **not** related to the Android Developer Option **"Don't keep activities"**.
---
## Questions
1. Does LINE Android SDK officially support host process recreation during App-to-App login?
2. Is the current behavior expected?
3. Is there an official way to recover the pending login result after process recreation?
4. Is there any recommended implementation pattern for handling this scenario on low-memory devices?
---
## Additional Notes
According to the official documentation, the login result is returned via `onActivityResult()`.
However, when the host process has already been terminated, there is no Activity instance available to receive this callback, resulting in the authentication result being permanently lost.
Could you please advise whether this scenario is supported, or whether there is an alternative recovery mechanism recommended by the SDK?
Thank you.
Contributor guide
Research direction
Start by reviewing the SDK's App-to-App login result handling through onActivityResult(), along with the Application.onCreate() and Activity lifecycle described in the report. Reproduce the process-death scenario on Android 14 and determine whether the SDK exposes any documented recovery path; done requires an agreed implementation or official behavior guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100