OneSignal-Flutter-SDK icon indicating copy to clipboard operation
OneSignal-Flutter-SDK copied to clipboard

[Bug]: After upgrading to >5.0.0, all subscription Ids are now empty strings or null for iOS devices.

Open temcewen opened this issue 1 year ago • 17 comments
trafficstars

What happened?

The latest versions of the SDK have completely broken notifications for our app. All subscription ids are now empty strings, and there are no notifications being received by new devices. We upgraded from 5.0.0 to several different versions including 5.1.2 and 5.2.0, none of them have worked.

We had this working before the upgrade, after the upgrade, it's completely broken.

We've tried waiting over 5 minutes in case it needed time to make the calls and get the ID, but it just doesn't ever set it to anything other than an empty string.

Screenshot 2024-05-16 at 9 44 01 PM

Steps to reproduce?

Install the new SDKs.
Use an iOS device (doesn't work for any of them).
Try using OneSignal and follow all the instructions in the dev docs exactly.
The subscription id will be an empty string.

What did you expect to happen?

I expected the subscription id to have a UUID.

OneSignal Flutter SDK version

5.2.0

Which platform(s) are affected?

  • [X] iOS
  • [ ] Android

Relevant log output

flutter: The Dart VM service is listening on http://127.0.0.1:62815/Yaka3go9wf4=/
FATAL: OneSignal AppId: (null) - AppId is null or format is invalid, stopping initialization.
Example usage: 'b2f7f966-d8cc-11e4-bed1-df8f05be55ba'
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...
fopen failed for data file: errno = 2 (No such file or directory)
Errors found! Invalidating cache...
VERBOSE: startLocationSharedWithFlag called with status: 0
VERBOSE: startLocationSharedWithFlag set false, clearing last location!
VERBOSE: oneSignalDidRegisterForRemoteNotifications:deviceToken:
INFO: Device Registered with Apple: bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
VERBOSE: OSOperationRepo enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: address value: Optional("bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff")>
VERBOSE: firePushSubscriptionChanged from {
    id = "";
    optedIn = 0;
    token = "";
} to {
    id = "";
    optedIn = 0;
    token = bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff;
}
VERBOSE: OSOperationRepo enqueueDelta: <OSDelta OS_UPDATE_SUBSCRIPTION_DELTA with property: notificationTypes value: -18>
VERBOSE: OneSignal.startNewSessionInternal
DEBUG: Outcomes cleared for current session
DEBUG: OneSignal SessionManager restartSessionIfNeeded with entryAction:: 2 channelTrackers: (
)
DEBUG: OneSignal SessionManager sendSessionEndingWithInfluences with influences: (
)
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
VERBOSE: OneSignalUserManagerImpl starting new session
VERBOSE: OSUserExecutor.executePendingRequests called with queue [<OSRequestCreateUser with externalId: nil>]
WARNING: OneSignalUserManagerImpl.startNewSession() is unable to fetch user with External ID nil due to null OneSignal ID
VERBOSE: ForegroundLifecycleListener added successfully
VERBOSE: application/scene willResignActive
VERBOSE: OSMessagingController onPushSubscriptionDidChange: changed to nil subscription id
VERBOSE: application/scene didBecomeActive
DEBUG: Application Foregrounded started
DEBUG: cancelFocusCall of {
}
DEBUG: shouldStartNewSession:timeSinceLastClosed: 1715918803.293014
DEBUG: shouldStartNewSession:timeSinceInitialization: 0.438216
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
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: network response (OSRequestGetIosParams) with URL https://api.onesignal.com/apps/5a17626a-ab83-4c30-b9c2-38a454fb14a1/ios_params.js: {
    httpStatusCode = 200;
    outcomes =     {
        direct =         {
            enabled = 0;
        };
        indirect =         {
            enabled = 0;
            "notification_attribution" =             {
                limit = 10;
                "minutes_since_displayed" = 60;
            };
        };
        unattributed =         {
            enabled = 0;
        };
    };
    "receive_receipts_enable" = 0;
    "require_email_auth" = 1;
    "require_user_id_auth" = 1;
    "uses_provisional_auth" = 0;
}
VERBOSE: network response (OneSignalUser.OSRequestCreateUser) with URL https://api.onesignal.com/apps/5a17626a-ab83-4c30-b9c2-38a454fb14a1/users: {
    errors =     (
                {
            code = "auth-1";
            title = "This operation requires 'Authorization' in the HTTP header";
        }
    );
    httpStatusCode = 401;
}
ERROR: OSUserExecutor create user request failed with error: Optional(Error Domain=OneSignalError Code=401 "(null)" UserInfo={returned={
    errors =     (
                {
            code = "auth-1";
            title = "This operation requires 'Authorization' in the HTTP header";
        }
    );
    httpStatusCode = 401;
}})
DEBUG: OSOperationRepo not flushing queue due to being paused
VERBOSE: Notification click listener added successfully
VERBOSE: requestPermission Called
VERBOSE: Firing registerForRemoteNotifications
VERBOSE: oneSignalDidRegisterForRemoteNotifications:deviceToken:
INFO: Device Registered with Apple: bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff
VERBOSE: application/scene willResignActive
DEBUG: Application Backgrounded started
DEBUG: TimeProcessor <OSUnattributedFocusTimeProcessor: 0x300a24720> for session attributed 0
DEBUG: sendOnFocusCall unattributed with totalTimeActive 6.259518
DEBUG: OSBaseFocusTimeProcessor hasMinSyncTime getMinSessionTime: 60 activeTime: 6.259518
DEBUG: unattributed influence saveUnsentActiveTime 6.259518
DEBUG: OSOperationRepo not flushing queue due to being paused
DEBUG: OSOperationRepo not flushing queue due to being paused
VERBOSE: updateNotificationTypes called: 15
VERBOSE: Firing registerForRemoteNotifications
VERBOSE: startedRegister: 1
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
VERBOSE: firePushSubscriptionChanged from {
    id = "";
    optedIn = 0;
    token = bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff;
} to {
    id = "";
    optedIn = 1;
    token = bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff;
}
VERBOSE: OSMessagingController onPushSubscriptionDidChange: changed to nil subscription id
VERBOSE: oneSignalDidRegisterForRemoteNotifications:deviceToken:
INFO: Device Registered with Apple: bba61b947a90c1588faa83ca8b106656dea2537f7b55e1acb719dc7c806c57ff
flutter: OneSignal subscription changed.
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: application/scene didBecomeActive
DEBUG: Application Foregrounded started
DEBUG: cancelFocusCall of {
    "NOT_ATTRIBUTED" = "<OSUnattributedFocusTimeProcessor: 0x300a24720>";
}
DEBUG: shouldStartNewSession:timeSinceLastClosed: 6.965471
DEBUG: shouldStartNewSession:timeSinceInitialization: 13.368212
VERBOSE: getNotificationTypes:mSubscriptionStatus: -1
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: (
)
DEBUG: OSOperationRepo not flushing queue due to being paused

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

temcewen avatar May 17 '24 02:05 temcewen