Closed tfcporciuncula closed 1 year ago
It turns out the issue was indeed on our end. We were initializing CIO lightly asynchronously on app start, and for some reason the only issue we encountered was this one. It seems to work fine if we initialize it completely synchronously, though.
I think it might be worth it to emphasize this in the documentation since I believe many other peeps might have the same idea of offloading this kind of initialization to a background thread so it doesn't compete with our app start. I'm keeping the issue open just in case you still want to take a look at this, but otherwise feel free to close it.
Hey @tfcporciuncula, thank you point this out, we will update it in the docs. But you are correct, we need SDK to be initialized before any of the methods are to be performed.
Closing this with an action on my end, feel free to reach out if you have more questions.
SDK version: 3.1.1
Environment: Development or Production
Are logs available? Yes but there are no logs from CIO, only the stacktrace:
Describe the bug App process crashes and notification isn't rendered when we send a rich push with an image while the app process is dead.
To Reproduce
Expected behavior Notification is rendered and process doesn't crash.
Screenshots N/A
Additional context The error message may make it seem like we're not properly setting up the SDK, but we are. Everything is working and we're able to receive notifications without images while the app process is dead (and everything works fine while the app is open). But as soon as we add images, this happens, so I believe there's an issue on the SDK side.
I've found this issue on a Pixel 4 running Android 13 but I also tried on an emulator running Android 11 and I was also able to reproduce it there, so it doesn't really seem to be device or Android version specific.