-
Notifications
You must be signed in to change notification settings - Fork 21
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
NoClassDefFoundError in com.filestack.internal.Networking #80
Comments
Just tested with an older version of OKHTTP (3.9.0) and still have the same issue. |
Hey @jgadsby, do you use Filestack SDK inside of a
I see that there is some issue with acquiring the SDK version from system resources. This is not really necessary for us to do and it might be the cause of the problem. I don't really think that the OkHttp version has anything to do with it (fortunately :)) |
So, I tried 0.8.2 and the exception seems to disappear, but there's still something going wrong - when I place a log statement right after the client is created, the log statement is never called.
|
Anyway, it doesn't matter right now as I'm unable to get the response via the library (see the other issue - #81). A slightly unrelated question: When I try to upload a file via the FileStack API and OKHTTP directly, I always get 'unexpected end of stream'. Any idea why? Some more details: Part of the code for the image + filestack endpoint:
|
Never mind - I figured out the OKHTTP upload issue. I needed to provide the following to my OkHttpClient.Builder:
|
Does this issue still exists? |
Yep! |
This is in an Android app running in debug (i.e. no proguard/obfuscation). The client is unable to initialize. Here's the stacktrace:
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread. at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.NoClassDefFoundError: com.filestack.internal.Networking at com.filestack.internal.Networking.getCdnService(Networking.java:87) at com.filestack.Client.<init>(Client.java:48) at com.myapp.app.support.DatabaseArchiver$uploadArchive$1.call(DatabaseArchiver.kt:172) at com.myapp.app.support.DatabaseArchiver$uploadArchive$1.call(DatabaseArchiver.kt:47) at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:48) at rx.internal.operators.OnSubscribeFromCallable.call(OnSubscribeFromCallable.java:33) at rx.Observable.unsafeSubscribe(Observable.java:10150) at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94) at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:228) at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.ExceptionInInitializerError at com.filestack.internal.Networking.getCdnService(Networking.java:87) at com.filestack.Client.<init>(Client.java:48) at com.myapp.api.sync.SyncService$SyncAdapter.onPerformSync(SyncService.java:153) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:321) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.InputStream java.lang.ClassLoader.getResourceAsStream(java.lang.String)' on a null object reference at com.filestack.internal.Util.getVersion(Util.java:30) at com.filestack.internal.HeaderInterceptor.<init>(HeaderInterceptor.java:22) at com.filestack.internal.Networking.buildOkHtttpClient(Networking.java:33) at com.filestack.internal.Networking.<clinit>(Networking.java:29) at com.filestack.internal.Networking.getCdnService(Networking.java:87) at com.filestack.Client.<init>(Client.java:48) at com.myapp.api.sync.SyncService$SyncAdapter.onPerformSync(SyncService.java:153) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:321)
I'm using OKHTTP 3.11.0 currently - could this be why?
The text was updated successfully, but these errors were encountered: