line / line-sdk-android

LINE SDK for Android lets you integrate LINE into your Android app to create a more engaging experience for your users.
https://developers.line.biz/en/docs/android-sdk/
Apache License 2.0
134 stars 45 forks source link

Crash in com.linecorp.linesdk.auth.internal.LineAuthenticationController$RequestTokenRequestTask.onPostExecute #120

Closed gongshoudao closed 1 year ago

gongshoudao commented 2 years ago

Fatal Exception: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW dat=https://access.line.me/... cmp=com.mxtech.videoplayer.ad/com.mxtech.videoplayer.ActivityWebBrowser (has extras) } from ProcessRecord{471705a 31272:chat.meme.inke/u0a244} (pid=31272, uid=10244) not exported from uid 10225 at android.os.Parcel.createExceptionOrNull(Parcel.java:2373) at android.os.Parcel.createException(Parcel.java:2357) at android.os.Parcel.readException(Parcel.java:2340) at android.os.Parcel.readException(Parcel.java:2282) at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3696) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1723) at android.app.Activity.startActivityForResult(Activity.java:5437) at com.linecorp.linesdk.auth.internal.LineAuthenticationController$RequestTokenRequestTask.onPostExecute(LineAuthenticationController.java:1146) at android.os.AsyncTask.finish(AsyncTask.java:771) at android.os.AsyncTask.access$900(AsyncTask.java:199) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7977) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:948)

anh-ht commented 1 year ago

@gongshoudao Do you have any way to solve this bug? I'm also facing the same bug.

plateaukao commented 1 year ago

Hi, @gongshoudao , @anh-ht Could you provide more information about in what condition this error happens?

It seems that LINE SDK tries to provide the login web screen by asking system to use a web browser to do so. But the browser is not somewhat a real browser.

plateaukao commented 1 year ago

cmp=com.mxtech.videoplayer.ad/com.mxtech.videoplayer.ActivityWebBrowser

Please make sure there's a valid browser on the device you're developing. Currently, LINE-SDK does not support platforms like Android TV, nor Android Watch, since there's no normal browser on them yet.