You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My App Crashes on Android SDK 33 with java.util.ConcurrentModificationException (com.onesignal.common.events.EventProducer.fire). I am running on Expo. SDK 49 managed work flow. The app crashes immediately the OneSignal tries to initialize. However, if I removed Onesignal, the app runs successfully.
It also runs on lower Android SDK versions.
On Android 33, it gives the following errors;
constoneSignalAppId=Constants.expoConfig?.extra?.oneSignalAppId;OneSignal.initialize(oneSignalAppId);OneSignal.Debug.setLogLevel(LogLevel.Verbose);OneSignal.Notifications.requestPermission(true);OneSignal.setConsentRequired(true);OneSignal.setConsentGiven(true);letpermission=OneSignal.Notifications.hasPermission();if(!permission){OneSignal.Notifications.requestPermission(true);}//Method for handling notifications received while app in foregroundOneSignal.Notifications.addEventListener("foregroundWillDisplay",(event)=>{event.preventDefault();// some async workletnotification=event.getNotification();saveThisPushNotification(notification);// Use display() to display the notification after some async workevent.getNotification().display();});// Method for listening for notification clicksOneSignal.Notifications.addEventListener("click",(event)=>{console.log("OneSignal: notification clicked:",event);const{ action, notification }=event;saveThisPushNotification(notification);notification.display();// Alert.alert(notification.title, notification.body);});if(Object.keys(userData).length!=0){OneSignal.User.addAlias("userd",userData.username);OneSignal.User.addTag("userid",userData.userid.toString());OneSignal.User.addTag("fullname",userData.fullname);OneSignal.User.addTag("username",userData.username);OneSignal.User.addTag("usertype",userData.usertype);}
Steps to reproduce?
1. Setup managed-flow Expo project
2. Install onesignal-expo-plugin version 2.0.2
3. Install react-native-onesignal versioon 5.0.4
4. Configure OneSignal in App.js
5. Run the Development Build of the app on Android SDK 33
6. App crashes at startup
What did you expect to happen?
I expected the application to run normally like in other lower Android SDK version and initialize OneSignal
OneSignal Expo SDK version
2.0.2
Platform
Android
Relevant log output
Your app just crashed. See the error below.
java.util.ConcurrentModificationException
java.util.ArrayList$Itr.next(ArrayList.java:860)
com.onesignal.common.events.EventProducer.fire(EventProducer.kt:49)
com.onesignal.core.internal.application.impl.ApplicationService.setCurrent(ApplicationService.kt:50)
com.onesignal.core.internal.application.impl.ApplicationService.onActivityStarted(ApplicationService.kt:150)
android.app.Application.dispatchActivityStarted(Application.java:401)
android.app.Activity.dispatchActivityStarted(Activity.java:1404)
android.app.Activity.onStart(Activity.java:1922)
android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1543)
android.app.Activity.performStart(Activity.java:8330)
android.app.ActivityThread.handleStartActivity(ActivityThread.java:3670)
android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loopOnce(Looper.java:201)
android.os.Looper.loop(Looper.java:288)
android.app.ActivityThread.main(ActivityThread.java:7872)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
@opmat Thank you for reporting this is an issue in our Android Native SDK that is being resolved and will be fixed in the next release. Thank you for your patience
What happened?
My App Crashes on Android SDK 33 with java.util.ConcurrentModificationException (com.onesignal.common.events.EventProducer.fire). I am running on Expo. SDK 49 managed work flow. The app crashes immediately the OneSignal tries to initialize. However, if I removed Onesignal, the app runs successfully.
It also runs on lower Android SDK versions.
On Android 33, it gives the following errors;
java.util.ConcurrentModificationException (com.onesignal.common.events.EventProducer.fire)
java.lang.NullPointerException (com.onesignal.core.activities.PermissionsActivity.onRequestPermissionsResult)
My code is below
Steps to reproduce?
What did you expect to happen?
I expected the application to run normally like in other lower Android SDK version and initialize OneSignal
OneSignal Expo SDK version
2.0.2
Platform
Android
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: