OneSignal / OneSignal-Unity-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Unity app with OneSignal. https://onesignal.com
Other
222 stars 60 forks source link

[Bug]: com.onesignal.OneSignalRestClient.callResponseHandlerOnFailure #620

Open shefich opened 1 year ago

shefich commented 1 year ago

What happened?

As we can see these threads: https://github.com/OneSignal/OneSignal-Android-SDK/issues/443 and https://github.com/segmentio/analytics-android/issues/490 Passed several years and the issues are still there. Think you need to have some check for creating a thread while the app closes or there is no memory.

Devices in my Crashlytics: Galaxy A03 Core Andoid OSs: 11 and 12

Steps to reproduce?

1. Can't be reproduced. Probably shut down the app in time OneSignal creating a thread...

What did you expect to happen?

I expected no such issues. As they're ruining app health on the Google Play.

Unity version

2021.2.12 (latest)

OneSignal Unity SDK version

3.0.10

Platform

Android

Relevant log output

Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
       at java.lang.Thread.nativeCreate(Thread.java)
       at java.lang.Thread.start(Thread.java:887)
       at com.onesignal.OneSignalRestClient.callResponseHandlerOnFailure(OneSignalRestClient.java:296)
       at com.onesignal.OneSignalRestClient.startHTTPConnection(OneSignalRestClient.java:260)
       at com.onesignal.OneSignalRestClient.access$100(OneSignalRestClient.java:46)
       at com.onesignal.OneSignalRestClient$4.run(OneSignalRestClient.java:114)
       at java.lang.Thread.run(Thread.java:923)

Code of Conduct

jkasten2 commented 4 months ago

@shefich Thanks for reporting, what percentage of users / devices and total crashes have you seen for this issue?

The code has been completely refactored in the v5 release so this shouldn't be an issue any more. Could you try updating to the latest SDK and let us know if it fixes the issue for you? See our v5 migration guide to get started.