Skip to content

Process recreation causes LINE Login result to be lost (LINE SDK 5.11.0) #192

Description

@kartyjoin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions