Skip to content

fix: prevent crashes when LINE Keystore initialization fails - #227

Open
saseungmin wants to merge 1 commit into
xmartlabs:mainfrom
saseungmin:fix/line-sdk-keystore-crash-fix
Open

saseungmin wants to merge 1 commit into
xmartlabs:mainfrom
saseungmin:fix/line-sdk-keystore-crash-fix

Conversation

@saseungmin

Copy link
Copy Markdown

Prevent Android crashes caused by LINE SDK Keystore failures

🔄 Type of change:

  • ✨Feature/chore
  • ♻️ Refactor
  • 🔧 Bugfixes

✏️ Description:

LINE Android SDK 5.12.0 can crash the host app when Android Keystore key generation fails during background encryptor initialization.

The exception escapes from EncryptorHolder$EncryptorInitializationTask.run():

java.security.ProviderException: Keystore key generation failed
→ StringAesCipher.createAesKey()
→ StringAesCipher.initialize()
→ EncryptorHolder$EncryptorInitializationTask.run()

Upgrade com.linecorp.linesdk:linesdk from 5.12.0 to 5.13.0 to include the upstream crash fix.

The updated SDK catches background initialization exceptions and returns a login error when token persistence fails, allowing the app to handle the failure without crashing.

References:


🎥 Screen record:

Not applicable — native dependency update.


📌 Notes:

  • The existing React Native wrapper already forwards SDK login errors through Promise rejection.
  • An Android native rebuild is required to include the updated SDK.

✔️ Tasks:

  • Upgrade LINE Android SDK to 5.13.0.
  • Verify Gradle selects 5.13.0 in the example app's release runtime dependencies.
  • Build the Android library with :xmartlabs_react-native-line:assembleRelease.
  • Verify the published SDK AAR contains the initialization exception handler.
  • Run TypeScript build, lint, and Prettier checks.

⚠️ Warnings:

  • Physical-device login flows and Keystore failure reproduction have not been tested.

Use LINE Android SDK 5.13.0 to include the upstream exception guards
for background encryptor initialization and login token persistence.

Confidence: high
Scope-risk: narrow
Tested: TypeScript build, lint, Prettier, Android release AAR build, SDK 5.13.0 dependency resolution, published SDK exception guard
Not-tested: Login and Keystore failure reproduction on physical devices
Related: line/line-sdk-android#190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant