Description
What happened?
Multiple users have experienced this: on initial prompt for notification permission, the user taps Allow. Immediately, the panel which states "Open Settings" - "You currently have notifications turned off for this application. You can open Settings to re-enable them" appears.
Going into settings, notifications have successfully enabled for the app.
The code has not been altered in months (prior to the issue), but these reports have cropped up in the last 2-3 weeks.
Flutter code:
OneSignal.initialize("606dfb59-c107-4a56-968b-3ba657177a16");
/* other app initialization code */
bool accepted = await OneSignal.Notifications.requestPermission(true);
The verbose debug logs are pasted below. Note that while the logs might reference an earlier version of the OS SDK, I am currently testing 5.3.2 with no change in behavior.
All potential PII info (app id, token id, sub id) has been replaced in the log.
I am happy to provide any other information required.
Steps to reproduce?
1. Version 5.3.2 installed.
2. iOS user (version 18.5, at least) opens app.
3. After user login, the app calls the above Flutter code to request permission.
4. User accepts
5. Immediately, panel suggesting that the user did not accept appears.
6. User can confirm in iOS settings that the notifications are allowed.
What did you expect to happen?
The second modal should not appear.
OneSignal Flutter SDK version
3.5.2
Which platform(s) are affected?
- iOS
- Android
Relevant log output
VERBOSE: updateNotificationTypes called: 15
VERBOSE: Firing registerForRemoteNotifications
VERBOSE: startedRegister: 1
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
VERBOSE: firePushSubscriptionChanged from {
id = “SUB_ID";
optedIn = 0;
token = TOKEN;
} to {
id = “SUB_ID”;
optedIn = 1;
token = TOKEN;
}
VERBOSE: OSMessagingController onPushSubscriptionDidChange: changed to the same subscription id
VERBOSE: OSOperationRepo enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: enabled value: true>
VERBOSE: OSOperationRepo enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: notificationTypes value: 31>
VERBOSE: oneSignalDidRegisterForRemoteNotifications:deviceToken:
INFO: Device Registered with Apple: TOKEN
VERBOSE: application/scene didBecomeActive
DEBUG: Application Active started
DEBUG: cancelFocusCall of {
"NOT_ATTRIBUTED" = "<OSUnattributedFocusTimeProcessor: 0x1066d99a0>";
}
DEBUG: shouldStartNewSession:timeSinceLastClosed: 10.034358
DEBUG: shouldStartNewSession:timeSinceInitialization: 43.593288
DEBUG: OneSignal SessionManager attemptSessionUpgrade with entryAction: 1
DEBUG: OneSignal SessionManager attemptSessionUpgrade try UNATTRIBUTED to INDIRECT upgrade
DEBUG: OSChannelTracker for: notification_id lastChannelObjectReceived: (null)
DEBUG: OSChannelTracker for: iam_id lastChannelObjectReceived: (null)
DEBUG: Trackers after update attempt: (
"OSChannelTracker tag: notification_id influenceType: UNATTRIBUTED indirectIds: (null) directIds: (null)",
"OSChannelTracker tag: iam_id influenceType: UNATTRIBUTED indirectIds: (null) directIds: (null)"
)
DEBUG: OneSignal SessionManager sendSessionEndingWithInfluences with influences: (
)
VERBOSE: OSOperationRepo flushDeltaQueue in background: false with queue: [<OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: enabled value: true>, <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: notificationTypes value: 31>]
VERBOSE: OSSubscriptionOperationExecutor enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: enabled value: true>
VERBOSE: OSSubscriptionOperationExecutor enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: notificationTypes value: 31>
VERBOSE: OSSubscriptionOperationExecutor processDeltaQueue with queue: [<OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: enabled value: true>, <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: notificationTypes value: 31>]
VERBOSE: HTTP Request (OneSignalUser.OSRequestUpdateSubscription) with URL: https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID, with parameters: {
"subscription" : {
"app_version" : "1.5.17",
"sdk" : "050210",
"enabled" : true,
"notification_types" : 31,
"device_os" : "18.5",
"token" : "TOKEN"
}
} and headers: (null)
VERBOSE: HTTP Request (OneSignalUser.OSRequestUpdateSubscription) with URL: https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID, with parameters: {
"subscription" : {
"sdk" : "050210",
"device_os" : "18.5",
"enabled" : true,
"token" : "TOKEN",
"notification_types" : 31,
"app_version" : "1.5.17"
}
} and headers: (null)
VERBOSE: network request (OneSignalUser.OSRequestUpdateSubscription) with URL https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID and headers: (null)
VERBOSE: network response (OneSignalUser.OSRequestUpdateSubscription) with URL https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID: {
headers = {
"Access-Control-Allow-Origin" = "*";
"Alt-Svc" = "h3=\":443\"; ma=86400";
"Content-Encoding" = br;
"Content-Type" = "application/json; charset=utf-8";
Date = "Thu, 15 May 2025 07:26:08 GMT";
Priority = "u=3,i=?0";
Server = cloudflare;
"Strict-Transport-Security" = "max-age=15552000; includeSubDomains";
Via = "1.1 google";
"access-control-allow-headers" = "SDK-Version,Content-Type,Origin,Authorization,OneSignal-Subscription-Id";
"cf-cache-status" = DYNAMIC;
"cf-ray" = "9400e7c60f7ce3a5-NRT";
"server-timing" = cfExtPri;
traceparent = "00-cb0e4cc4b09b26b5b3d087fdb2bd99f8-3543bc1a4e3654c0-00";
};
httpStatusCode = 200;
"ryw_delay" = 500;
"ryw_token" = 10000000012190243310;
}
VERBOSE: network request (OneSignalUser.OSRequestUpdateSubscription) with URL https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID and headers: (null)
VERBOSE: network response (OneSignalUser.OSRequestUpdateSubscription) with URL https://api.onesignal.com/apps/APP_ID/subscriptions/SUB_ID: {
headers = {
"Access-Control-Allow-Origin" = "*";
"Alt-Svc" = "h3=\":443\"; ma=86400";
"Content-Encoding" = br;
"Content-Type" = "application/json; charset=utf-8";
Date = "Thu, 15 May 2025 07:26:08 GMT";
Priority = "u=3,i=?0";
Server = cloudflare;
"Strict-Transport-Security" = "max-age=15552000; includeSubDomains";
Via = "1.1 google";
"access-control-allow-headers" = "SDK-Version,Content-Type,Origin,Authorization,OneSignal-Subscription-Id";
"cf-cache-status" = DYNAMIC;
"cf-ray" = "9400e7c60f78e3a5-NRT";
"server-timing" = cfExtPri;
traceparent = "00-d3d92dd6f82f1a15a106c0700f27d7c9-575d214705411160-00";
};
httpStatusCode = 200;
"ryw_delay" = 500;
"ryw_token" = 10000000012190243311;
}
Code of Conduct
- I agree to follow this project's Code of Conduct