Skip to content

fix: tns debug ios command fails in some cases #3986

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

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

@rosen-vladimirov rosen-vladimirov commented Oct 8, 2018

tns debug ios --start and tns debug ios --inspector command fails in some cases as CLI is not able to get the debug port from the device logs. The problem is that ios-sim-portable starts the log process with child_process.spawn, but this does not start the actual process. Fix the case by waiting for the first message on the stdout of the log process (handled in ios-sim-portable). This way the actual logic that parses the logs will start after the process has really started.

Fix a case where we fail the connection to socket with undefined error - show correct error in such case.
Fix tns device log command of iOS devices/simulators - it must show full logs from device, but instead a predicate had been passed. Remove it from there and pass it only where required.

PR Checklist

What is the current behavior?

tns debug ios --start fails.
tns debug ios --inspector fails.

What is the new behavior?

tns debug ios --start works.
tns debug ios --inspector works.

`tns debug ios --start` and `tns debug ios --inspector` command fails in some cases as CLI is not able to get the debug port from the device logs. The problem is that ios-sim-portable starts the log process with child_process.spawn, but this does not start the actual process. Fix the case by waiting for the first message on the stdout of the log process (handled in ios-sim-portable). This way the actual logic that parses the logs will start after the process has really started.

Fix a case where we fail the connection to socket with `undefined` error - show correct error in such case.
Fix `tns device log` command of iOS devices/simulators - it must show full logs from device, but instead a predicate had been passed. Remove it from there and pass it only where required.
@rosen-vladimirov rosen-vladimirov merged commit 535471f into master Oct 8, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-debug-commands branch October 8, 2018 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants