Skip to content

error 'Unable to load class named [io.jsonwebtoken.impl.DefaultJwtParser]' #10

@JunjaK

Description

@JunjaK

Is it a security issue?

May be no...

What happened actually?

Actually, in flutter debug mode, It works well. but when I install my flutter app in my device with release mode of flutter, Gets error like this.

PlatformException(INTERNAL_ERROR, java.io.IOException: org.json.JSONException: Unable to load class named [io.jsonwebtoken.impl.DefaultJwtParser] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
I/flutter (26210):      at c.d.c.c.a.d.a(:2)
I/flutter (26210):      at c.d.c.c.a.a.a.a(:45)
I/flutter (26210):      at c.d.c.c.a.a.a.b(:19)
I/flutter (26210):      at com.linecorp.linesdk.auth.internal.c$a.a(:22)
I/flutter (26210):      at com.linecorp.linesdk.auth.internal.c$a.doInBackground(:1)
I/flutter (26210):      at android.os.AsyncTask$2.call(AsyncTask.java:333)
I/flutter (26210):      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
I/flutter (26210):      at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
I/flutter (26210):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
I/flutter (26210):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
I/flutter (26210):      at java.lang.Thread.run(Thread.java:764)
I/flutter (26210): Caused by: org.json.JSONException: Unable to load class named [io.jsonwebtoken.impl.DefaultJwtParser] from the thread context, current, or system/application ClassLoaders

Authorization menu works well like this.

Screenshot_20191220-160654_LINE

How can I solve this problem??
(I already tried this issue. line/line-sdk-android#7, may be nothing to do with this issue... )

  • my proguard code is
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }
-keep class org.spongycastle.** { *; }
-keep class io.jsonwebtoken.** { *; }
-dontwarn org.spongycastle.**
-dontwarn io.flutter.embedding.**
-dontwarn android.**
-dontwarn com.squareup.picasso.**

Your environment?

in release mode
Android 9.0
Galaxy s10e(SM-G970N)
in debug mode
emulator pixel2 and, 3, Andorid sdk version 28, Window10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions