Chrome "immersive-vr" isSessionSupported gives false with threejs.org examples - google-chrome

currently it looks to me like Chrome 83, does not support any VR experience although HTC Vive is connected (SteamVR 1.9.16 installed). SteamVR, when started manually, also finds the headset, controllers and base station.
https://threejs.org/examples/?q=webxr#webxr_vr_ballshooter
Any VR Example states "VR not supported"
digging arround a bit, the navigator describes the "immersive-vr" session not to be available. Promise response of code below is: false
navigator.xr.isSessionSupported('immersive-vr').then((issupported) => {console.log(issupported)})
The previous flags of Chrome (83.0.4103.61) linked to WebXR are not available any more.
Any ideas what I am doing wrong?
EDIT:
navigator.xr.requestSession( 'immersive-vr', { optionalFeatures: [ 'local-floor', 'bounded-floor' ] } ).then( (session) => console.log(session) );
Gives:
Uncaught (in promise) DOMException: The specified session configuration is not supported.

Issue will be solved by SteamVR supporting OpenVR as they are going to...
https://steamcommunity.com/games/250820/announcements/detail/2396425843528787270
Until then I would recommend to use:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --enable-features=openvr --disable-features=XRSandbox --force-webxr-runtime=openvr --enable-experimental-web-platform-features https://threejs.org/

Related

How to debug early hints loading in google chrome

https://chromium.googlesource.com/chromium/src/+/master/docs/early-hints.md suggest this is how one would debug if asset was loaded using early hints (103 HTTP status response) like so:
performance.getEntriesByName('https://a.test/style.css')[0].initiatorType
// => 'early-hints'
https://hg.mozilla.org/try/file/cc6f6c969877f92faf9ebda84653aff9fec62b0b/testing/web-platform/tests/loading/early-hints/resources/preload-initiator-type.html -> would confirm this is true.
Yet when I run this statement in chrome console, i'm getting:
performance.getEntriesByName('https://mywebsite.com/img.jpg')[0].initiatorType
'link'
Did early-hints was replaced with link?
Would assume so, but also am seeing no effect on the waterfall chart when early hints get enabled, so chances are chrome is really not respect 103 and does not preload asset. Any other ideas of how to debug early hints in chrome are more than welcome (Using Chrome 106 on OSX).

Content-Security-Policy to make Tensorflow.js's WASM backend work (Chrome 91.0.4472.77, macOS 11.3.1)

Latest Chrome update breaks WASM backend when using Tensorflow.js. Apparently, browser enforces more strict Content-Security-Policy headers now.
Gist of the error (from console):
"Initialization of backend wasm failed"
"Error: Failed to construct 'Worker': Access to the script at 'blob:https://fiddle.jshell.net/c95fbade-77fe-4945-a4dc-25a3a19f97d6' is denied by the document's Content Security Policy.
Curious if anyone figured out a way to run it?
Browser/OS - Chrome 91.0.4472.77 / macOS Big Sur 11.3.1
To check out error go here - https://jsfiddle.net/alex_oliynyk/2b6oa4dm/14/
Cheers!
My question got answered in the Tensorflow.js repo. I'll repost the solution here in case anyone has the same issue.
CSP headers to help:
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
Still, after figuring out CSP headers Tensorflow.js did not work. Threw an error connected to SIMD.
This appears to fix it for the time being:
tf.ENV.set('WASM_HAS_SIMD_SUPPORT', false);
tf.ENV.set('WASM_HAS_MULTITHREAD_SUPPORT', false);
It disables SIMD support and cuts performance, thus I hope it will be fully addressed in the future versions of the lib.
Cheers,

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

Chrome Web Store In-App Payments: Errors getting SKUs

I'm trying to get the SKUs available for a freemium Chrome Extension I'm developing.
I'm following all of the documentation here:
https://developer.chrome.com/webstore/payments-iap
...and I'm using the provided buy.js file, but it doesn't seem to work and the returned error messages are useless: "INVALID_RESPONSE_ERROR"
My code:
google.payments.inapp.getSkuDetails({
parameters: {env: 'prod'},
success: (r) => {
console.log(r);
},
failure: (err) => {
console.log(err);
},
});
Thoughts:
- Am I missing some permission in my manifest? I don't see any mention that it needs any additional ones.
Other StackOverflow questions have mentioned needing to proxy due to region issues. I'm in the states, shouldn't be an issue.
I've tried the above from both an options page and a popup - does it need to happen in a background page?
I'm pretty baffled. Any help is appreciated!
Thanks.
Updates:
The above works when released (in prod), but not locally
In prod you cannot buy your own thing (heads-up). It'll give you some stupid, meaningless error, but won't tell you that.
Still can't get this to work locally which means I have to test in prod.
If you need this to work locally, you must set the 'key' in your manifest.json file. When you reload it, it will show the same ID as the loaded extension from production.
Here are instructions on how to get the relevant key
If you debugging your extension in unpacked mode, you may need to set production "key" in your manifest.

getUserMedia for Firefox OS

It was said that getUserMedia would land on Firefox OS 1.2. I have read the documentation and tried to look for it in the Google Groups, but I have not found anything related to it.
I have developed a web app that works on Firefox Nightly (so, it works in Gecko):
But when I try to use it in Firefox OS 1.4, I get a "Permission denied" error:
I have tried to add the following permission to the manifest:
"permissions":{
"camera":{}
}
But didn't solve the problem. Is there any other permission that I would need to add?
getUserMedia support for the microphone landed in FxOS v1.2. getUserMedia support for the camera just landed on trunk (v1.4) about a week ago. The final piece to land was support for permission prompts : bug 853356 in bugzilla.mozilla.org (https://bugzilla.mozilla.org/show_bug.cgi?id=853356). Prior to a week ago, you would have gotten a permission error.
Currently the camera always returns frames in landscape mode. Bug 970183 (https://bugzilla.mozilla.org/show_bug.cgi?id=970183) tracks that problem, and we're actively working to land a fix for this ASAP.
you need add video-capture permissions in manifest.webapp in 1.4 for getUserMedia video,
and audio-capture permissions in manifest.webapp in 1.2 for getUserMedia audio, ex:
"permissions": {
"audio-capture": {},
"video-capture": {}
}