fix: tns debug ios command fails in some cases #3986
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tns debug ios --start
andtns 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.