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

“Apns Delegate Never Fired” OneSignal error with Expo 42 to Expo 43 migration #1340

Closed
jkeane889 opened this issue Dec 16, 2021 · 5 comments
Assignees

Comments

@jkeane889
Copy link

Hi One Signal Team,

Thanks in advance for your help with this issue. Just wanted to create a new ticket surrounding our team’s ongoing issue with OneSignal 4 and Expo 43. We recently upgraded our React Native package to begin using Expo 43 along with all of it’s updated APIs from Expo 42.

We upgraded to Expo 43 about 2 weeks ago and have been receiving “Apns Delegate Never Fired” errors in our production environment in our OneSignal dashboard. We have had users note they’ve been receiving push notifications sporadically or not at all to their devices.

We went ahead and followed the remedial steps listed here in One Signal’s documentation for “Apns Delegate Never Fired” issues: https://documentation.onesignal.com/docs/troubleshooting-ios#apns-delegate-never-fired

Unfortunately, none of the listed steps included in the link above seemed to solve our issue and we had to downgrade back to Expo 42 to get push notifications with One Signal working again.

We have not been able to determine the root cause of this issue, but we believe it relates to the iOS reconfigurations for Expo 43.

Specific for Expo 43, we had to reconfigure our iOS “AppDelegate.m” configuration to accommodate for the new “expo-modules” (which are to replace “react-native-unimodules” going forward).

For reference, please see the Expo 43 upgrade announcement here: https://blog.expo.dev/expo-sdk-43-aa9b3c7d5541

Please see the Expo 43 migration guide here for iOS from “react-native-unimodules” to “expo-modules”: https://github.com/expo/fyi/blob/main/expo-modules-migration.md#ios (this is linked in the same announcement article above)

[Repro Steps]

Please see our potential repro steps (the below assumes you have appropriate iOS provisioning profiles for push notifications and related XCode certificates for development for a new project):

  1. Install the “Expo-CLI” tool to your local machine: npm install --global expo-cli
  2. Create a new Expo application using expo init my-app (see documentation here for Expo: https://docs.expo.dev/get-started/create-a-new-app/)
  3. Select “minimal” as the Expo option when creating a new Expo app
  4. Run “expo-eject” to have Expo generate corresponding Android & iOS native code bases for your project (see Expo eject documentation here: https://docs.expo.dev/expokit/eject/)
  5. Check in your “package.json” that you are using Expo 43 (e.g. "expo": "^43.0.3”)
  6. Go ahead and migrate to using “expo-modules” if not already installed: https://github.com/expo/fyi/blob/main/expo-modules-migration.md
  7. Go ahead and install the OneSignal React Native SDK into your new bare Expo project: https://documentation.onesignal.com/docs/react-native-sdk-setup
  8. Try to send yourself push notifications to your new Expo/React Native application to your physical device

[Environment]

  • iOS 15.1/15.2 (physical devices running iOS 15+)
  • Xcode Version 13.2

[Stack Trace]

Please see our Xcode logs here on start of our application which leads to our “Apns Delegate Never Fired” error: https://pastebin.com/QMfyew8E

Additionally, please see our Podfile configuration as well for our project: https://pastebin.com/c0Ee1MpM

Please let me know if there is any additional information your team may need from us.

Thanks!

@rgomezp
Copy link
Contributor

rgomezp commented Dec 28, 2021

Howdy Jonathan,
Thanks for the detailed issue. If the only thing that changed was the Expo version, this may take some time to figure out what is breaking the issue and how we should update the SDK to ensure compatibility.

Off the bat, I see your Podfile is using the OneSignal pod. The Pod we now use is an XCFramework and should be included as follows:

target 'OneSignalNotificationServiceExtension' do
  pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end

Furthermore, I didn't see a mention of the OneSignal Expo Plugin that is now available in beta. Is this something you have tried using? You can avoid having to interrupt your workflow to eject by using this new plugin.

Thanks for your patience while we continue investigating. In the meantime, perhaps try the above recommendations if they are suitable for your project.

p.s. is MostDays ever going to be available for Android users?

@rgomezp rgomezp transferred this issue from OneSignal/OneSignal-iOS-SDK Dec 28, 2021
@jkeane889
Copy link
Author

thanks @rgomezp - we did try to update to using the OneSignalXCFramework but still ran into the same issue. And yes on the Android side soon!

@rgomezp
Copy link
Contributor

rgomezp commented Jun 3, 2022

Howdy @jkeane889 ,
Can you please provide us an update on whether you were able to resolve? Can we close this issue?

The Expo plugin is now out of beta and we did make some improvements and bug fixes to it so please make sure you upgrade to the latest version.

Cheers

@kesheshyan
Copy link
Contributor

Closing because of no response. Feel free to reopen if the issue persists.

@jkasten2
Copy link
Member

There is a possibility this “Apns Delegate Never Fired” issue could have been related to a Swizzling issue your app code and / or another SDK interfering. A number improvements have been in the react-native-onesignal 4.3.11 release which may have fix this issue.

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

4 participants