Skip to content

Unable to reconnect to iOS Simulator when debugging #3840

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

Closed
rosen-vladimirov opened this issue Aug 24, 2018 · 1 comment
Closed

Unable to reconnect to iOS Simulator when debugging #3840

rosen-vladimirov opened this issue Aug 24, 2018 · 1 comment
Assignees
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

Tell us about the problem

During tns debug ios on iOS Simulator, in case you apply a change in the code, the application is restarted and Chrome DevTools are disconnected. After CLI prints a new URL, you should reconnect the DevTools. In case you try to connect immediately when CLI prints the URL, the DevTools will not connect.
This is not a big issue for CLI, but it breaks the behavior in VSCode extension and NativeScript Sidekick, which refresh the DevTools on their own immediately when they receive the new URL. This breaks the debug behavior in these two clients.

Which platform(s) does your issue occur on?

iOS (specifically on Simulator)

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.2.2
  • Cross-platform modules: Not applicable
  • Runtime(s): latest 4.2.x
  • Plugin(s): Not applicable

Please tell us how to recreate the issue in as much detail as possible.

The easiest way is to use NativeScript Sidekick.
Try run on simulator with Start Debugger enabled. After it starts, apply a change in your code. When CLI LiveSyncs, the DevTools will be refreshed, you'll see again the Reconnect Dev Tools button and in the output pane you'll see:

Frontend client connected.
Backend socket created.
Backend socket closed.
Fronted client closed.

Instead, you should see only the first two messages.

Another way to reproduce it is to use CLI:

  1. tns debug ios
  2. Open the URL
  3. Apply a change in the code
  4. Immediately when you see a new URL in CLI's output refresh the browser - it should reconnect, but instead it fails.
@rosen-vladimirov
Copy link
Contributor Author

Fixed in #3837

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants