Skip to content

Android debugger failure - Debugging connection was closed. Reason WebSocket disconnected #2542

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
alexziskind1 opened this issue Feb 14, 2017 · 27 comments

Comments

@alexziskind1
Copy link

I am attempting to debug an Android hello world app using chrome at the address specified by the CLI
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:40000

I'm getting the error in the title show up in Chrome and the message "Unfortunately, has stopped" alert in the Android UI.
There are no console errors.

I've tried this on 2 Macs and 1 Windows machine with the same results.
I've tried this with CLI version 2.5.0 and with CLI 3.0.0-2017-02-09-7977

Android emulator via Genymotion as well as built in emulator are having the same issue

@petekanev
Copy link
Contributor

Hey @alexziskind1!

Can you please verify that you are using the android 2.5 runtime.

Thanks!

@alexziskind1
Copy link
Author

alexziskind1 commented Feb 15, 2017

Hi @Pip3r4o
Yes this was tested with 2.5.0 AND the @next version (3.0.0-2017-02-09-7977)

I've created a short video of me creating a project with 2.5.0 and then trying to debug with Chrome and Genymotion Android:

https://youtu.be/wpv5P4-DL4M

Alex

@alexziskind1
Copy link
Author

Here is the same thing happening with the built in Android emulator:

https://youtu.be/qKZVah6uE9Q

Alex

@petekanev
Copy link
Contributor

@alexziskind1
What version of Chrome are you using?

I've tested the debugger on both current stable Version 56.0.2924.87, as well as on Canary Version 58.0.3010.0 canary (64-bit)

I also noticed that you have DevTools extensions installed. Could you verify that no Chrome extension modifies the DevTools experience, runs a script on page load, etc. to try to narrow down the possible causes.

Additionally it'd be great if you could provide a logcat log, see if we can find anything useful there.
adb logcat -d > log.txt

@alexziskind1
Copy link
Author

Thanks! Problem solved!
React Developer Tools Extension was causing this problem.

Chrome version is Version 56.0.2924.87 (64-bit)

I've turned off and on all the extensions one at a time and the one that was causing the problem is React Developer Tools.
I've also repeated this on the Windows machine and the same problem was solved there as well.

screen shot 2017-02-15 at 9 16 33 am

Thanks!

@Liooo
Copy link

Liooo commented Feb 24, 2017

Having the same issue. chrome version and android runtime version are the same as above, and cli version is 2.5.1. Turned off all chrome extensions, but still getting the error.

Here's the output of adb logcat -d
log.txt

Could somebody help me?

@DannyFeliz
Copy link

I had the same issue and as @Pip3r4o said an extension could causing the issue, in my case was Vuejs devtools, I just disabled it and everything works like a charm.

@Liooo
Copy link

Liooo commented Feb 24, 2017

@DannyFeliz Thanks for the response.
But as I mentioned, I turned off all chrome extensions but still getting this error..

@terreb
Copy link

terreb commented Mar 8, 2017

Having the same issue. Genymotion 2.8.1. Chrome v. 56.0.2924.87. All extensions are disabled. Any updates on that?

@AbdallahBedir
Copy link

AbdallahBedir commented Mar 26, 2017

same issue guys ? All extensions are disabled !

@petekanev
Copy link
Contributor

@AbdallahBedir @terreb Unfortunately this crash isn't something that we can reproduce, so we can't help unless you provide more information about your setup.
What versions are you using?
What browser are you using? chrome://version/
What are your installed extensions?
What device is the app being ran on?
Is it a hello-world tns app?
What is the console log?
What's in the adb logcat at the time of the application crash? adb logcat

@terreb
Copy link

terreb commented May 1, 2017

Here is the info you requested:

  1. tns 2.5.4, tns-core-modules 2.5.2, tns-android 2.5.0

  2. Google Chrome 57.0.2987.133 (Official Build) (64-bit) Revision ec33cd0c06881d919ac0de419d829ad914e0be8f-refs/branch-heads/2987@{Ability to ignore files from build and livesync #887}

Web Store,
Bookmark Manager,
Feedback,
CryptoTokenExtension,
Cloud Print,
Chrome PDF Viewer,
Google Network Speech,
Google Hangouts
Extension [AdBlock] 185 MB private, 0 MB shared
Extension [Chrome Media Router] 62 MB private, 0 MB shared
Extension [Lingvo Translator+] 45 MB private, 0 MB shared
Extension [Browsec VPN - Privacy and Security Online] 41 MB private, 0 MB shared
Extension [App Inspector for Sencha™] 36 MB private, 0 MB shared
Extension [Allow-Control-Allow-Origin: *] 36 MB private, 0 MB shared

  1. Genymotion Samsung Galaxy S7 Android 6.0.0

  2. yes (hello-world-ts)

BUILD SUCCESSFUL

Total time: 57.674 secs
Project successfully built.
Installing...
The system failed to delete the package for an unspecified reason.
Successfully installed on device with identifier '192.168.56.101:5555'.
Transferring project files...
Successfully transferred all files.
Successfully synced application org.nativescript.helloworldts on device 192.168.56.101:5555.

Using /Users/user/Documents/dev/NativeScript/hello-world-ts/platforms/android/build/outputs/apk/helloworldts-debug.apk
device: 192.168.56.101:5555 debug port: 40001

NativeScript Debugger started

To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:40001

Executing before-watch hook from /Users/user/Documents/dev/NativeScript/hello-world-ts/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 2.1.6
12:38:30 PM - Compilation complete. Watching for file changes.

05-01 04:45:49.042 2626 2626 I TNS.Native: NativeScript Runtime Version 2.5.0, commit 95dd12d69eba88755158987d8c4666a9c5aa5e07
05-01 04:45:49.042 2626 2626 D TNS.Native: JNI_ONLoad
05-01 04:45:49.042 2626 2626 D TNS.Native: JNI_ONLoad END
05-01 04:45:49.216 2626 2626 D TNS.Native: Failed to load snapshot: dlopen failed: library "libsnapshot.so" not found
05-01 04:45:49.311 2626 2626 D TNS.Native: V8 version 5.5.372.32
05-01 04:45:49.367 1039 1208 E Surface : getSlotFromBufferLocked: unknown buffer: 0xe04a1650
05-01 04:45:49.458 2626 2626 D TNS.Native: lenNodes=66624, lenNames=775030, lenValues=878990
05-01 04:45:49.458 2626 2626 D TNS.Native: time=1
05-01 04:45:49.467 2626 2626 D TNS.Java: Enabling NativeScript Debugger Agent
05-01 04:45:50.303 2659 2659 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
05-01 04:45:50.305 2659 2659 D AndroidRuntime: CheckJNI is OFF
05-01 04:45:50.322 2659 2659 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
05-01 04:45:50.356 2659 2659 E memtrack: Couldn't load memtrack module (No such file or directory)
05-01 04:45:50.356 2659 2659 E android.os.Debug: failed to load memtrack module: -2
05-01 04:45:50.358 2659 2659 I Radio-JNI: register_android_hardware_Radio DONE
05-01 04:45:50.373 2659 2659 D AndroidRuntime: Calling main entry com.android.commands.am.Am
05-01 04:45:50.380 2626 2654 D TNS.Java: Enabling NativeScript Debugger Agent
05-01 04:45:50.383 2659 2659 D AndroidRuntime: Shutting down VM
05-01 04:45:50.653 2626 2626 W art : Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
05-01 04:45:50.786 2626 2668 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-01 04:45:50.800 2626 2626 D : HostConnection::get() New Host Connection established 0xdf313ad0, tid 2626
05-01 04:45:50.847 2626 2668 D libEGL : loaded /system/lib/egl/libEGL_emulation.so
05-01 04:45:50.850 2626 2668 D libEGL : loaded /system/lib/egl/libGLESv1_CM_emulation.so
05-01 04:45:50.862 2626 2668 D libEGL : loaded /system/lib/egl/libGLESv2_emulation.so
05-01 04:45:50.872 2626 2668 D : HostConnection::get() New Host Connection established 0xeea12830, tid 2668
05-01 04:45:50.901 2626 2668 I OpenGLRenderer: Initialized EGL, version 1.4
05-01 04:45:50.990 2626 2668 W EGL_emulation: eglSurfaceAttrib not implemented
05-01 04:45:50.990 2626 2668 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xeea136a0, error=EGL_SUCCESS
05-01 04:45:51.486 660 694 I ActivityManager: Displayed org.nativescript.helloworldts/com.tns.NativeScriptActivity: +2s557ms
--------- beginning of system
05-01 04:46:17.361 660 688 I UsageStatsService: User[0] Flushing usage stats to disk
05-01 04:47:05.203 99 99 D Genyd : Received Set Clipboard
05-01 04:47:05.203 99 99 D Genymotion: Received Set Clipboard
--------- beginning of crash
05-01 04:47:11.343 2626 2626 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xe04 in tid 2626 (pt.helloworldts)
05-01 04:47:11.444 103 103 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-01 04:47:11.444 103 103 F DEBUG : Build fingerprint: 'Android/vbox86p/vbox86p:6.0/MRA58K/genymotion08241314:userdebug/test-keys'
05-01 04:47:11.444 103 103 F DEBUG : Revision: '0'
05-01 04:47:11.444 103 103 F DEBUG : ABI: 'x86'
05-01 04:47:11.444 103 103 F DEBUG : pid: 2626, tid: 2626, name: pt.helloworldts >>> org.nativescript.helloworldts <<<
05-01 04:47:11.445 103 103 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xe04
05-01 04:47:11.447 103 103 F DEBUG : eax 00000000 ebx e0520cb4 ecx e0520cb4 edx f76fbca8
05-01 04:47:11.447 103 103 F DEBUG : esi 00000000 edi ff948f18
05-01 04:47:11.447 103 103 F DEBUG : xcs 00000023 xds 0000002b xes 0000002b xfs 00000007 xss 0000002b
05-01 04:47:11.447 103 103 F DEBUG : eip df9fc7d6 ebp f3d7bae0 esp ff948e80 flags 00210246
05-01 04:47:11.449 103 103 F DEBUG :
05-01 04:47:11.449 103 103 F DEBUG : backtrace:
05-01 04:47:11.449 103 103 F DEBUG : #00 pc 001c97d6 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #1 pc 001c9853 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #2 pc 000b5061 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #3 pc 0010e2e6 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #4 pc 000408c0 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #5 pc 000436bf /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #6 pc 00066342 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #7 pc 00097270 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #8 pc 00095dc1 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #9 pc 0014560c /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #10 pc 000a9f3b /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #11 pc 000cb3d3 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #12 pc 000cb343 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so
05-01 04:47:11.449 103 103 F DEBUG : #13 pc 000f4ea8 /data/app/org.nativescript.helloworldts-1/lib/x86/libNativeScript.so (Java_com_tns_AndroidJsV8Inspector_dispatchMessage+56)
05-01 04:47:11.449 103 103 F DEBUG : #14 pc 00804574 /data/app/org.nativescript.helloworldts-1/oat/x86/base.odex (offset 0x56e000) (void com.tns.AndroidJsV8Inspector.dispatchMessage(java.lang.String)+136)
05-01 04:47:11.449 103 103 F DEBUG : #15 pc 00803a7f /data/app/org.nativescript.helloworldts-1/oat/x86/base.odex (offset 0x56e000) (void com.tns.AndroidJsV8Inspector$JsV8InspectorWebSocket$3.run()+275)
05-01 04:47:11.449 103 103 F DEBUG : #16 pc 72640c3b /data/dalvik-cache/x86/system@[email protected] (offset 0x1eb6000)
05-01 04:47:11.500 103 103 F DEBUG :
05-01 04:47:11.500 103 103 F DEBUG : Tombstone written to: /data/tombstones/tombstone_07
05-01 04:47:11.500 103 103 E DEBUG : AM write failed: Broken pipe
05-01 04:47:11.500 660 692 I BootReceiver: Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
05-01 04:47:11.502 660 2683 W ActivityManager: Force finishing activity org.nativescript.helloworldts/com.tns.NativeScriptActivity
05-01 04:47:11.508 660 714 W InputDispatcher: channel 'aaa9e77 org.nativescript.helloworldts/com.tns.NativeScriptActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
05-01 04:47:11.508 660 714 E InputDispatcher: channel 'aaa9e77 org.nativescript.helloworldts/com.tns.NativeScriptActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
05-01 04:47:11.512 660 814 D GraphicsStats: Buffer count: 2
05-01 04:47:11.514 660 2683 D : HostConnection::get() New Host Connection established 0xdeb7a890, tid 2683
05-01 04:47:11.520 355 355 I Zygote : Process 2626 exited due to signal (11)
05-01 04:47:11.544 671 671 E EGL_emulation: tid 671: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE)
05-01 04:47:11.848 660 1073 W art : Long monitor contention event with owner method=android.graphics.Bitmap com.android.server.wm.WindowManagerService.screenshotApplicationsInner(android.os.IBinder, int, int, int, boolean) from WindowManagerService.java:6223 waiters=0 for 335ms
05-01 04:47:11.850 660 1115 W art : Long monitor contention event with owner method=android.graphics.Bitmap com.android.server.wm.WindowManagerService.screenshotApplicationsInner(android.os.IBinder, int, int, int, boolean) from WindowManagerService.java:6223 waiters=1 for 337ms
05-01 04:47:11.850 660 1115 I WindowState: WIN DEATH: Window{aaa9e77 u0 org.nativescript.helloworldts/com.tns.NativeScriptActivity}
05-01 04:47:11.850 660 1115 W InputDispatcher: Attempted to unregister already unregistered input channel 'aaa9e77 org.nativescript.helloworldts/com.tns.NativeScriptActivity (server)'
05-01 04:47:11.852 660 2683 W ActivityManager: Exception thrown during pause
05-01 04:47:11.852 660 2683 W ActivityManager: android.os.DeadObjectException
05-01 04:47:11.852 660 2683 W ActivityManager: at android.os.BinderProxy.transactNative(Native Method)
05-01 04:47:11.852 660 2683 W ActivityManager: at android.os.BinderProxy.transact(Binder.java:503)
05-01 04:47:11.852 660 2683 W ActivityManager: at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:727)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:867)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2907)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2763)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2755)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11971)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11867)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12556)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:12063)
05-01 04:47:11.852 660 2683 W ActivityManager: at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
05-01 04:47:11.854 660 756 W art : Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService.crashApplication(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo) from ActivityManagerService.java:12502 waiters=0 for 341ms
05-01 04:47:11.854 660 756 I ActivityManager: Process org.nativescript.helloworldts (pid 2626) has died
05-01 04:47:11.857 660 660 W art : Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService.crashApplication(com.android.server.am.ProcessRecord, android.app.ApplicationErrorReport$CrashInfo) from ActivityManagerService.java:12502 waiters=1 for 344ms
05-01 04:47:11.911 1039 1208 I OpenGLRenderer: Initialized EGL, version 1.4
05-01 04:47:11.929 660 724 I OpenGLRenderer: Initialized EGL, version 1.4
05-01 04:47:11.991 1039 1208 W EGL_emulation: eglSurfaceAttrib not implemented
05-01 04:47:11.991 1039 1208 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xe8e438a0, error=EGL_SUCCESS
05-01 04:47:12.076 660 724 W EGL_emulation: eglSurfaceAttrib not implemented
05-01 04:47:12.076 660 724 W OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xdc5a4be0, error=EGL_SUCCESS
05-01 04:47:12.838 660 690 I Choreographer: Skipped 40 frames! The application may be doing too much work on its main thread.
05-01 04:47:13.242 1039 1039 I Choreographer: Skipped 71 frames! The application may be doing too much work on its main thread.
05-01 04:47:13.721 660 694 W WindowAnimator: Failed to dispatch window animation state change.
05-01 04:47:13.721 660 694 W WindowAnimator: android.os.DeadObjectException
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.BinderProxy.transactNative(Native Method)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.BinderProxy.transact(Binder.java:503)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.view.IWindow$Stub$Proxy.onAnimationStopped(IWindow.java:534)
05-01 04:47:13.721 660 694 W WindowAnimator: at com.android.server.wm.WindowAnimator.updateWindowsLocked(WindowAnimator.java:286)
05-01 04:47:13.721 660 694 W WindowAnimator: at com.android.server.wm.WindowAnimator.animateLocked(WindowAnimator.java:678)
05-01 04:47:13.721 660 694 W WindowAnimator: at com.android.server.wm.WindowAnimator.-wrap0(WindowAnimator.java)
05-01 04:47:13.721 660 694 W WindowAnimator: at com.android.server.wm.WindowAnimator$1.doFrame(WindowAnimator.java:123)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.view.Choreographer.doFrame(Choreographer.java:603)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.Handler.handleCallback(Handler.java:739)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.Handler.dispatchMessage(Handler.java:95)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.Looper.loop(Looper.java:148)
05-01 04:47:13.721 660 694 W WindowAnimator: at android.os.HandlerThread.run(HandlerThread.java:61)
05-01 04:47:13.721 660 694 W WindowAnimator: at com.android.server.ServiceThread.run(ServiceThread.java:46)
05-01 04:47:14.819 660 724 E Surface : getSlotFromBufferLocked: unknown buffer: 0xf2bf2f50
05-01 04:47:16.842 354 741 W AudioFlinger: write blocked for 2014 msecs, 1 delayed writes, thread 0xf1e40000
05-01 04:47:16.842 660 696 I Choreographer: Skipped 120 frames! The application may be doing too much work on its main thread.
05-01 04:47:16.846 660 672 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 2626 uid 10067
05-01 04:47:16.862 660 694 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
05-01 04:47:27.086 354 741 W AudioFlinger: write blocked for 10022 msecs, 2 delayed writes, thread 0xf1e40000
05-01 04:47:37.151 354 741 W AudioFlinger: write blocked for 10053 msecs, 3 delayed writes, thread 0xf1e40000
05-01 04:49:10.398 660 691 E BluetoothAdapter: Bluetooth binder is null
05-01 04:50:00.002 660 689 I ProcessStatsService: Prepared write state in 0ms

