Chrome crash on device unplug using serial API - google-chrome

I'm making an application for Chrome based on the serial API in order to send and receive data from a USB device that registers as a virtual serial port.
The problem I'm having is that when I remove the device and the connection is established the browser crashes and I don't have any idea why as the debug console also closes and the Chrome crash reporting (chrome://crashes) isn't showing anything (OSX 10.9.4, Chrome 37.0.2062.94). I suspect a low level exception in Chrome that isn't caught. The best I can do is an Apple crash report.
Is there any way to prevent the browser from crashing (some check before the browser thinks it's in an illegal state...), I know the simple answer is not to unplug while the device is connected, but I'd like a more monkey-proof solution.

Related

How to completely disable NativeMessaging in chrome and other browsers?

I was debugging a situation, where chrome keeps saying it is managed by third party organization. Whether it was due to the malware or not is yet to be seen. What bothers me that some process in Windows keeps creating the HKEY_LOCAL_MACHINE\Software\Google\Chrome\NativeMessagingHosts\ registry entries even if I uninstall Chrome. Whether the key is created by legit app or malware it seems that native applications can communicate with chrome without user noticing or having mechanisms to disable the communication.
Now I am really concerned by the security issues connected with the existence of the mechanism of communication between browser and native applications through native messaging see here. I would prefer my browser not being able to see other applications in the system and other applications to see that browser is running or at least have an option to sandbox the browser and isolate it from native applications.
Is there a way to disable this kind of communication in Chrome and in the host system, in my case Windows but I would be interested in Linux as well.

reconnect chromecast if lost connection via chrome built in chrome cast feature

I'm casting a google calendar page (so there is auth involved) to chrome cast via the chrome browser Cast.. feature - but occasionally it loses the connection.
Is there any chrome extension or other way that I can detect this lost connection and reconnect and send it to this specific chrome cast device.
The Chrome browser is always on - it's a chromebook tablet.

Web usb looses its pairing on browser restart

I have an app that I developed and it uses webusb to print to a Hp Thermal printer. The app works ok and prints just fine. The issue is that whenever I restart the browser the pairing is lost and then I have to re-pair every morning before starting work. Is there some javascript or setting that I need to enable in chrome to have it remember the pairing once the browser/pc is restarted.
This is the expected behavior for USB devices which don't have a serial number, as the browser can't tell that the same device is plugged in when the computer restarts.
There is a workaround available for users who can set device policies, as the WebUsbAllowDevicesForUrls policy allows you to pre-configure a set of USB device permissions for the sites you choose.

Remote Debugging won't connect

I sort of make shift followed this guide on how to setup remote debugging. Since I am using Adobe Animate to compile my app I assume it has done the majority of the build steps already as I get a similar screen described.
I don't understand though. Here I have port forwarding up on my router so that it goes to my PC. I have TCP port 7935 up and open. Windows firewall on or off doesn't seem to make difference. Windows firewall even prompted me to allow or deny fdb after I ran it. I can't get my phone to connect via remote debugging. I want to be able to send this to my client who is having issue with the app so I can see what's going on under the hood instead of relying on a giant sum of try/catch statements and screenshots. Any help?
I tried a dummy domain and it seems to know that it can't connect to it. When I try mine or my IPv4 it doesn't let me connect. It just freezes up the app.
I don't know whether it works or not in Animate CC, but it works via Flash Builder. I'm using Android real device and I have Android SDK tools installed on my PC
Yes, I have followed that tuts from official Adobe docs, but that doesn't work
First: Simply connect your device to your PC
Actually , you can debug your app remotely as long as your device has been connected with your PC. This step, doesn't necessarily requires FDB.
In my case , all I need was things like
adb connect 192.168.xx.xx:port
this will connect your Android device with your PC on your default network .
Second, set debug setting over network
You've done it in Animate CC, with addition you might want to check "install application on the connected device'
Third, just debug as usual
You can get all those debugging stuff including traces

Detecting connection on Windows Phone 8 with Sencha+PhoneGap

I'm trying to detect whether a connection is available on my Sencha Touch+PhoneGap app that's running on Windows Phone 8. Problem is, any check I make (using both Ext.device.Connection.isOnline() from Sencha and navigator.network.connection from PhoneGap) results in the state of the connection when the app was launched. I do have ID_CAP_NETWORKING checked on WMAppManifest.xml, by the way.
So if I launched the app while there was no connection, Ext.device.Connection.isOnline() and navigator.network.connection will both always say that there is no connection, even if I get a connection while the app is running. If I launched the app while there was a connection, even if I lose the connection the calls will always say that there is a connection.
I have a hack for this (using simple ajax calls and seeing if they fail), but it's definitely not a great solution. Has anyone else encountered this problem? I have limited understanding of this part of mobile development and really don't even know where to start.