-
Notifications
You must be signed in to change notification settings - Fork 370
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
App crashes when receive notification for some user. #1874
Comments
@sahil0289 Are you able to reproduce this bug in your app? Could you share some of the content of the notification or any settings your notification is using? |
Hi @sahil0289 I've been able to reproduce this issue. This happens when certain tag names are used that clash with our models, they don't play nicely with our use of reflection during the deserialization process. A fix for this will be created shortly, thanks! |
But I am not using any tag. I am only sending external Id.
…On Fri, Oct 27, 2023, 7:38 PM Brian Smith ***@***.***> wrote:
Hi @sahil0289 <https://github.com/sahil0289> I've been able to reproduce
this issue. This happens when certain tag names are used that clash with
our models, they don't play nicely with our use of reflection during the
deserialization process
<https://github.com/OneSignal/OneSignal-Android-SDK/blob/user-model/main/OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/modeling/Model.kt#L97>.
A fix for this will be created shortly, thanks!
—
Reply to this email directly, view it on GitHub
<#1874 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGKW56OE5S4NQCCH6N7CLYLYBO537AVCNFSM6AAAAAA6GVJBQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSHE4DANBZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It's possible the tag is already set on the user and being brought down to the device. I'm seeing the SDK crash trying to deserialize a tag |
Okay ..please let me know once this issue is resolved.
…On Mon, Oct 30, 2023, 4:53 PM Brian Smith ***@***.***> wrote:
It's possible the tag is already set on the user and being brought down to
the device. I'm seeing the SDK crash trying to deserialize a tag
value=3000.
—
Reply to this email directly, view it on GitHub
<#1874 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGKW56J3YF6HB3PID5ST3HLYB6E4XAVCNFSM6AAAAAA6GVJBQKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUHE4DGNRRG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…ical-method-name Update PropertiesModel's deserialization of tags to not use `Model.initializeFromJson`
@sahil0289 just wanted to check in. We released 5.0.4 last month. Have you had a chance to upgrade to this latest version, and if so, has this solved the issue for you? |
@sahil0289 Closing out this issue as a fix was added in 5.0.4. If you are still having problems please let us know and we will reopen. Thanks! |
…ical-method-name Update PropertiesModel's deserialization of tags to not use `Model.initializeFromJson`
…ical-method-name Update PropertiesModel's deserialization of tags to not use `Model.initializeFromJson`
…ical-method-name Update PropertiesModel's deserialization of tags to not use `Model.initializeFromJson`
How can we help?
App crashes whenever user receive notification after implementing one signal SDK - com.onesignal:OneSignal:[5.0.0, 5.99.99]. It is showing error in crashlytics. Caused by: org.json.JSONException: Value 3000 at value of type java.lang.String cannot be converted to boolean
org.json.JSON.typeMismatch(JSON.java:101).
Crashlytics bug is shown below:-
java.lang.RuntimeException: Unable to start receiver com.onesignal.notifications.receivers.FCMBroadcastReceiver: java.lang.reflect.InvocationTargetException
android.app.ActivityThread.handleReceiver(ActivityThread.java:4568)
android.app.ActivityThread.-$$Nest$mhandleReceiver(:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2316)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:240)
android.os.Looper.loop(Looper.java:351)
android.app.ActivityThread.main(ActivityThread.java:8427)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: java.lang.reflect.InvocationTargetException:
java.lang.reflect.Constructor.newInstance0(Constructor.java:0)
java.lang.reflect.Constructor.newInstance(Constructor.java:343)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:90)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:83)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:83)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceProvider.getService$com_onesignal_core(ServiceProvider.kt:40)
com.onesignal.internal.OneSignalImp.initWithContext(OneSignalImp.kt:192)
com.onesignal.OneSignal.initWithContext(OneSignal.kt:196)
com.onesignal.notifications.receivers.FCMBroadcastReceiver.onReceive(FCMBroadcastReceiver.kt:24)
android.app.ActivityThread.handleReceiver(ActivityThread.java:4552)
android.app.ActivityThread.-$$Nest$mhandleReceiver(:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2316)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:240)
android.os.Looper.loop(Looper.java:351)
android.app.ActivityThread.main(ActivityThread.java:8427)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Caused by: org.json.JSONException: Value 3000 at value of type java.lang.String cannot be converted to boolean
org.json.JSON.typeMismatch(JSON.java:101)
org.json.JSONObject.getBoolean(JSONObject.java:422)
com.onesignal.common.modeling.Model.initializeFromJson(Model.kt:107)
com.onesignal.user.internal.properties.PropertiesModel.createModelForProperty(PropertiesModel.kt:94)
com.onesignal.common.modeling.Model.initializeFromJson(Model.kt:87)
com.onesignal.common.modeling.SimpleModelStore.create(SimpleModelStore.kt:32)
com.onesignal.common.modeling.ModelStore.load(ModelStore.kt:129)
com.onesignal.common.modeling.SimpleModelStore.(SimpleModelStore.kt:25)
com.onesignal.user.internal.properties.PropertiesModelStore.(PropertiesModelStore.kt:8)
java.lang.reflect.Constructor.newInstance0(Constructor.java:0)
java.lang.reflect.Constructor.newInstance(Constructor.java:343)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:90)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:83)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:83)
com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
com.onesignal.common.services.ServiceProvider.getService$com_onesignal_core(ServiceProvider.kt:40)
com.onesignal.internal.OneSignalImp.initWithContext(OneSignalImp.kt:192)
com.onesignal.OneSignal.initWithContext(OneSignal.kt:196)
com.onesignal.notifications.receivers.FCMBroadcastReceiver.onReceive(FCMBroadcastReceiver.kt:24)
android.app.ActivityThread.handleReceiver(ActivityThread.java:4552)
android.app.ActivityThread.-$$Nest$mhandleReceiver(:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2316)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:240)
android.os.Looper.loop(Looper.java:351)
android.app.ActivityThread.main(ActivityThread.java:8427)
java.lang.reflect.Method.invoke(Method.java:0)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
Code of Conduct
The text was updated successfully, but these errors were encountered: