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]: User.optIn not working on Android #1590

Closed
2 of 3 tasks
RickRedSix opened this issue Oct 18, 2023 · 23 comments
Closed
2 of 3 tasks

[Bug]: User.optIn not working on Android #1590

RickRedSix opened this issue Oct 18, 2023 · 23 comments

Comments

@RickRedSix
Copy link

RickRedSix commented Oct 18, 2023

What happened?

I am building a toggle to allow users to opt-out or opt-in to notifications in my app. I have successfully called User.optOut() as expected, but when testing User.optIn() it does not work. In fact, it looks like it also marks the user as opted-out. When calling optIn(), I noticed that the user's 'Last Unsubscribed' timestamp is updated to the time optIn() was called.

Here is the logic that is called when submitting:

            const optedIn = await OneSignal.User.pushSubscription.getOptedIn();

            if(values.recieveNotifications === true) {

                if(!optedIn) {
                    OneSignal.User.pushSubscription.optIn();
                }

            } else {
               
                if(optedIn) {
                    OneSignal.User.pushSubscription.optOut();
                }        
        
            }

I have checked that the right code block is being called and also checked that OneSignal.Notifications.permission is true. According to the documentation the two conditions for this to work have been met.

This isn't causing the bug, but I also noticed that the descriptions for the functions in the code are the wrong way around.

Screenshot 2023-10-18 103729
Screenshot 2023-10-18 103738

Steps to reproduce?

1. Install latest react-native-onesignal (5.0.2)
2. Build and run on Android
3. Subscribe user to push notifications with OneSignal SDK
4. Call OneSignal.User.pushSubscription.optOut() to opt user out 
5. Confirm User is opted out in OneSignal Dashboard
6. Call OneSignal.User.pushSubscription.optIn() to opt user back in.
7. See that User in OneSignal dashboard is still opted out, but their 'Last Unsubscribed' date matches the call in step 6.

What did you expect to happen?

I expect the user's status to change back to Opted In.

React Native OneSignal SDK version

5.0.2

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@RickRedSix
Copy link
Author

Just to confirm, I have tested this on iOS and it works fine. This only happens on Android.

@RickRedSix RickRedSix changed the title [Bug]: User.optIn not working [Bug]: User.optIn not working on Android Oct 18, 2023
@emawby
Copy link
Contributor

emawby commented Oct 19, 2023

@RickRedSix Before you call optOut is the user showing as subscribed on the dashboard?

@RickRedSix
Copy link
Author

RickRedSix commented Oct 19, 2023 via email

@emawby
Copy link
Contributor

emawby commented Oct 23, 2023

@RickRedSix I am not able to reproduce this issue if possible could you enable verbose logging (OneSignal.Debug.setLogLevel(LogLevel.Verbose);) and share the logs when toggling optIn?

@RickRedSix
Copy link
Author

@emawby Here are the logs when OneSignal.User.pushSubscription.optIn(); is called and then when OneSignal.User.pushSubscription.optOut(); is called. It looks like they are both doing the same thing.


