App crash on IOS after tapping notification

Please provide the following:

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): iOS (Device iPhone XS v14.4)
  3. Add the appropriate “Tag” based on what Expo library you have a question on: expo-notifications

Notifications are working as expected for foreground and background. But if the app is killed, tapping the notification will open the app and crash right away. This happens in the standalone build.

Also noticed while the app is running inside the expo client, and if the app is killed, tapping a notification will open expo client app but not the app itself.

Is anyone having the same problem? Is there also a way to get the crash report?

Hey @luisdonascimento, have you been able to reproduce this with a newly created app as well? Curious if it’s something specific to your current project or with the module/expo environment itself.


Hey @adamjnav, we finally figured out what the problem was.

The app was only crashing when the user was logged in and closed the app before interacting with the notification.

Inside our addNotificationResponseReceivedListener we have a call to navigate to a specific screen but at that time the Stack Navigator with that screen wasn’t mounted. We check in App.js if the user is logged in and render the appropriate navigator, but by default isLoggedIn is set to false.

For Android the problem didn’t occur because there’s some caching out of the box when building the standalone app.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.