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

Linking.openURL within Headless JS task will remount the entire app #21610

Closed
3 tasks done
rcidt opened this issue Oct 9, 2018 · 5 comments
Closed
3 tasks done

Linking.openURL within Headless JS task will remount the entire app #21610

rcidt opened this issue Oct 9, 2018 · 5 comments
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@rcidt
Copy link

rcidt commented Oct 9, 2018

Environment

React Native Environment Info:
   System:
     OS: macOS High Sierra 10.13.6
     CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
     Memory: 38.88 MB / 16.00 GB
     Shell: 5.3 - /bin/zsh
   Binaries:
     Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node
     Yarn: 1.3.2 - ~/.nvm/versions/node/v8.9.4/bin/yarn
     npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm
     Watchman: 4.9.0 - /usr/local/bin/watchman
   SDKs:
     iOS SDK:
       Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
     Android SDK:
       Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 27.0.2, 27.0.3
       API Levels: 23, 25, 26, 27
   IDEs:
     Android Studio: 3.0 AI-171.4443003
     Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
   npmPackages:
     react: 16.3.1 => 16.3.1
     react-native: 0.57.0 => 0.57.0
   npmGlobalPackages:
     react-native-cli: 2.0.1
     react-native-create-library: 3.1.2
     react-native-rename: 2.2.2
     react-native-version-up: 1.0.8

Description

I am starting a Headless JS task when I receive a push notification when the app is in not in foreground. In my Headless JS task I perform some logic and then I will use Linking.openURL('myapp://myapp') to launch the app.

In cases where the app is running in the background, the Linking.openURL will bring the app to foreground, but it will remount the entire app, as if I was launching it for the first time.

This would be fine, as long as the "old" app to be unmounted, but it's as if the "old" app is also running, so all my event listeners and react lifecycle methods run double. As if I was running two instances of the app simultaneously.

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@stale
Copy link

stale bot commented Jan 20, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 20, 2019
@hramos hramos removed the 🔶APIs label Jan 24, 2019
@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 24, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@orta
Copy link
Contributor

orta commented Mar 19, 2019

I'm not sure how to make a reproduction case for this, @rcidt - is there any chance you can make something simple, it'd make it much easier to diagnose

@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

4 participants