@terreb
Copy link

terreb commented May 1, 2017

With regards to device, same happens when ran on a real device.

@petekanev
Copy link
Contributor

@terreb I would ask you to disable/remove the App Inspector for Sencha™ extension and try debugging again. Exterior tools like that one that modify the DevTools are expected to crash the application.

@terreb
Copy link

terreb commented May 1, 2017

@Pip3r4o Thank you for your prompt reply and actually for the help:) It works now!

Feeling myself dumb now. I've already tried to disable all the extensions before, but it didn't work for me. This time I disabled the extensions closed and opened Chrome again, made sure they are still disabled, only then tried and bingo. Many thanks again!

@terreb
Copy link

terreb commented May 1, 2017

@Pip3r4o May I ask you another related question here, please? I read you guys want to get rid of Safari based NativeScript inspector and switch completely to Chrome web-tools for both platforms (please correct me if I'm wrong). But the thing is debugging in Safari based inspector is much more convenient now rather than in Chrome web-tools in the current state, since the latter is not much different from Node inspector. The former shows more info in the console like function or event name. It allows to expand and collapse objects. Honestly so far, I don't see any upgrades over Node inspector. Probably this is my first impression and I haven't discovered hidden gems.

@petekanev
Copy link
Contributor

@terreb We have no plans to replace the Safari Web Inspector for iOS debugging until we can ensure that the Chrome counterpart can provide all functionalities available in Safari.

As for the android debugging experience - we made the switch from the old Node inspector just recently (version 2.5), and have since made many improvements to stabilize it and make it as useful as possible. Version 3.0 will also feature showing of the network requests, allow previewing of all files in the app being debugged, support for the missing Variables tab, and more bug fixes. Very little of that was possible with the now old Node inspector, so the move to Chrome DevTools was the logical thing to do.

@terreb
Copy link

terreb commented May 1, 2017

Ok got it. Will be toying with the version 3 then. Thank you guys for all your hard work!

@Liooo
Copy link

Liooo commented Sep 28, 2017

I was facing the same issue. In short, creating a new profile on Chrome (People -> Add Person) and debugging from the person fixed the problem for me.

I tried to invalidate ALL extensions from my primary profile then rebooted the machine, but nothing changed. Btw when the error was happening, logcat was showing the following error repeatedly forever even after closing the debug tab in chrome. Hope it helps identifying the issue.

09-28 15:46:31.018  3395  3515 E fi.iki.elonen.NanoHTTPD: java.io.IOException: Broken pipe
  at android.net.LocalSocketImpl.writeba_native(Native Method)
  at android.net.LocalSocketImpl.-wrap3(LocalSocketImpl.java)
  at android.net.LocalSocketImpl$SocketOutputStream.write(LocalSocketImpl.java:144)
  at fi.iki.elonen.NanoHTTPD$Response.sendBody(NanoHTTPD.java:1750)
  at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectEncoding(NanoHTTPD.java:1726)
  at fi.iki.elonen.NanoHTTPD$Response.sendBodyWithCorrectTransferAndEncoding(NanoHTTPD.java:1716)
  at fi.iki.elonen.NanoHTTPD$Response.send(NanoHTTPD.java:1683)
  at fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:1011)
  at fi.iki.elonen.NanoHTTPD$LocalClientHandler.run(NanoHTTPD.java:251)
  at java.lang.Thread.run(Thread.java:761)

Other version stuff when the problem was occuring:

$  tns --version
3.2.1

package.json

  "nativescript": {
    "tns-ios": {
      "version": "3.2.0"
    },
    "tns-android": {
      "version": "3.2.0"
    }
  },
  ...
  "dependencies": {
    "@angular/animations": "~4.2.0",
    "@angular/common": "~4.2.0",
    "@angular/compiler": "~4.2.0",
    "@angular/core": "~4.2.0",
    "@angular/forms": "~4.2.0",
    "@angular/http": "~4.2.0",
    "@angular/platform-browser": "~4.2.0",
    "@angular/router": "~4.2.0",
    "tns-core-modules": "^3.2.0",
    ...
}

Chrome version

Version 61.0.3163.100 (Official Build) (64-bit)

@petekanev
Copy link
Contributor

@Liooo the adb logcat error you've been seeing is the socket connection from/to the chrome devtools being interrupted abruptly (by means of restarting the application, or sometimes when the chrome devtools tab is closed).

@Liooo
Copy link

Liooo commented Sep 28, 2017

@Pip3r4o Probably was missing the time axis

  1. run $ tns debug android, then wait for the app to start
  2. run $ adb logcat #=> shows no errors
  3. open chrome debug URL #=> devtool says "WebSocket disconnected", and logcat start showing the error repeatedly

So I didn't restart the application nor closed the tab.
Guessing some setting of my primary profile was causing the error.

@VimalKumarS
Copy link

I am also facing the same issue, any pointers
tns verion 3.3
tns-android version 3.3.1

previously with tns version 3.1.3 it wad working.

@petekanev
Copy link
Contributor

@VimalKumarS how and when does the issue occur? In order for us to try and help you, we need a bit more than what you've provided.

What browser are you using? chrome://version/
What are your installed extensions?
What device is the app being ran on?
Is it a hello-world tns app?
What is the console log?
What's in the adb logcat at the time of the application crash? adb logcat

@bernardschyns
Copy link

I have exactly the same problem as here described
I think this is in correlation with this issue #1872
"tns livesync android` not updating application consistently"
I can see when I connect the debugger with
chrome-devtools://devtools/bundled/inspector.html?experiments=true&ws=localhost:40001
The files that the debug window shows are not updated...

@usmanghani-nc
Copy link

Capture
im gettting this

@NishanChakma
Copy link

Capture
im gettting this

I am also having the same problem with my windows pc

@quanghungit
Copy link

@NishanChakma @usmanghanidev have you fixed it yet?

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