Skip to content

Duplicated entries in tns run log while livesyncing #3736

Closed
@alex-che

Description

@alex-che

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions