-
-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 5.1.0
- Cross-platform modules: 5.1.0
- Android Runtime: 5.1.0
- iOS Runtime: Not applicable
- Plugin(s): Not applicable
Describe the bug
When debugging on Android, if you've stopped on a breakpoint and apply a change in .xml
/.css
/.html
file, the change will be synced, but CLI will stuck on Sync operation in progress...
for a while and after that an error will be shown: Unable to apply changes for device: <device id>. Error is: Sync operation is taking too long.
To Reproduce
tns create myApp --js
cd myApp
tns debug android
- When CLI prints a Chrome URL, open it in the browser.
- Place a breakpoint on line 17 of
main-view-model.js
(inside theonTap
method:this.counter--;
) - Tap the button on the Android device - Chrome DevTools should stop on the breakpoint.
- While you've stopped on the breakpoint, open your project in VSCode.
- Open
main-page.xml
in VSCode and change the title of theActionBar
from:
<ActionBar title="My App" icon="" class="action-bar">
to
<ActionBar title="My App 2" icon="" class="action-bar">
- Save the file
- Now check your terminal. CLI will print the following messages:
Executing before-shouldPrepare hook from <path to hook>
Preparing project...
Executing before-prepareJSApp hook from <path to hook>
Project successfully prepared (Android)
Executing after-prepare hook from <path to hook>
Successfully transferred main-page.xml on device <device id>.
Sync operation in progress...
Sync operation in progress...
Sync operation in progress...
Sync operation in progress...
Sync operation in progress...
Unable to apply changes for device: <device id>. Error is: Sync operation is taking too long.
Executing after-watch hook from <path to hook>
Stopping webpack watch
Expected behavior
CLI should sync the change and allow you to continue debugging.
Additional context
Issue is not reproducible in case you've not stopped on breakpoint.