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

Android: Started getting crashes when sending the tags #617

Closed
bitshadow opened this issue Aug 29, 2018 · 1 comment
Closed

Android: Started getting crashes when sending the tags #617

bitshadow opened this issue Aug 29, 2018 · 1 comment

Comments

@bitshadow
Copy link

bitshadow commented Aug 29, 2018

Description:
NullPointerException (@OneSignal$11:run:1508) {mqt_native_modules}

java.lang.NullPointerException:
at com.onesignal.OneSignal$11.run (OneSignal.java:1508)
at com.onesignal.OneSignal.sendTags (OneSignal.java:1524)
at com.onesignal.OneSignal.sendTags (OneSignal.java:1450)
at com.geektime.rnonesignalandroid.RNOneSignal.sendTags (RNOneSignal.java:88)
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:363)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:162)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:31)
at android.os.Looper.loop (Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:194)
at java.lang.Thread.run (Thread.java:764)

Environment

  1. Android SDK - 24

Steps to Reproduce Issue:
Example:

  1. Add the OneSignal SDK to your project
  2. Place your App ID in the application's gradle file
  3. Attempt to receive a push notification with Tags
@jkasten2
Copy link
Member

@bitshadow Thanks for reporting, this was fixed in PR #611. It will be included in the next release of this SDK and then will be included in the next react native SDK update after.

In the mean time the issue can be avoided by making sure you don't call sendTags with a empty JSON object as this triggers null error. Thanks.

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

2 participants