Skip to content

[Bug]: addAlias with some values throws, example org.json.JSONException: Value 1585567 at Al of type java.lang.String cannot be converted to boolean #2279

@KhushbuDX

Description

@KhushbuDX

How can we help?

I also facing the Issue while using addAlias with "Al" as label
It will allow user to login first time after reopen the app It will crash
Below are the crash Logs

java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:89)
at com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
at com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
at com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:82)
at com.onesignal.common.services.ServiceProvider.getAllServices(ServiceProvider.kt:55)
at com.onesignal.common.services.ServiceRegistrationReflection.resolve(ServiceRegistration.kt:72)
at com.onesignal.common.services.ServiceProvider.getServiceOrNull(ServiceProvider.kt:79)
at com.onesignal.common.services.ServiceProvider.getService(ServiceProvider.kt:67)
at com.onesignal.internal.OneSignalImp.initWithContext(OneSignalImp.kt:554)
at com.onesignal.OneSignal.initWithContext(OneSignal.kt:135)
at AppController.setupOneSignal(AppController.kt:140)
at application.AppController.onCreate(AppController.kt:111)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1266)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7619)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2400)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: org.json.JSONException: Value 1585567 at Al of type java.lang.String cannot be converted to boolean
at org.json.JSON.typeMismatch(JSON.java:101)
at org.json.JSONObject.getBoolean(JSONObject.java:422)
at com.onesignal.common.modeling.Model.initializeFromJson(Model.kt:115)
at com.onesignal.common.modeling.SimpleModelStore.create(SimpleModelStore.kt:30)
at com.onesignal.common.modeling.ModelStore.load(ModelStore.kt:175)
at com.onesignal.common.modeling.SimpleModelStore.(SimpleModelStore.kt:23)
at com.onesignal.user.internal.identity.IdentityModelStore.(IdentityModelStore.kt:9)
... 25 more

Value 1585567 at Al
Al is user's first name
1585567 is user Id

I face this issue only for the User's who have first name like Al

Gradle version :: com.onesignal:OneSignal:[5.0.0, 5.99.99]

Feel free to reach out me If required Further more detail

Also let me know the gradle version for resolve this issue

Thanks

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions