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.
fix: error is raised when DevTools are closed while sending message
In case you open Chrome DevTools and close them while the iOS runtime still sends messages, an error is raised in CLI:
The problem is that we are using Transform stream between the communication and close event of the socket is not raised until the stream flushes its current state.
Fix it by skipping the write operation in case the socket is not in OPEN state.
chore: update ios-device-lib to 0.5.0
Update ios-device-lib to 0.5.0, so we can use the new fixes and features: https://github.com/telerik/ios-device-lib/releases/tag/v0.5.0
6bb7f8b
fix: Chrome debug messages from iOS Runtime are not parsed correctly
During debug operation, iOS Runtime "talks" to Chrome DevTools. CLI stands as proxy between them and translates the messages. Due to Node.js socket implementation, some messages may come on chunks.
The format of each message is:
Currently, the following behavior is observed:
Index out of Range
orERR_BUFFER_OUT_OF_BOUNDS
error (based on the inner state of the variables).To fix this behavior, remove CLI's parsing and reuse the one from
ios-device-lib
.PR Checklist
Related to issues: