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

UnsupportedOperationException at com.adjust.sdk.Util.dateFormat(Util.java:88) in Android OS 5.x #215

Closed
maherhanafi opened this issue Aug 17, 2016 · 7 comments

Comments

@maherhanafi
Copy link

Hi,

We use the Android Adjust SDK 4.7.0 in our app and we noticed a crash on Android 5.x devices.
Here is the stack trace.

Thanks
Maher

Fatal Exception: java.lang.UnsupportedOperationException
       at dalvik.system.VMDebug.startMethodTracing(VMDebug.java:139)
       at java.util.GregorianCalendar.julianError(GregorianCalendar.java)
       at java.util.GregorianCalendar.(GregorianCalendar.java)
       at java.util.GregorianCalendar.(GregorianCalendar.java)
       at java.text.SimpleDateFormat.(SimpleDateFormat.java)
       at java.text.SimpleDateFormat.(SimpleDateFormat.java)
       at com.adjust.sdk.Util.dateFormat(Util.java:88)
       at com.adjust.sdk.PackageBuilder.addDate(PackageBuilder.java:250)
       at com.adjust.sdk.PackageBuilder.injectCreatedAt(PackageBuilder.java:188)
       at com.adjust.sdk.PackageBuilder.getIdsParameters(PackageBuilder.java:130)
       at com.adjust.sdk.PackageBuilder.buildAttributionPackage(PackageBuilder.java:95)
       at com.adjust.sdk.ActivityHandler.getAttributionPackage(ActivityHandler.java:439)
       at com.adjust.sdk.ActivityHandler.initInternal(ActivityHandler.java:506)
       at com.adjust.sdk.ActivityHandler.access$000(ActivityHandler.java:31)
       at com.adjust.sdk.ActivityHandler$1.run(ActivityHandler.java:126)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:145)
       at android.os.HandlerThread.run(HandlerThread.java:61)
@jmehtaebates
Copy link

@luckey01 can you please look into this? or if you can point this to the right person, that would be great as well.

@uerceg
Copy link
Contributor

uerceg commented Sep 15, 2016

Hi @jmehtaebates

Thank you for this report. Can you please tell me if this is something which you are able to reproduce?

Cheers

@jmehtaebates
Copy link

Hi @uerceg

There aren't any specific reproducing steps. Here is some additional info which might help

In last 30 days, we saw 438 users affected by this with a total of 458 crashes
95% of these were seen on devices running 5.x android version
87% of the total happened on samsung devices

@nonelse
Copy link
Member

nonelse commented Sep 16, 2016

Hi @jmehtaebates.

I've tried to replicate in an emulated device with Android 5.0.1 by initialising and using the format function of SimpleDateFormat dozen of thousands of times from different threads without success.

It seems that Android 5.0 had that private function java.util.GregorianCalendar.julianError in their code.
The code in question does not seem that could do anything that would cause that exception, but a search of UnsupportedOperationException samsung online reveals that this would not be the first issue for that manufacturer.
Current version of Android SDK do not contain the same private function, so it would not happen anymore.
What we can do is catch the unexpected exception explicitly in that section in a future version.
In the meanwhile, I would recommend that you update to the latest version of our sdk that catches any exception that occurs in the background. It might not still enable the sdk to work for those situations, but it shouldn't crash it.

@jmehtaebates
Copy link

Thank you @nonelse

I will let my team know as well.

@afjoseph
Copy link

afjoseph commented Nov 8, 2016

Hey @jmehtaebates

Please let us know the progress of this issue. Was your team able to solve this problem?

@afjoseph
Copy link

afjoseph commented Feb 9, 2017

I'll close this issue for now. Please feel free to reopen when necessary

@afjoseph afjoseph closed this as completed Feb 9, 2017
shashanksu added a commit that referenced this issue Mar 24, 2021
Reading Install referrer Info in background thread to avoid ANR
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