1

I have an Android app with Dropbox support. Lately I've started getting an exception for some users. I can not reproduce it. It affects just a few users. The exception happens when Dropbox tries to access /sdk-version.txt which is one of their resources. On Android Studio I can see the resource is there, here is a screenshot:

enter image description here

And like I said, it doesn't happen for me or for most of my users. If I use apktool on my apk, the sdk-version.txt file shows up on a folder called unknown. I see a lot of other files there but most have a package, this one doesn't. Not sure if that matters.

I also have this line on my gradle file multiDexKeepFile file('multidex-config.txt') and in there I have:

com.dropbox.core.DbxRequestUtil
com.dropbox.core.http.HttpRequestor
com.dropbox.core.DbxSdkVersion

Those were all attempts at fixing this but it didn't help.

So far the exception has happened on Android 5 and 6 across multiple manufacturers. This is the exception:

Fatal Exception: java.lang.ExceptionInInitializerError
       at com.dropbox.core.DbxRequestUtil.buildUserAgentHeader(DbxRequestUtil.java:151)
       at com.dropbox.core.DbxRequestUtil.addUserAgentHeader(DbxRequestUtil.java:136)
       at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:233)
       at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:107)
       at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:284)
       at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:102)
       at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
       at mypackage.UserDropbox.(UserDropbox.java)
       at mypackage.DropboxHelper$1.run(DropboxHelper.java)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:81smiling face with sunglasses
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.jar.JarVerifier.removeMetaEntries()' on a null object reference
       at java.util.jar.JarFile.getInputStream(JarFile.java:381)
       at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
       at java.net.URL.openStream(URL.java:470)
       at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
       at java.lang.Class.getResourceAsStream(Class.java:1412)
       at com.dropbox.core.DbxSdkVersion.loadLineFromResource(DbxSdkVersion.java:34)
       at com.dropbox.core.DbxSdkVersion.loadVersion(DbxSdkVersion.java:56)
       at com.dropbox.core.DbxSdkVersion.(DbxSdkVersion.java)
       at com.dropbox.core.DbxRequestUtil.buildUserAgentHeader(DbxRequestUtil.java:151)
       at com.dropbox.core.DbxRequestUtil.addUserAgentHeader(DbxRequestUtil.java:136)
       at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:233)
       at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:107)
       at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:284)
       at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:102)
       at com.dropbox.core.v2.users.DbxUserUsersRequests.getCurrentAccount(DbxUserUsersRequests.java:120)
       at mypackage.UserDropbox.(UserDropbox.java)
2

1 Answer 1

1

This isn't a direct solution.

You can integrate fabric clashlytics into your app to get a full report on the cause of the exception and information on the type and OS of devices experiencing the Exception.

1
  • That is how I'm getting the crash report. I haven't really seen a pattern on devices reporting it. I have it on Android 5 and 6, Motorola and Samsung but I only have this in beta so I have very few reports.
    – casolorz
    Commented Dec 6, 2017 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.