Attempt to postMessage on disconnected port - json

I was following this guide on native messaging, but now I've come to a stand-still. The developer console on Firefox keeps giving me the same error:
"Attempt to postMessage on disconnected port" along with "Webconsole context has changed" before it.
I've checked the registries, the ping_pong registry key is in the correct place,
HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\NativeMessagingHosts\\ping_pong,
and it's value is pointing to the location of my manifest.json file.
My extension id and "allowed_extensions" match.
I found this, and it did stop at the end saying I don't have a python script in the batch file, but that shouldn't be the cause of my error messages.
I have Firefox Quantum 61.0.2, if that's of any use.
What am I doing wrong?

This is a generic error and it means the native messaging host configuration is wrong. The specific error is logged in the Browser Console (Firefox Menu --> Web Developer --> Browser Console) and it is much more helpful.
(For me, the specific error was a typo in the native messaging manifest.)
(Discussed in: https://github.com/mdn/webextensions-examples/issues/266)

Related

WebAssembly crash info in window.onerror()

I am trying to collect crash logs for my WebAssembly application. It's built with emscripten, everything is served from the same domain, testing in Chrome. In the developer console I see a proper error with stack trace when a crash occurs, I'd like to capture this and send it to a server.
Instead I am only getting "Script error." passed to window.onerror() and the fifth parameter is null. This is supposed to happen when violating the same-origin policy (linked question is only about javascript, does not talk about this WebAssembly-specific problem.) Errors occurring in the .js file don't have this problem, only webassembly runtime errors.
I added the crossorigin attribute to the .js file generated by emscripten. The site is running in secure context, the Response object passed to WebAssembly.instantiateStreaming() (in the emscripten-generated .js file) has "basic" as its .type, so as I understand it has no restrictions on what can be done with it. "Access-Control-Allow-Origin" header is set to "*".
For some weird reason I managed to get the full error with stack trace exactly once, so it is apparently possible, but seemingly doing everything the same way I can't get it to work again.
How can this be solved?
instantiateStreaming is promised based so maybe try window.addEventListener('unhandledrejection')?

Getting Serial port info on Chrome Web Serial API

I'm using the Chrome Web Serial API. So far it's working fine, but now and I'm trying to get the (already opened) port metadata (port name, device ID, etc.) and I'm a bit lost.
Here are the steps to follow:
https://wicg.github.io/serial/#getting-serial-port-metadata
but so far I cannot get the information.
If I try by navigating the port class, the DevTools console trows "ƒ () { [native code] }".
I cannot find a suitable example of how to implement this.
Does anyone have a hint?
Thanks in advance!!
Daniel.
It seems like it hasn't been implemented in Chromium yet. Keep in mind that the specs are sort of guides for vendors to follow when implementing a feature, but the actual shipped implementation can differ.
If you check the Web Serial API's code in the Chromium repo for Chrome 80 (current version at the time of writing) and 84.0.4112.1 you'll see that they only include the following methods:
open
readable
writable
getSignals
setSignals
close
You can read the latest comments on this API here: https://bugs.chromium.org/p/chromium/issues/detail?id=884928

Web page launch error

How to go about this error "Launch terminated : ERROR: Course launch was canceled because the HACP getParam failed to find the user information". cannot open the web page beacause of this.
The reason for this is that you might have left the browser idle for a long time and the session got logged out.
Solution: Login to the Skillport or other Portal which is linked to the Skillport, and everything should be all set.
Please be more specific. Which website? Which browser?
Googling the error (which you should have done first) yields this result:
I get the Skillsoft error: “Launch terminated: ERROR: Course launch was cancelled because the HACP getParam failed to find the user information”:
Per our Required Browser Settings document, please ensure that *.skillport.com is added to your Trusted Sites zone in Internet Explorer.
If you're not on "skillport.com", whatever it is, you'll probably want to add the domain you're on to the Trusted Sites instead.

JS error on Chrome (with Device Toolbar enable)

When I turn on the tablet mode or the phone mode in Chrome, I get a javascript error :
Uncaught TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite.
at HTMLHtmlElement.avp.disableTouchSafari (viewer3D.min.js:18)
I've just update Chrome to the last version.
Any idea?
This might an issue of Forge Viewer. Apologizing for any inconvenience caused.
I have logged a request LMV-3401 [Autodesk.Viewing.Private.disableTouchSafari() reports error while viewing model with Chrome DevTools' Device Mode in macOS] to our development team to allocate time to investigate. As it requires further exploration and possibly a modification to our Viewer, please make a note of this number for future reference.
You are welcome to request an update on the status of this request or to provide additional information on it at any time quoting this request number via forge.help#autodesk.com.
However, I think this error didn't affect main features of Viewer. At the meanwhile, I think a real mobile device will help you in this case since this error didn't show up while testing on my Ipad.
Cheers,

Service Worker not prompting to be registered - net::ERR_FILE_EXISTS

I browsed through the other threads - there was no concrete answer.
I implemented a service worker for notifcations
http://docs.pushwoosh.com/docs/chrome-web-push
I checked everything - all scripts are in root, the keys are well implemented. However, I do not get prompted to allow notifs.
Console output reads:
GET https://mydomain/service-worker.js net::ERR_FILE_EXISTS
Note: I do have the correct URL (just changed it here).
What causes the service worker error? How do I fix this?
It isn't anything to worry about. See the internal bug report: https://code.google.com/p/chromium/issues/detail?id=541797 the TL'DR is that when Chrome tries to fetch a new SW if there is no change and thus nothing to install it throws this error message to indicate that state. There is nothing that you need to do.