Skip to content

TNS run endless deployment loop #3017

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

Closed
thaoula opened this issue Jul 29, 2017 · 14 comments · Fixed by NativeScript/nativescript-dev-less#6
Closed

TNS run endless deployment loop #3017

thaoula opened this issue Jul 29, 2017 · 14 comments · Fixed by NativeScript/nativescript-dev-less#6

Comments

@thaoula
Copy link

thaoula commented Jul 29, 2017

Hi Guys,

I am experiencing some issues where TNS run gets stuck in an endless loop deploying changes to the simulator.

This generally happens when TNS run is already watching an app and you make changes. The changes will be copied to the app over and over. You have to kill the terminal to break out of the loop.

I cannot reproduce all the time it but it happens frequently.

I am using TNS 3.1.3 on a Mac. I have seen the issue on IOS and Android simulators.

Regards,
Tarek

@thaoula
Copy link
Author

thaoula commented Jul 31, 2017

This is an example

CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (iOS)
Successfully transferred app.css.
Successfully transferred login.component.css.
Refreshing application...
Successfully synced application au.xxx.xxx.xxx on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-less.js
Jul 31 12:18:33 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae63810380> registered
Jul 31 12:18:33 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae60f02310> registered
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (iOS)
Successfully transferred login.component.css.
Successfully transferred app.css.
Refreshing application...
Successfully synced application au.xxx.xxx.xxx on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-less.js
Jul 31 12:18:36 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae6390ffa0> registered
Jul 31 12:18:36 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae63a02d40> registered
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (iOS)
Successfully transferred app.css.
Successfully transferred login.component.css.
Refreshing application...
Successfully synced application au.xxx.xxx.xxx on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-less.js
Jul 31 12:18:38 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae60c169a0> registered
Jul 31 12:18:38 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae63a0b100> registered
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (iOS)
Successfully transferred app.css.
Successfully transferred login.component.css.
Refreshing application...
Successfully synced application au.xxx.xxx.xxx on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-less.js
Jul 31 12:18:41 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae6390c8f0> registered
Jul 31 12:18:41 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae60c16a50> registered
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Executing before-prepare hook from /Users/xxx/Projects/xxx/xxx/xxx-mobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (iOS)
Successfully transferred app.css.
Successfully transferred login.component.css.
Refreshing application...
Successfully synced application au.xxx.xxx.xxx on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
Skipping prepare.
Jul 31 12:18:43 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae60c1af80> registered
Jul 31 12:18:44 Tareks-MacBook-Pro CoreSimulatorBridge[94097]: Pasteboard change listener callback port <NSMachPort: 0x7fae60c1b030> registered
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/components/side-menu/side.menu.component.js:17:20: null
Successfully transferred app.css.
Successfully transferred login.component.css.
Refreshing application...
Successfully synced application on device XX697F39-XXXX-XXXX-AE0C-0A1745361B89.
CONSOLE LOG file:///app/tns_modules/@angular/core/./bundles/core.umd.js:3053:20: Angular is running in the development mode. Call enableProdMode() to enable the production mode.

@dtopuzov
Copy link
Contributor

dtopuzov commented Jul 31, 2017

Hi @thaoula

Can you please specify node and npm version on your machines and post package.json of your project?
I suppose the issue is cased by some 3rd party nativescript plugin.
Do you experience the same issue with hello-world project?

@thaoula
Copy link
Author

thaoula commented Jul 31, 2017

Hi @dtopuzov,

I am using npm 5.3.0 and node 8.

For plugins, I am using -

  • Telerik UI for Nativescript Pro
  • nativescript-dev-less (for processing less files)

Regards,
Tarek

@jogboms
Copy link

jogboms commented Aug 2, 2017

Actually experiencing the same issue. was able to narrow it down to nativescript-dev-sass and it only affects my iOS builds.

@dtopuzov
Copy link
Contributor

dtopuzov commented Aug 2, 2017

Can you try with npm4 (easy way to downgrade is npm i -g npm@4)?
I suppose nativescript-dev-sass is not compatible with npm5.
If that is the case I think it will be better to move the issue to nativescript-dev-sass repo.

@jogboms
Copy link

jogboms commented Aug 3, 2017

@dtopuzov

npm --v 4.6.1

@jogboms
Copy link

jogboms commented Aug 5, 2017

@thaoula @dtopuzov, It turns out the issue i had involved node-sass leaving behind running processes in the background even after killing the main tns debug process. This means i'd have to kill them off manually and this happens only on my mac.

@thaoula
Copy link
Author

thaoula commented Aug 6, 2017

Hi,

I don't use sass but I use less. Could something similar be happening?

Regards,
Tarek

@rosen-vladimirov
Copy link
Contributor

Hey @thaoula ,
The problem is in the nativescript-dev-less plugin and I've created a PR to fix it.

@jogboms , I've tried to reproduce the issue with nativescript-dev-sass plugin, but without success. Can you give more information when do you experience orphan node-sass processes?

@rosen-vladimirov
Copy link
Contributor

rosen-vladimirov commented Aug 9, 2017

@jogboms , I've found a use-case via NativeScript Sidekick that may cause a behaviour similar to the one that you've described. I've created a PR in nativescript-dev-sass plugin in order to resolve the issue.
The problem there is that node-sass process is kept alive even when LiveSync operation is stopped in NativeScript Sidekick.

In case you have any other clues what might have left the node-sass process running after CLI is killed, we may try to reproduce the case on our side.

@dtopuzov
Copy link
Contributor

dtopuzov commented Aug 14, 2017

@jogboms @thaoula
[email protected] is released and it should solve the issue.

@jogboms
Copy link

jogboms commented Aug 15, 2017

@rosen-vladimirov I'm so sorry for the long absence. Thanks for all your help.
This issue in fact only arises on my machine when i use tns debug. What happens is that at times, the debug service crashes leaving behind the node-sass process.

@rosen-vladimirov
Copy link
Contributor

@thaoula the issue with nativescript-dev-less plugin should be resolved as well, we've published version 0.0.11 :)

@jogboms thanks, we'll try to reproduce it on our side.

@pkoleva
Copy link
Contributor

pkoleva commented Aug 17, 2017

Related to NativeScript/nativescript-dev-sass#39

@pkoleva pkoleva closed this as completed Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants