Linking.getInitialURL not resetting data after closing app

Please provide the following:

  1. SDK Version: 40.0.0
  2. Platforms(Android/iOS/web/all): IOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on. expo-linking

I am running Linking.getInitialUrl() in the constructor of my home screen. It works as expected when someone uses a deep link to open my app, which navigates the user to a specific screen based on the query params. The problem is that if the user closes and re-opens the app, getInitialUrl() does not reset, in other words, it returns the same path and query params every time the app is opened, regardless if the user clicked a link or not, resulting in my app wrongly navigating every time it’s opened

Shouldn’t the data from getInitialUrl() reset when the user closes the app?

Here is the function i call in the constructor:

handleInitialUrl = async () => {

        .then(url => {

            let { path, queryParams } = Linking.parse(url);
             // const { faceId, climbId } = queryParams;
             // navigate to screen

        .catch(err => alert(err));


Same is happening in my project as well. @notbrent Please let us know about this issue

post a reproducible example to a github issue if you believe you have found a bug, include clear steps we can follow to reproduce.

the data from getInitialUrl is indeed dependent entirely on how the app was launched

1 Like

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