Skip to content

chore: merge release into master #4298

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 11 commits into from
Jan 18, 2019
Merged

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Jan 18, 2019

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

rosen-vladimirov and others added 11 commits January 15, 2019 14:08
In case you open Chrome DevTools and close them while the iOS runtime still sends messages, an error is raised in CLI:
```
Error: WebSocket is not open: readyState 2 (CLOSING)
```

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.
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
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:
 - first 4 bytes contain the lenght of the message (in Big-Endian)
 - the next bytes are the actual message

Currently, the following behavior is observed:
 - when a full message is received, CLI sends it correctly to Chrome DevTools
 - when more than one message is received in the data, CLI sends only the first message to Chrome DevTools and disregards the other part
 - in case a split message is received, when the first part is only part of the first 4 bytes (part of the length), CLI fails with `Index out of Range` or `ERR_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`.
…f-range-debug

fix: errors during debug on iOS
In case you use `tns run ios --path <path to app> --device <simulator GUID>`, CLI will try to stop the application, but may kill CLI instead. The problem is in ios-sim-portable, which incorrectly searches for application PID. Update the package to 4.0.7 where the issue is fixed.
fix: trying to stop app on simulator may kill CLI
On slower mac machines, an error may be raised during restart of app on iOS Simulator. The problem is that we stop the application and try to start it after that. However, the stop method may be resolved before the application is actually killed. Trying to start it after that leads to undefined behavior and errors in some cases.
To fix this, update ios-sim-portable to 4.0.8 where a possible fix is applied.
…p-app

fix: error may be raised during restart of app on ios Sim
@DimitarTachev DimitarTachev merged commit 6f646a9 into master Jan 18, 2019
@DimitarTachev DimitarTachev deleted the fatme/merge-release-511 branch January 18, 2019 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants