let i: number, len: number = 1000
for (i = 0; i < len; i++) {
console.log('i hope u dont crash :X', i)
}
It gets up to ~100 then the app freezes completely thus resulting a crashed CLI.
logsCONSOLE LOG file:///app/debug/console.js:60:23:
[LOG] 12:19:20:502 anonymous@app/main.js:15:16
i hope u dont crash :X 92
CONSOLE LOG file:///app/debug/console.js:60:23:
[LOG] 12:19:20:502 anonymous@app/main.js:15:16
i hope u dont crash :X 93
CONSOLE LOG file:///app/debug/console.js:60:23:
[LOG] 12:19:20:503 anonymous@app/main.js:15:16
i hope u dont crash :X 94
CONSOLE LOG file:///app/debug/console.js:60:23:
12:20:57 PM - File change detected. Starting incremental compilation...
12:20:58 PM - Compilation complete. Watching for file changes.
Executing before-prepare hook from /Users/roblav96/Projects/app-smile/ghmobile/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Project successfully prepared (ios)
Transferring project files...
Successfully transferred main.js.
Refreshing application...
Unable to sync files. Error is: Unable to kill the application.
This issue has been present since 2.4.0.
This also might be related to https://github.com/NativeScript/nativescript-cli/issues/2266
Hey @roblav96
I've tried to reproduce this issue but to no avail. Here is the test app I have created and tested on both iOS and Android. Please post more information about the environment on which you are testing (CLI , runtimes, modules versions, Nodejs, etc,)
@NickIliev hey, it's only on a device and a bit sporadic. I notice it more after an hour of developing.
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ Component โ Current version โ Latest version โ Information โ
โ nativescript โ 2.5.0 โ 2.5.0 โ Up to date โ
โ tns-core-modules โ 2.5.0 โ 2.5.0 โ Up to date โ
โ tns-android โ 2.5.0 โ 2.5.0 โ Up to date โ
โ tns-ios โ 2.5.0 โ 2.5.0 โ Up to date โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโ
OSX 10.11.6
node v6.9.1
iPhone 5s - v10.2.0
@NickIliev - I believe I can confirm this issue; not 100% sure the number of console logs required as it seems a bit more random on my part. But in one of my apps when I added a lot more console logging to try and trace down a iOS runtime issue; I started noticing the CLI crashing out very frequently.
The weird thing is that one of the running node process continues to still be running and the app effectively freezes on the ipad air2. So I have to ps -Af to get the pid of the node process on the mac. Once I kill the node process it releases the app on the ipad. Then I can start another run and do more work.
I should probably make a note; that if I don't use tns run and just launch the application on the ipad; it never freezes. But if it is running via a tns run when the app "freezes" I can see that TNS crashed out...
@NathanaelA @NickIliev I can 100% confirm this is a bug on 2.5.3. It is an issue for both iOS and Android while developing on real devices; NOT simulators. I'll try and whip up a demo today.
I haven't seen this issue ever on Android; so I can't confirm that and I have a LOT of logging on Android going on right now, but normally only using an emulator for Android and I'm also using 2.5.1 of the CLI tools on the android side.
But in my iOS case I was also using a real iPad air2 not a simulator, so a real devices might be needed to duplicate the issue. Using 2.5.2 on the Mac side of the CLI.
Hey @roblav96,
I am still unable to reproduce this. I am using 3.0.0 of our CLI and a real iOS device to try to reproduce it. Can you give us sample app that reproduces it every time?
@pkoleva I have not tried this on the latest v3 RC. I will and let you know. Thank you =]
Closing the issue due to lack of activity.
@roblav96 If you face it again either reopen it or comment below with detailed steps to reproduce.
Most helpful comment
@NathanaelA @NickIliev I can 100% confirm this is a bug on 2.5.3. It is an issue for both iOS and Android while developing on real devices; NOT simulators. I'll try and whip up a demo today.