OneSignal / OneSignal-Android-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Other
604 stars 368 forks source link

[Bug]: Fatal Exception: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/Exception;)V in class Lorg/json/JSONException; or its super classes (declaration of 'org.json.JSONException' appears in /apex/com.android.art/javalib/core-libart.jar) #1868

Open ramkia613 opened 1 year ago

ramkia613 commented 1 year ago

What happened?

I received crash reports in Crashlytics. This crashes accuracy so many times.

Steps to reproduce?

We could not reproduce this issue on our device, but it was recorded on Crashlytics and Google Play.

What did you expect to happen?

I expected an app to continue without crashing.

OneSignal Android SDK version

4.8.6

Android version

13, 12, 11, 10, 9, 7.0

Specific Android models

Galaxy Note9
Galaxy A6+
Galaxy A80

Relevant log output

Fatal Exception: java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/Exception;)V in class Lorg/json/JSONException; or its super classes (declaration of 'org.json.JSONException' appears in /apex/com.android.art/javalib/core-libart.jar)
       at org.json.JSONObject.wrongValueFormatException(JSONObject.java:2628)
       at org.json.JSONObject.getString(JSONObject.java:863)
       at com.onesignal.OSInAppMessageInternal.parseEndTimeJson(OSInAppMessageInternal.java:95)
       at com.onesignal.OSInAppMessageInternal.<init>(OSInAppMessageInternal.java:84)
       at com.onesignal.OSInAppMessageController.processInAppMessageJson(OSInAppMessageController.java:237)
       at com.onesignal.OSInAppMessageController.initWithCachedInAppMessages(OSInAppMessageController.java:198)
       at com.onesignal.OneSignal.doSessionInit(OneSignal.java:1006)
       at com.onesignal.OneSignal.init(OneSignal.java:868)
       at com.onesignal.OneSignal.setAppId(OneSignal.java:737)
       at com.onesignal.OneSignal.reassignDelayedInitParams(OneSignal.java:1181)
       at com.onesignal.OneSignal.onRemoteParamSet(OneSignal.java:889)
       at com.onesignal.OneSignal$7.complete(OneSignal.java:1122)
       at com.onesignal.OneSignalRemoteParams.processJson(OneSignalRemoteParams.java:211)
       at com.onesignal.OneSignalRemoteParams.access$100(OneSignalRemoteParams.java:12)
       at com.onesignal.OneSignalRemoteParams$1.onSuccess(OneSignalRemoteParams.java:156)
       at com.onesignal.OneSignalRestClient$5.run(OneSignalRestClient.java:279)
       at java.lang.Thread.run(Thread.java:1012)

Code of Conduct

emawby commented 1 year ago

@ramkia613 It looks like a crash when trying to read the end time for an In App Message. Are you able to reproduce the issue when testing messages with end times?

ramkia613 commented 1 year ago

@emawby We tried with end time for an In App Message, unable to reproduce this issue.