Deep linking not working on testflight

I’ve set up linking within expo, and it works completely as expected and the correct screen opens, when I push it to Testflight I expect it to open a specific screen but it just stays on the initial screen. Has anyone else had an issue with this?

So for example I go to myapp://–/payment I expect to land on the payment screen but this only works in the Expo simulator.

For reference here is my code:

  componentDidMount() {
        notificationsClient.notifications()

        //Deeplinking
        Linking.getInitialURL().then((initialUrl) => {
            if (initialUrl) {
                console.log('If app openened handle deeplink >>>', initialUrl)
                this._handleDeeplink({ url: initialUrl })
            }
        })

        Linking.addEventListener('url', this._handleDeeplink)
    }
    _handleDeeplink = async ({ url }) => {
        let { path, queryParams } = Linking.parse(url)

        console.log('handling deeplink with', path, queryParams, url)
        Sentry.captureException({
            message: `handling deeplink for path ${path}`,
            queryParams,
        })

        Sentry.withScope(function (scope) {
            scope.setExtras(
                `handling deeplink for path ${path} ${queryParams}`
            )
            scope.setLevel(Sentry.Severity.Fatal)
            Sentry.captureException(
                new Error(
                    `handling deeplink for path ${path}, ${queryParams}`
                )
            )
        })

        if (path === '--/payment') {
            // Payment
            this.props.userHasPremiumRole
                ? console.log(
                      'Not redirecting to payment as user already has a premium role'
                  )
                : this.props.navigation.navigate('PaymentScreen')
      
        }
    }

I have Sentry logging set up and this is the error I receive:

Non-Error exception captured with keys: code, message

and also:

Non-Error exception captured with keys: message, queryParams, url

Any help or advice would be greatly appreciated :slight_smile:

If you are in a bare project, did you check this : [expo-linking] Bare app doesn't fire url event listener if app is already open. · Issue #9304 · expo/expo · GitHub ?