errorCode='NOT_DEFINED
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 149
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
I'm not sure the reason for this error:
LineLoginResult{responseCode=CANCEL, nonce='null', lineProfile=null, lineIdToken=null, friendshipStatusChanged=null, lineCredential=null, errorData=LineApiError{httpResponseCode=-1, message='', errorCode='NOT_DEFINED'}}
`class TestActivityForLine : AppUpdateActivity() {
private lateinit var binding: ActivityTestForLineBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityTestForLineBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.button.setOnClickListener {
try {
val loginIntent = LineLoginApi.getLoginIntent(
this@TestActivityForLine,
LINE_CHANNEL_ID,
LineAuthenticationParams.Builder()
.scopes(listOf(Scope.PROFILE))
.build()
)
startActivityForResult(loginIntent, REQUEST_CODE_LINE_LOGIN)
} catch (e: Exception) {
Logger.e("line login error: ${e.message}")
}
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == LoginModule.REQUEST_CODE_LINE_LOGIN) {
val result = LineLoginApi.getLoginResultFromIntent(data)
Logger.e("line result: ${result}")
Logger.e("line reponseCode: ${result.responseCode}")
Logger.e("line resultCode: ${resultCode}")
when (result.responseCode) {
LineApiResponseCode.SUCCESS -> {
// Login successful
val transitionIntent = Intent(
this,
LauncherActivity::class.java
)
transitionIntent.putExtra("line_profile", result.lineProfile)
transitionIntent.putExtra("line_credential", result.lineCredential)
startActivity(transitionIntent)
}
LineApiResponseCode.CANCEL -> CustomSnackbar.error(this, result.errorData.toString(), Snackbar.LENGTH_LONG)
else -> {
CustomSnackbar.error(this, result.errorData.toString(), Snackbar.LENGTH_LONG)
}
}
}
}
companion object {
const val REQUEST_CODE_LINE_LOGIN = 1
private const val LINE_CHANNEL_ID = "mychannelID"
}
}`
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 with the LineLoginApi.getLoginIntent and LineLoginApi.getLoginResultFromIntent calls shown in the issue, then trace how the CANCEL response and LineApiError values are produced. Done means identifying the cause of the NOT_DEFINED error and documenting or correcting the relevant login behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100