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

Failed Build Android (React Native) on LINE SDK 5.0.1, java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver #13

Closed
elmotan95 opened this issue Apr 29, 2019 · 2 comments

Comments

@elmotan95
Copy link

elmotan95 commented Apr 29, 2019

Is it a security issue?

No

What did you expect?

Successfully build (on 4.0.0 success)

What happened actually?

Build failed and i got an error:

java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:309)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
     Caused by: java.lang.NoClassDefFoundError: com.linecorp.linesdk.internal.nwclient.OpenIdSigningKeyResolver
        at com.linecorp.linesdk.internal.nwclient.LineAuthenticationApiClient.<init>(LineAuthenticationApiClient.java:59)
        at com.linecorp.linesdk.internal.nwclient.LineAuthenticationApiClient.<init>(LineAuthenticationApiClient.java:71)
        at com.linecorp.linesdk.api.LineApiClientBuilder.build(LineApiClientBuilder.java:103)
        at com.xmartlabs.lineloginmanager.LineLogin.getLineApiClient(LineLogin.java:115)
        at com.xmartlabs.lineloginmanager.LineLogin.access$200(LineLogin.java:27)
        at com.xmartlabs.lineloginmanager.LineLogin$LogoutTask.doInBackground(LineLogin.java:148)
        at com.xmartlabs.lineloginmanager.LineLogin$LogoutTask.doInBackground(LineLogin.java:145)

Your environment?

LINE SDK version: 5.0.1
React Native: 0.59.3
Android configuration:
buildToolsVersion = "28.0.2"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"

@plateaukao
Copy link
Member

Hi, @elmotan95
Could you provide more information about the build failure? For example, provide a sample with React Native that build fails? Without any context, it's hard to investigate what went wrong for your case. Thanks.

@elmotan95
Copy link
Author

Hello @plateaukao
I already solved the problem. I forgot to check your example code (my bad)
I just need to import mandatory dependencies on Android:

implementation('com.madgag.spongycastle:prov:1.58.0.0') {
    exclude group: 'junit', module: 'junit'
  }
api 'io.jsonwebtoken:jjwt-api:0.10.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.10.5'
runtimeOnly ('io.jsonwebtoken:jjwt-orgjson:0.10.5') {
    exclude group: 'org.json', module: 'json' //provided by Android natively
  }

All good now!

plateaukao pushed a commit to plateaukao/line-sdk-android that referenced this issue Oct 21, 2019
* NO-ISSUE Internal repo master branch rebase open source repo master branch (line#12)

* support "amr" in id_token

* new feature: add a new param to set the login pages language (line#16)

* Fix English (line#20)

Fixed some grammar and style issues in comments.

* update version to 5.1

* config travis build (line#24)

* IMPROVE: get expected `IdToken.Issuer` from OpenId Discovery Document (line#26)

* LINESDK-198 Move send message dialog to internal page

* LINESDK-198 Limit scopes for sharing message to only for internal usage
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

2 participants