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

[Bug]: WorkManager is not initialised properly. not fixed yet #564

Closed
1 task done
toseefhaiderkhansugguu opened this issue Dec 1, 2022 · 8 comments
Closed
1 task done

Comments

@toseefhaiderkhansugguu
Copy link

toseefhaiderkhansugguu commented Dec 1, 2022

What happened?

I am using one-signal latest unity SDK as i upgraded my SDK due to play store api 31 policy before this everything was fine and now some of my testing devices facing this crash, due to this my release is getting delayed. and why this happening on some of devices why not all? if initialisation of work-manger not effecting latest devices?

Screenshot 2022-11-30 at 5 00 08 PM

Steps to reproduce?

This issue occurs mostly on low end devices when one-signal initialisation starts

What did you expect to happen?

One-signal initialisation success

Unity version

2020.3.42f1

OneSignal Unity SDK version

3.0.7

Platform

Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jkasten2
Copy link
Member

jkasten2 commented Dec 1, 2022

@toseefhaiderkhansugguu Thanks for reporting, we have seen a few reports of this been we haven't been able to narrow it down yet. Can you fill out the details on this Github issue to help us?
OneSignal/OneSignal-Android-SDK#1672

@toseefhaiderkhansugguu
Copy link
Author

OneSignal/OneSignal-Android-SDK#1672

Ok sure!

@Martin-Gonzalez90
Copy link

This still happens, non of the workarounds worked.
Did you managed to fix it @toseefhaiderkhansugguu ?

@toseefhaiderkhansugguu
Copy link
Author

@Martin-Gonzalez90 not yet

@Martin-Gonzalez90
Copy link

is it possible to someone from OneSignal team to tell me when this code is being executed based on the stacktrace?

Caused by: java.lang.IllegalStateException: WorkManager is not initialized properly.  You have explicitly disabled WorkManagerInitializer in your manifest, have not manually called WorkManager#initialize at this point, and your Application does not implement Configuration.Provider.
  at androidx.work.impl.WorkManagerImpl.getInstance (WorkManagerImpl.java:158)
  at androidx.work.WorkManager.getInstance (WorkManager.java:184)
  at com.onesignal.OSNotificationRestoreWorkManager.beginEnqueueingWork (OSNotificationRestoreWorkManager.java:48)
  at com.onesignal.OneSignal.handleActivityLifecycleHandler (OneSignal.java:975)
  at com.onesignal.OneSignal.init (OneSignal.java:852)
  at com.onesignal.OneSignal.setAppId (OneSignal.java:735)
  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:923)

@Martin-Gonzalez90
Copy link

I think I found a workaround, would be nice if you can try this @toseefhaiderkhansugguu just to verify it as well.
I added to my gradle dependencies list the following dependency:

api 'androidx.startup:startup-runtime:1.1.1'

Found that this dependency is the one the does something with the workers. Link here

@jkasten2
Copy link
Member

Anyone who is having this issue please update to OneSignal-Unity-SDK 3.0.10 as this should address this issue.

Please report back if updating to this version fixes the issue for you or if you continue to see these same crashes.

@shepherd-l
Copy link
Contributor

Closing due to inactivity. If you are still experiencing this issue, please open a new issue with updated information

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

4 participants