Skip to content

Duplicated entries in tns run log while livesyncing #3736

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
alex-che opened this issue Jul 9, 2018 · 3 comments
Closed

Duplicated entries in tns run log while livesyncing #3736

alex-che opened this issue Jul 9, 2018 · 3 comments

Comments

@alex-che
Copy link

alex-che commented Jul 9, 2018

Every time I update my source file and cause the application to be resynced, some of the log entries are shown one more time than before. After several syncs the log looks like the following:

ActivityManager: Killing 7965:org.nativescript.HelloWorld/u0a255 (adj 0): stop org.nativescript.HelloWorld: from process:8093
ActivityManager: Killing 7965:org.nativescript.HelloWorld/u0a255 (adj 0): stop org.nativescript.HelloWorld: from process:8093
ActivityManager: Killing 7965:org.nativescript.HelloWorld/u0a255 (adj 0): stop org.nativescript.HelloWorld: from process:8093
Successfully synced application org.nativescript.HelloWorld on device f8772ba6.
JS: line from console.log
JS: line from console.log
JS: line from console.log
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
ActivityManager: Start proc 8154:org.nativescript.HelloWorld/u0a255 for activity org.nativescript.HelloWorld/com.tns.NativeScriptActivity caller=null
JS: line from console.log
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.

Host platform: Ubuntu 16.04.2 LTS, 64 bit (running as a VMWare virtual machine inside Windows 10 host)
Device: Xiaomi Mi 5S Plus, Android 7.0, MIUI 9 Global
CLI: 4.1.2
tns-core-modules: ~4.1.0
tns-android: 4.1.3
native-script-angular: ~6.0.6
typescript: ~2.7.2

I followed the Angular/NativeScript Get Started tutorial. I've created the Hello world application using the tns create HelloWorld --template nativescript-template-ng-tutorial command. I connected my phone, run the tns run command, saw the application appeared on the screen. Then I followed the steps in the tutorial right to the point where it introduced the console.log support. After that I noticed, that every time I update my source files and live-sync starts it's cycle, some of the logged messages are duplicated.

I'm not sure yet, whether it is caused by the duplicated component instances or issues with the logging itself.

In the test, I had only the following line in my AppComponent constructor in the app.component.ts source file:
console.log("AppComponent ctor 0");
I subsequently updated the '0' at the end of the logged line with increasing numbers, which produced the attached log file.

tns-run.log

@atheros
Copy link

atheros commented Jul 9, 2018

I have the same issue. every code reload adds an other duplicate of every console log.

This seems to be similar to #2941

@alex-che
Copy link
Author

alex-che commented Jul 9, 2018

@atheros , thanks.
I was not clever enough to search in closed issues.
It looks the same to me. But that issue has been closed a year ago in 3.2. I'm using 4.1.2.
Maybe a regression.

@brandontulsi
Copy link

I've observed this behavior aswell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants