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
When testing the In-App Push Permission Prompt on a new installation, I'm getting a memory leak error from LeakCanary.
To get the Permission Prompt to display in my app, I use a manual app trigger
1. Install v5.0.0-beta4 library of the SDK
2. Install LeakCanary library in your sample app
3. On your OneSignal dashboard account, enable the `In-App Push Permission Prompt`. In my case, the Permission Prompt is displayed when I send a trigger condition. e.g. `OneSignal.InAppMessages.addTrigger("showPrompt", "true")`4. Click `Allow` when the Push Permission Prompt displays, so this shows the native Android Permissions dialog. (Assuming you're using the template Push Permission Prompt example provided on the dashboard)
5. On the native Android Permissions dialog, click `Allow`6. When the native Android Permissions dialog is dismissed, you'll notice the memory leak shown in LeakCanary
What did you expect to happen?
No memory leaks when displaying an In-App Push Permission Prompt
OneSignal Android SDK version
Release 5.0.0-beta4
Android version
13
Specific Android models
Android Studio Emulator on Android 13
Relevant log output
┬───
│ GC Root: Thread object
│
├─ android.net.ConnectivityThread instance
│ Leaking: NO (PathClassLoader↓ is not leaking)
│ Thread name: 'ConnectivityThread'
│ ↓ Thread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│ Leaking: NO (OneSignal↓ is not leaking and A ClassLoader is never leaking)
│ ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│ Leaking: NO (OneSignal↓ is not leaking)
│ ↓ Object[1245]
├─ com.onesignal.OneSignal class
│ Leaking: NO (a class is never leaking)
│ ↓ static OneSignal.oneSignal$delegate
│ ~~~~~~~~~~~~~~~~~~
├─ kotlin.SynchronizedLazyImpl instance
│ Leaking: UNKNOWN
│ Retaining 24.5 kB in 863 objects
│ ↓ SynchronizedLazyImpl._value
│ ~~~~~~
├─ com.onesignal.internal.OneSignalImp instance
│ Leaking: UNKNOWN
│ Retaining 24.5 kB in 862 objects
│ ↓ OneSignalImp._iam
│ ~~~~
├─ com.onesignal.inAppMessages.internal.InAppMessagesManager instance
│ Leaking: UNKNOWN
│ Retaining 1.7 kB in 54 objects
│ ↓ InAppMessagesManager._displayer
│ ~~~~~~~~~~
├─ com.onesignal.inAppMessages.internal.display.impl.InAppDisplayer instance
│ Leaking: UNKNOWN
│ Retaining 174.4 kB in 2874 objects
│ ↓ InAppDisplayer.lastInstance
│ ~~~~~~~~~~~~
├─ com.onesignal.inAppMessages.internal.display.impl.WebViewManager instance
│ Leaking: UNKNOWN
│ Retaining 174.4 kB in 2873 objects
│ activity instance of com.onesignal.core.activities.PermissionsActivity
│ with mDestroyed = true
│ ↓ WebViewManager.activity
│ ~~~~~~~~
╰→ com.onesignal.core.activities.PermissionsActivity instance
Leaking: YES (ObjectWatcher was watching this because com.onesignal.core.
activities.PermissionsActivity received Activity#onDestroy() callback and
Activity#mDestroyed is true)
Retaining 36.1 kB in 479 objects
key = b3bfcfba-b2ca-4000-a636-150c67fc8290
watchDurationMillis = 9880
retainedDurationMillis = 4877
_requestPermissionService instance of com.onesignal.core.internal.
permissions.impl.RequestPermissionService with mDestroyed = false
mApplication instance of com.example.App
mBase instance of android.app.ContextImpl
METADATA
Build.VERSION.SDK_INT: 33
Build.MANUFACTURER: Google
LeakCanary version: 2.9.1
App process name: com.example.App.debug
Class count: 35722
Instance count: 266771
Primitive array count: 165708
Object array count: 42726
Thread count: 88
Heap total bytes: 39292859
Bitmap count: 12
Bitmap total bytes: 36444
Large bitmap count: 0
Large bitmap total bytes: 0
Db 1: open /data/user/0/com.example.App.debug/databases/com.google.
android.datatransport.events
Db 2: closed /data/user/0/com.example.App.
debug/databases/google_app_measurement_local.db
Db 3: open /data/user/0/com.example.App.debug/databases/OneSignal.db
Db 4: open /data/user/0/com.example.App.debug/databases/userEvent.db
Db 5: open /data/user/0/com.example.App.debug/no_backup/androidx.work.
workdb
Stats: LruCache[maxSize=3000,hits=127958,misses=268892,hitRate=32%]
RandomAccess[bytes=13774209,reads=268892,travel=122701904683,range=45001585,size
=55975557]
Analysis duration: 8093 ms
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Hello @ngoni apologies that this issue was missed.
Is this still a concern for you? Since your report we have a major release out; can you please update to our latest SDK version and let us know if you are still seeing this?
Hello there! We're going to close this issue as it has gone stale. If you are still having any trouble after updating to our latest SDK version, please open a new issue and we'll be happy to assist. Thanks!
What happened?
When testing the In-App Push Permission Prompt on a new installation, I'm getting a memory leak error from LeakCanary.
To get the Permission Prompt to display in my app, I use a manual app trigger
OneSignal.InAppMessages.addTrigger("showPrompt", "true")
Steps to reproduce?
What did you expect to happen?
No memory leaks when displaying an In-App Push Permission Prompt
OneSignal Android SDK version
Release 5.0.0-beta4
Android version
13
Specific Android models
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: