line / line/line-sdk-android

Crash in CreateOpenChatActivity when only using LINE Login (OpenID Connect)

Open
#185 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
149
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Description

I'm only using LINE Login (OpenID Connect) for user authentication —
not any of the OpenChat features.
However, my app crashes immediately with the following exception even though I never use CreateOpenChatActivity or OpenChat API:

```
Caused by java.lang.IllegalArgumentException: channel id is empty
at com.linecorp.linesdk.api.LineApiClientBuilder.(LineApiClientBuilder.java:42)
at com.linecorp.linesdk.openchat.ui.CreateOpenChatActivity$lineApiClient$2.invoke(CreateOpenChatActivity.java:32)
```

This makes it confusing for developers who only integrate LINE Login,
because this metadata is not documented or required anywhere in the LINE Login guide.

Code Example

Here’s the only part of the code where LINE SDK is used in my project:

```
class LineLoginContract : ActivityResultContract() {

override fun createIntent(context: Context, input: Unit): Intent {
val loginIntent = LineLoginApi.getLoginIntent(
context,
BuildConfig.LINE_CHANNEL_ID,
LineAuthenticationParams.Builder()
.scopes(
listOf(
Scope.PROFILE,
Scope.OPENID_CONNECT,
Scope.OC_EMAIL
)
)
.build()
)
return loginIntent
}

override fun parseResult(resultCode: Int, intent: Intent?): LineLoginResult? {
if (intent == null) return null
return LineLoginApi.getLoginResultFromIntent(intent)
}
}
```

As you can see, this only uses the LINE Login API — no reference to OpenChat, LineApiClient, or CreateOpenChatActivity.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CreateOpenChatActivity.java and the LineApiClientBuilder constructor named in the stack trace. Reproduce the crash in an app using only LINE Login, then trace why the OpenChat client is initialized with an empty channel ID. Done means the LINE Login-only configuration no longer crashes while OpenChat behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
authentication, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.