Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling LineLoginApi.getLoginIntent getting ActivityNotFoundException #4

Open
JustinLim0318 opened this issue Apr 11, 2017 · 12 comments

Comments

@JustinLim0318
Copy link

SDK Version: 4.0.2
Device Model: Samsung S4
Here is stack trace:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://access.line.me/dialog/oauth/weblogin?response_type=code&client_id=1509810234&state=sn1XUQ99mS0&otpId=7O3NQAgKclnwKUl+ej6/gT8KUd0=&redirect_uri=intent://result#Intent;package=com.gobike.consumer.stg;scheme=lineauth;end pkg=jp.naver.line.android }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1801)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1499)
at android.app.Activity.startActivityForResult(Activity.java:3942)
at android.support.v4.app.ActivityCompatJB.startActivityForResult(ActivityCompatJB.java:26)
at android.support.v4.app.ActivityCompat.startActivityForResult(ActivityCompat.java:146)
at com.linecorp.linesdk.auth.internal.c$c.onPostExecute(SourceFile:1120)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Anyone has idea?

@mrmaakun
Copy link
Contributor

Hi @JustinLim0318

Can you try using the latest version of the LINE SDK (4.0.2)? Some fixes were made to resolve some issues with Android 4.x.

Also, were you able to reproduce this in this starter as it is? I tested the starter on a Galaxy S4 and I didn't see this problem.

@JustinLim0318
Copy link
Author

Hi @mrmaakun

Thanks for the response. Yes im using SDK(4.0.2) the issue has been solved.
There is another issue with the latest sdk.
After logged in using LINE account, it does not redirect back to the app.
I have to manually close the LINE app and redirect back to my app and the response status i get from onActivityResult is 'CANCEL'. Tested using the starter and having the same issue.

@mrmaakun
Copy link
Contributor

@JustinLim0318

We made another update to the SDK that may help resolve this issue. Can you try LINE SDK 4.0.4 to see if it resolves this problem?

@zack-barakat
Copy link

Hi @mrmaakun
We have updated the SDK to the latest release 4.0.4 and we encountered another issue while starting activity for result with the login intent.

here is the code:

Intent loginIntent = LineLoginApi.getLoginIntent(view.getContext(), getContext().getResources().getString(R.string.line_channel_id)); startActivityForResult(loginIntent, LINE_REQUEST_CODE);

and here is the stack trace:

FATAL EXCEPTION: main
Process: com.gobike.consumer.debug, PID: 1527
java.lang.NoSuchMethodError: No static method startActivity(Landroid/app/Activity;Landroid/content/Intent;Landroid/os/Bundle;)V in class Landroid/support/v4/app/ActivityCompat; or its super classes (declaration of 'android.support.v4.app.ActivityCompat' appears in /data/app/com.gobike.consumer.debug-2/split_lib_dependencies_apk.apk:classes56.dex)
at com.linecorp.linesdk.auth.internal.c$c.onPostExecute(SourceFile:1125)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.access$500(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)

@XAVlER-S
Copy link

XAVlER-S commented May 3, 2017

+1

@XAVlER-S
Copy link

XAVlER-S commented May 3, 2017

@mrmaakun Hi, mrmaakun, this problem is caused by Google changing ActivityCompat's API. ActivityCompat#startActivity is removed in the latest version. Will you please upgrade appcompat lib of line sdk and sample to fix this problem? thx :)

@zack-barakat
Copy link

Hi @XavierSAndroid , Thank you for the reply.
I upgraded to the appcompat latest version com.android.support:appcompat-v7:25.3.0, and I still have the same issue. Is it updated already in the latest version of the line sdk?.
Thank you

@XAVlER-S
Copy link

XAVlER-S commented May 4, 2017

@zack-barakat my bad. I should have given this information to developers of this lib : )

@cchitsiang
Copy link

Any expected date for new update?

@mrmaakun
Copy link
Contributor

mrmaakun commented May 8, 2017

Thanks for bringing this issue up. We will look into it and try to have something in the next week or so.

@mrmaakun
Copy link
Contributor

mrmaakun commented Jun 2, 2017

I apologize for the wait. We released LINE SDK for Android version 4.0.5 to the developer center. This version should fix the startActivity problem. Please check it out.

@zack-barakat
Copy link

@mrmaakun Thank you for your response.
will try out the latest SDK and let you know if it has been solved.

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

No branches or pull requests

5 participants