2023-10-23 22:03:10.968 25019-26783 OneSignal               com.networkandchill                  D  [mqt_native_modules] OperationRepo.enqueue(operation: {"name":"update-subscription","appId":"150a5fff-0aba-4a29-9ea7-fa0e9f7c927a","onesignalId":"8db06154-73a6-4b37-b272-3e31be525a3a","subscriptionId":"c4ef5052-4510-4229-928a-97e9995c25b6","type":"PUSH","enabled":false,"address":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","status":"UNSUBSCRIBE"}, flush: false)
2023-10-23 22:03:11.170 25019-25131 OneSignal               com.networkandchill                  D  [OpRepo] SubscriptionOperationExecutor(operations: [{"name":"update-subscription","appId":"150a5fff-0aba-4a29-9ea7-fa0e9f7c927a","onesignalId":"8db06154-73a6-4b37-b272-3e31be525a3a","subscriptionId":"c4ef5052-4510-4229-928a-97e9995c25b6","type":"PUSH","enabled":false,"address":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","status":"UNSUBSCRIBE","id":"7303bee4-da91-491a-9c0d-df4eba7ef38a"}])
2023-10-23 22:03:11.179 25019-25126 OneSignal               com.networkandchill                  D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/150a5fff-0aba-4a29-9ea7-fa0e9f7c927a/subscriptions/c4ef5052-4510-4229-928a-97e9995c25b6 - {"subscription":{"type":"AndroidPush","token":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","enabled":false,"notification_types":-2,"sdk":"050003","device_model":"sdk_gphone64_x86_64","device_os":"13","rooted":false,"net_type":0,"carrier":"T-Mobile","app_version":"1"}}
2023-10-23 22:03:11.263 25019-25126 OneSignal               com.networkandchill                  D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/150a5fff-0aba-4a29-9ea7-fa0e9f7c927a/subscriptions/c4ef5052-4510-4229-928a-97e9995c25b6 - STATUS: 200 JSON: {}
2023-10-23 22:03:11.263 25019-25131 OneSignal               com.networkandchill                  D  [OpRepo] OperationRepo: execute response = SUCCESS


2023-10-23 22:04:36.520 25019-26783 OneSignal               com.networkandchill                  D  [mqt_native_modules] OperationRepo.enqueue(operation: {"name":"update-subscription","appId":"150a5fff-0aba-4a29-9ea7-fa0e9f7c927a","onesignalId":"8db06154-73a6-4b37-b272-3e31be525a3a","subscriptionId":"c4ef5052-4510-4229-928a-97e9995c25b6","type":"PUSH","enabled":false,"address":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","status":"UNSUBSCRIBE"}, flush: false)
2023-10-23 22:04:36.721 25019-25131 OneSignal               com.networkandchill                  D  [OpRepo] SubscriptionOperationExecutor(operations: [{"name":"update-subscription","appId":"150a5fff-0aba-4a29-9ea7-fa0e9f7c927a","onesignalId":"8db06154-73a6-4b37-b272-3e31be525a3a","subscriptionId":"c4ef5052-4510-4229-928a-97e9995c25b6","type":"PUSH","enabled":false,"address":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","status":"UNSUBSCRIBE","id":"e2316a18-7e83-4529-a0e9-35d14ff0cbbd"}])
2023-10-23 22:04:36.726 25019-25126 OneSignal               com.networkandchill                  D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/150a5fff-0aba-4a29-9ea7-fa0e9f7c927a/subscriptions/c4ef5052-4510-4229-928a-97e9995c25b6 - {"subscription":{"type":"AndroidPush","token":"d4UryQQwTsWHt1l3PSfR1a:APA91bG6M2XN8kCKHKy-RQTOS-6a2F7yqhCpqO3I8IvU9xQVs5fFsxFezbvtbyhdlnNpx4tiZ4Fntjljl1DUQ6GvYaAx2CJc_frAPmDxFKwXv0NnzaYQ-wUJVimOBgXOVo482pGDpWoI","enabled":false,"notification_types":-2,"sdk":"050003","device_model":"sdk_gphone64_x86_64","device_os":"13","rooted":false,"net_type":0,"carrier":"T-Mobile","app_version":"1"}}
2023-10-23 22:04:36.827 25019-25126 OneSignal               com.networkandchill                  D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/150a5fff-0aba-4a29-9ea7-fa0e9f7c927a/subscriptions/c4ef5052-4510-4229-928a-97e9995c25b6 - STATUS: 200 JSON: {}
2023-10-23 22:04:36.828 25019-25131 OneSignal               com.networkandchill                  D  [OpRepo] OperationRepo: execute response = SUCCESS

@petodavid
Copy link

I'm facing with the same issue using the latest flutter sdk

@diegodario88
Copy link

Facing the same issue here

@rohithramachandran
Copy link

rohithramachandran commented Nov 12, 2023

This is broken for a long time. Seems like one signal is not interested in react-native issues. Can somebody help to get an update whether react-native plugin is actively in roadmap ?

OneSignal.User.pushSubscription.addEventListener("change",(data)=>{ console.log("pushSubscription data >> ",data.current.token); })

The above token never prints. But in the android logcat I can see below
[{"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"ee80bea1-4b9b-40ae-8ee9-b1ab3aaa4362"}, {"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"beb95276-ea82-4e82-a513-3ab75cb5d670"}, {"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"SUBSCRIBED","id":"4a502066-3b4b-4835-8037-cf42637f3e3f"}]

Seems like something messed up in the library

@Sondago
Copy link

Sondago commented Nov 13, 2023

This is broken for a long time. Seems like one signal is not interested in react-native issues. Can somebody help to get an update whether react-native plugin is actively in roadmap ?

OneSignal.User.pushSubscription.addEventListener("change",(data)=>{ console.log("pushSubscription data >> ",data.current.token); })

The above token never prints. But in the android logcat I can see below [{"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"ee80bea1-4b9b-40ae-8ee9-b1ab3aaa4362"}, {"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"NO_PERMISSION","id":"beb95276-ea82-4e82-a513-3ab75cb5d670"}, {"name":"update-subscription","appId":"ed8f5170-87a2-46b5-a875-df90ad11049a","onesignalId":"b0a55a0b-d827-4e46-9edb-5d9dc900a268","subscriptionId":"48f75e53-ba4e-4350-8903-0238bc556273","type":"PUSH","enabled":false,"address":"","status":"SUBSCRIBED","id":"4a502066-3b4b-4835-8037-cf42637f3e3f"}]

Seems like something messed up in the library

+1

@gvalenza
Copy link

same issue PATCH RECEIVED JSON: {"errors":[{"code":"subscription-10","title":"Subscription can't change notification_types to positive integer while disabled"}]}

Android 13
Capactitor 3
One signal 5.0.3

@sanny-naked
Copy link

Downgrading to version 4.5.2 has let us avoid this problem for now.

@muhammadarsal
Copy link

In my code, OneSignal.login was being called again on re-render when the user was already registered. This was causing the issue with optIn / optOut. Once I fixed it and made sure that OneSignal.login is not called if the user is already logged in, optIn / optOut started working correctly.

@somasekharkakarla
Copy link

when i use OneSignal.User.pushSubscription.optIn()
some time listener will works sometimes not. These are causing issue for some users.
when i am also checking OneSignal.User.pushSubscription.getOptedIn(); it is still has false but i am able to receive push notifications.

Please fix this as soon as possible.

@chriszs
Copy link

chriszs commented Jan 4, 2024

Encountering what I believe is this issue, or something maybe related, when trying to upgrade to 5.0.4. I'm using it in an Expo SDK 49 project in Android 13 on both an emulated Pixel 7 Pro and a real Pixel 7 Pro.

My code, when simplified, looks something like this:

OneSignal.Debug.setLogLevel(LogLevel.Verbose);

OneSignal.initialize(ONESIGNAL_APP_ID);

OneSignal.Location.setShared(false);

function refresh() {
  console.log(OneSignal.User.pushSubscription.getOptedIn());
}

useEffect(() => {
  OneSignal.User.pushSubscription.addEventListener('change', refresh);

  return () => {
    OneSignal.User.pushSubscription.removeEventListener('change', refresh);
  };
}, []);

OneSignal.User.pushSubscription.optIn(); // expect to see an event fired that logs true
console.log(OneSignal.User.pushSubscription.getOptedIn());
OneSignal.User.pushSubscription.optOut(); // expect to see an event fired that logs false
console.log(OneSignal.User.pushSubscription.getOptedIn());
OneSignal.User.pushSubscription.optIn(); // expect to see an event fired that logs true
console.log(OneSignal.User.pushSubscription.getOptedIn());
OneSignal.User.pushSubscription.optOut(); // expect to see an event fired that logs false
console.log(OneSignal.User.pushSubscription.getOptedIn());
// etc.

When I first run this, it works as expected, and I see a log like:

2024-01-04 11:17:39.489  8180-8399  OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-2] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/users/by/onesignal_id/a7b09c5e-7ab1-40ed-8d88-e4b88e42be83
2024-01-04 11:17:39.492  8180-8401  OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-4] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870/iams
2024-01-04 11:17:39.506  8180-8180  OneSignal               com.bf.appced43b                     I  sending subscription change event

But after killing the app (swiping up on the card) and then reopening it, the event fires maybe once or not at all per opt in or out, and the opted-in state I can access is stuck either opted-in or opted-out, despite logs indicating a 200 success API PATCH operation. Here's what a restart and a couple toggles looks like:

---------------------------- PROCESS STARTED (12532) for package com.bf.appced43b ----------------------------
2024-01-04 11:53:03.920 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] initWithContext(context: com.bf.appced43b.MainActivity@d7ebb85, appId: 95209e17-8092-4894-a52f-276ea2c66226)
2024-01-04 11:53:03.920 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] initWithContext: SDK initializing
2024-01-04 11:53:03.921 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.921 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.application.impl.ApplicationService()
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] ApplicationService: current activity=com.bf.appced43b.MainActivity@d7ebb85
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] ApplicationService.init: entryState=APP_OPEN
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.core.internal.config.ConfigModelStore
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.config.ConfigModelStore(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.preferences.impl.PreferencesService(com.onesignal.core.internal.application.IApplicationService,com.onesignal.core.internal.time.ITime)
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.time.ITime
2024-01-04 11:53:03.922 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.time.impl.Time()
2024-01-04 11:53:03.929 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.session.internal.session.SessionModelStore
2024-01-04 11:53:03.929 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.session.internal.session.SessionModelStore(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.929 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.929 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.preferences.impl.PreferencesService@ebc47f0
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.location.ILocationManager
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.location.internal.LocationManager(com.onesignal.core.internal.application.IApplicationService,com.onesignal.location.internal.capture.ILocationCapturer,com.onesignal.location.internal.controller.ILocationController,com.onesignal.location.internal.permissions.LocationPermissionController)
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.location.internal.capture.ILocationCapturer
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.location.internal.capture.impl.LocationCapturer(com.onesignal.core.internal.application.IApplicationService,com.onesignal.core.internal.time.ITime,com.onesignal.location.internal.preferences.ILocationPreferencesService,com.onesignal.user.internal.properties.PropertiesModelStore,com.onesignal.location.internal.controller.ILocationController)
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.time.ITime
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.time.impl.Time@7b5f169
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.location.internal.preferences.ILocationPreferencesService
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.location.internal.preferences.impl.LocationPreferencesService(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.preferences.impl.PreferencesService@ebc47f0
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.user.internal.properties.PropertiesModelStore
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.user.internal.properties.PropertiesModelStore(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.932 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.preferences.impl.PreferencesService@ebc47f0
2024-01-04 11:53:03.934 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.location.internal.controller.ILocationController
2024-01-04 11:53:03.934 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.device.IDeviceService
2024-01-04 11:53:03.934 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.device.impl.DeviceService(com.onesignal.core.internal.application.IApplicationService)
2024-01-04 11:53:03.934 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.934 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.location.internal.controller.ILocationController
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.location.internal.permissions.LocationPermissionController
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.location.internal.permissions.LocationPermissionController(com.onesignal.core.internal.permissions.IRequestPermissionService,com.onesignal.core.internal.application.IApplicationService)
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.permissions.IRequestPermissionService
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.permissions.impl.RequestPermissionService(com.onesignal.core.internal.application.IApplicationService)
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.937 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.user.IUserManager
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.user.internal.UserManager(com.onesignal.user.internal.subscriptions.ISubscriptionManager,com.onesignal.user.internal.identity.IdentityModelStore,com.onesignal.user.internal.properties.PropertiesModelStore,com.onesignal.core.internal.language.ILanguageContext)
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.user.internal.subscriptions.ISubscriptionManager
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.user.internal.subscriptions.impl.SubscriptionManager(com.onesignal.core.internal.application.IApplicationService,com.onesignal.session.internal.session.ISessionService,com.onesignal.user.internal.subscriptions.SubscriptionModelStore)
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.internal.session.ISessionService
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.session.internal.session.impl.SessionService(com.onesignal.core.internal.application.IApplicationService,com.onesignal.core.internal.config.ConfigModelStore,com.onesignal.session.internal.session.SessionModelStore,com.onesignal.core.internal.time.ITime)
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.application.IApplicationService
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.application.impl.ApplicationService@733554a
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.core.internal.config.ConfigModelStore
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.config.ConfigModelStore@e593687
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.session.internal.session.SessionModelStore
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.session.internal.session.SessionModelStore@e0389b4
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.time.ITime
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.time.impl.Time@7b5f169
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.user.internal.subscriptions.SubscriptionModelStore
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.user.internal.subscriptions.SubscriptionModelStore(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.938 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.preferences.impl.PreferencesService@ebc47f0
2024-01-04 11:53:03.941 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.user.internal.identity.IdentityModelStore
2024-01-04 11:53:03.941 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.user.internal.identity.IdentityModelStore(com.onesignal.core.internal.preferences.IPreferencesService)
2024-01-04 11:53:03.941 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.preferences.IPreferencesService
2024-01-04 11:53:03.941 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.core.internal.preferences.impl.PreferencesService@ebc47f0
2024-01-04 11:53:03.942 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.user.internal.properties.PropertiesModelStore
2024-01-04 11:53:03.942 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.user.internal.properties.PropertiesModelStore@8ff40aa
2024-01-04 11:53:03.942 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.core.internal.language.ILanguageContext
2024-01-04 11:53:03.942 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.core.internal.language.impl.LanguageContext(com.onesignal.user.internal.properties.PropertiesModelStore)
2024-01-04 11:53:03.942 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service class com.onesignal.user.internal.properties.PropertiesModelStore
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.user.internal.properties.PropertiesModelStore@8ff40aa
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.ISessionManager
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.session.internal.SessionManager(com.onesignal.session.internal.outcomes.IOutcomeEventsController)
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.internal.outcomes.IOutcomeEventsController
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.session.internal.outcomes.impl.OutcomeEventsController(com.onesignal.session.internal.session.ISessionService,com.onesignal.session.internal.influence.IInfluenceManager,com.onesignal.session.internal.outcomes.impl.IOutcomeEventsRepository,com.onesignal.session.internal.outcomes.impl.IOutcomeEventsPreferences,com.onesignal.session.internal.outcomes.impl.IOutcomeEventsBackendService,com.onesignal.core.internal.config.ConfigModelStore,com.onesignal.user.internal.identity.IdentityModelStore,com.onesignal.user.internal.subscriptions.ISubscriptionManager,com.onesignal.core.internal.device.IDeviceService,com.onesignal.core.internal.time.ITime)
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.internal.session.ISessionService
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.session.internal.session.impl.SessionService@9fbb811
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.internal.influence.IInfluenceManager
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Found constructor: public com.onesignal.session.internal.influence.impl.InfluenceManager(com.onesignal.session.internal.session.ISessionService,com.onesignal.core.internal.application.IApplicationService,com.onesignal.core.internal.config.ConfigModelStore,com.onesignal.core.internal.preferences.IPreferencesService,com.onesignal.core.internal.time.ITime)
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Retrieving service interface com.onesignal.session.internal.session.ISessionService
2024-01-04 11:53:03.943 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.session.internal.session.impl.SessionService@9fbb811
[...snip...]
2024-01-04 11:53:03.996 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.inAppMessages.internal.InAppMessagesManager@8c5049c
2024-01-04 11:53:03.996 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.location.internal.permissions.LocationPermissionController@ff2aea5
2024-01-04 11:53:03.997 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] Already instantiated: com.onesignal.location.internal.LocationManager@57b984f
2024-01-04 11:53:03.997 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] initWithContext: using cached user a7b09c5e-7ab1-40ed-8d88-e4b88e42be83
2024-01-04 11:53:03.997 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] OperationRepo.enqueue(operation: {"name":"refresh-user","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83"}, flush: false)
2024-01-04 11:53:03.999 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] NotificationsManager.addPermissionObserver(observer: com.onesignal.notifications.internal.listeners.DeviceRegistrationListener@428d27a)
2024-01-04 11:53:04.001 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] NotificationsManager.addPermissionObserver(observer: com.onesignal.rnonesignalandroid.RNOneSignal@9defa2b)
2024-01-04 11:53:04.001 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] LocationManager.setIsShared(value: false)
2024-01-04 11:53:04.007 12532-12639 OneSignal               com.bf.appced43b                     D  [Thread-12] ConfigModelListener: fetching parameters for appId: 95209e17-8092-4894-a52f-276ea2c66226
2024-01-04 11:53:04.007 12532-12639 OneSignal               com.bf.appced43b                     D  [Thread-12] ParamsBackendService.fetchParams(appId: 95209e17-8092-4894-a52f-276ea2c66226, subscriptionId: cdb1cb79-4d7d-4793-8026-c13ab5d8a870)
2024-01-04 11:53:04.010 12532-12615 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-2] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/android_params.js?player_id=cdb1cb79-4d7d-4793-8026-c13ab5d8a870
2024-01-04 11:53:04.011 12532-12615 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-2] HttpClient: Adding header if-none-match: W/"24ab72d6a5a6ec5d0b665af376675f9f"
2024-01-04 11:53:04.012 12532-12617 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-4] Attempted to clean 6 month old IAM data, but none exists!
2024-01-04 11:53:04.021 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870/iams
2024-01-04 11:53:04.023 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] RefreshUserOperationExecutor(operation: [{"name":"refresh-user","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83","id":"8a72ffa1-abed-443e-9e02-b79328e9027b"}])
2024-01-04 11:53:04.024 12532-12617 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-4] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/users/by/onesignal_id/a7b09c5e-7ab1-40ed-8d88-e4b88e42be83
2024-01-04 11:53:04.121 12532-12615 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-2] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/android_params.js?player_id=cdb1cb79-4d7d-4793-8026-c13ab5d8a870 - Using Cached response due to 304: {"awl_list":{},"android_sender_id":"166098764301","chnl_lst":[],"enterp":true,"outcomes":{"direct":{"enabled":true},"indirect":{"notification_attribution":{"minutes_since_displayed":60,"limit":10},"enabled":true},"unattributed":{"enabled":true}},"receive_receipts_enable":true}
2024-01-04 11:53:04.489 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870/iams - STATUS: 200 JSON: {"in_app_messages":[]}
2024-01-04 11:53:04.489 12532-12642 OneSignal               com.bf.appced43b                     D  [Thread-15] InAppMessagesManager.evaluateInAppMessages()
2024-01-04 11:53:04.490 12532-12617 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-4] HttpClient: GET apps/95209e17-8092-4894-a52f-276ea2c66226/users/by/onesignal_id/a7b09c5e-7ab1-40ed-8d88-e4b88e42be83 - STATUS: 200 JSON: {"properties":{"language":"en","timezone_id":"[REDACTED]","country":"[REDACTED]","first_active":1704272326,"last_active":1704339144,"ip":"[REDACTED]"},"identity":{"onesignal_id":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83"},"subscriptions":[{"id":"cdb1cb79-4d7d-4793-8026-c13ab5d8a870","app_id":"95209e17-8092-4894-a52f-276ea2c66226","type":"AndroidPush","token":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","enabled":true,"notification_types":1,"session_time":0,"session_count":1,"sdk":"050005","device_model":"sdk_gphone64_arm64","device_os":"13","rooted":false,"test_type":0,"app_version":"1","net_type":0,"carrier":"T-Mobile","web_auth":"","web_p256":""}]}
2024-01-04 11:53:04.491 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] OperationRepo: execute response = SUCCESS
2024-01-04 11:53:11.225 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] OperationRepo.enqueue(operation: {"name":"update-subscription","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83","subscriptionId":"cdb1cb79-4d7d-4793-8026-c13ab5d8a870","type":"PUSH","enabled":true,"address":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","status":"SUBSCRIBED"}, flush: false)
2024-01-04 11:53:11.427 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] SubscriptionOperationExecutor(operations: [{"name":"update-subscription","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83","subscriptionId":"cdb1cb79-4d7d-4793-8026-c13ab5d8a870","type":"PUSH","enabled":true,"address":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","status":"SUBSCRIBED","id":"94e57625-7368-4387-92aa-2937593907ef"}])
2024-01-04 11:53:11.431 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870 - {"subscription":{"type":"AndroidPush","token":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","enabled":true,"notification_types":1,"sdk":"050005","device_model":"sdk_gphone64_arm64","device_os":"13","rooted":false,"net_type":0,"carrier":"T-Mobile","app_version":"1"}}
2024-01-04 11:53:11.757 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870 - STATUS: 200 JSON: {}
2024-01-04 11:53:11.757 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] OperationRepo: execute response = SUCCESS
2024-01-04 11:53:23.775 12532-12620 OneSignal               com.bf.appced43b                     D  [mqt_native_modules] OperationRepo.enqueue(operation: {"name":"update-subscription","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83","subscriptionId":"cdb1cb79-4d7d-4793-8026-c13ab5d8a870","type":"PUSH","enabled":false,"address":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","status":"UNSUBSCRIBE"}, flush: false)
2024-01-04 11:53:23.977 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] SubscriptionOperationExecutor(operations: [{"name":"update-subscription","appId":"95209e17-8092-4894-a52f-276ea2c66226","onesignalId":"a7b09c5e-7ab1-40ed-8d88-e4b88e42be83","subscriptionId":"cdb1cb79-4d7d-4793-8026-c13ab5d8a870","type":"PUSH","enabled":false,"address":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","status":"UNSUBSCRIBE","id":"5debf42a-83bd-4893-b58d-84df66178d50"}])
2024-01-04 11:53:23.981 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870 - {"subscription":{"type":"AndroidPush","token":"dcZ4qAwYRxqx9Cz4OUi4le:APA91bHmuWIRMrsaXjgEiAdoFh-2Mas2w6vXwj0Fk5Yfg2BArWwqJ5XqHW3uirdknLCxp6SxvVczjLnYPyigWz5buO1rounfJLGiHE6O09HDDXOWyyWauxhGrSqMKXBUU_9EclkQQzw_","enabled":false,"notification_types":-2,"sdk":"050005","device_model":"sdk_gphone64_arm64","device_os":"13","rooted":false,"net_type":0,"carrier":"T-Mobile","app_version":"1"}}
2024-01-04 11:53:24.361 12532-12614 OneSignal               com.bf.appced43b                     D  [DefaultDispatcher-worker-1] HttpClient: PATCH apps/95209e17-8092-4894-a52f-276ea2c66226/subscriptions/cdb1cb79-4d7d-4793-8026-c13ab5d8a870 - STATUS: 200 JSON: {}
2024-01-04 11:53:24.362 12532-12640 OneSignal               com.bf.appced43b                     D  [OpRepo] OperationRepo: execute response = SUCCESS

Restarting again updates the state to reflect the correct value, but I still can't get opt-in or opt-out to subsequently update the state interactively. I wonder if something ends up in a weird state when the app gets restarted.

@nan-li
Copy link
Contributor

nan-li commented Jan 9, 2024

Hi everyone,

Thank you for your patience, continuing to report this issue, and following up with details. They are greatly appreciated. We are able to reproduce some of the behavior with optIn() not working after optOut() is called first, and are working on the fix.

I have some behavior I couldn't reproduce and would like to ask for any more details:

1. This issue @gvalenza reported:

PATCH RECEIVED JSON: {"errors":[{"code":"subscription-10","title":"Subscription can't change notification_types to positive integer while disabled"}]}

^ Are there any more logs or reproduction steps for this particular error? I understand this error, but don't understand how it can happen.

2. Maybe unrelated to the core bug: Push Subscription Change Listener / Observer

It will only fire when there is a change detected to one of the 3 properties on the push subscription: id, token, and optedIn. Are reporters seeing that it is not fired when one of those change?

3. @chriszs This may or may not be the same issue as optIn() not working.
From your logs, it looks like opting in and out are working. Are you having a problem with the push subscription event listener only? I have seen reports of the push subscription event listener not firing.

@chriszs
Copy link

chriszs commented Jan 9, 2024

@nan-li Yes, that's correct. Actually opting in and out work, the listener doesn't fire and the opted-in state doesn't update. I'll look at filing a separate issue.

@chriszs
Copy link

chriszs commented Jan 9, 2024

Moved my issue to #1625.

@oleh-mryhlod
Copy link

Hi @nan-li
Thanks for fixing the issue in the Android repository
As I can see the fix has already been included in the 5.1.1 Android OneSignal release
When can we expect the new RN OneSignal release with the fix included?

@jennantilla
Copy link
Contributor

Hello everyone! We appreciate your patience here. We recently updated the React Native SDK to include this fix. Please upgrade to 5.0.5 and let us know if you see any further issues.

Thanks!

@majaklajic
Copy link

I can still reproduce this issue on 5.0.5 and 5.0.6

@wooller
Copy link

wooller commented Feb 15, 2024

@nan-li @gvalenza

Hi both, just commeting here as i also got the same HTTP error as @gvalenza. After looking through the rest of the logs i found this

02-13 18:29:50.532  7502  7768 I OneSignal: [Thread-26] FirebaseMessaging.getToken not found, attempting to use FirebaseInstanceId.getToken
02-13 18:29:50.539  7502  7768 I OneSignal: [Thread-26] Device registered, push token = 

Which was odd, so there was obviously some difficulty getting the token via the dependency com.google.firebase:firebase-messaging

So i then checked the gradle deps of my project to see what version of firebase-message was being used and saw this

com.google.firebase:firebase-messaging:{require [19.0.0, 23.4.99]; prefer 23.4.0} -> 20.2.4

In my case, the reason why the version was being pinned at 20.2.4 was due to another package intercom-react-native which also has firebase-messaging as a dependency. My project doesn't really care about push notification support for the intercom package so i pinned the dependency like so

configurations.all {
        resolutionStrategy.force 'com.google.firebase:firebase-messaging:23.4.0'
    }

After doing this, the one-signal sdk was able to get the token from firebase and i no longer saw that http error message and that seemed to fix a bunch of other problems i was having, like the dashboard not registering that the user had granted the PN permission

I thought i would post this, just in case its helpful!

@nan-li
Copy link
Contributor

nan-li commented Feb 15, 2024

Hi @wooller, awesome, thank you so much for giving us such detailed information!

We were suspecting firebase dependency but had no real confirmation about the differences on an older vs newer version of firebase messaging, so this is extremely helpful.

We recently bumped the dependency com.google.firebase:firebase-messaging preferred by the SDK from '23.0.8' to '23.4.0', but I wonder if the previous version was actually sufficient and other dependencies were forcing a lower version 🤔.

@mikepaszkiewicz
Copy link

@nan-li upgrading to [email protected] alone didn't fix the issue for us. however, when we applied the gradle change suggested by @wooller, it worked

android/build.gradle

configurations.all {
        resolutionStrategy.force 'com.google.firebase:firebase-messaging:23.4.0'
}

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