I've got an OpenZiti VPS running with a controller and edge-router installed and working. I have another edge router in a private network which is connected and also working. I added ZAC in a docker and that's working. I've been going through the steps to setup Browzer on the VPS to access a service hosted in the private network. It's been slow and steady but I hit an error and I'm not sure what I've done to break it.
When I point any web browser to the BrowZer target I get a giant whole-page error that says...
BrowZer Runtime error code: 1014
OriginTrial subdomain mismatch for feature [WebAssemblyJSPromiseIntegration]
Expected origin [*.cloudziti.io] but is accessed from [*.mydomain.com]
It seems like maybe I left some environment variable out and it defaulted to the cloudziti stuff. This is not a cloud ziti instance in any way. I've started reading the BrowZer code but the NodeJS stuff is not my cup of tea.
Hi @ghibsch, welcome to the community and to OpenZiti!
Have you previously tried brozer maybe? Have you tried a private window to rule out any browser-based caching?
One thing that is sometimes necessary when doing BrowZer work is to clear the site data and service worker (if needed but clearing all the site data usually takes care of that, I believe)
You may need to enable JSPI in your browser (I believe it's enabled by default as part of origin trials for origin *.cloudziti.io). You can enable it by navigating to chrome://flags in Chrome browser, and scrolling down to Experimental WebAssembly JavaScript Promise Integration (JSPI)
A couple months ago I was playing with the CloudZiti trial but I never enabled BrowZer in that. I also cleared site data, tried private window, and tried 2 other browsers and another laptop. Same result in all. JSPI is set to default. Changing it to enabled made no difference.
Had another random thought this morning. I setup the JWT signer and auth policy with the ZAC. Could that have defaulted something to the CloudZiti domain?
@ghibsch A couple of days ago, we released a BrowZer enhancement that was urgently needed to unblock one of our CloudZiti customers. I haven't yet updated the OpenZiti docs to reflect the need for a new BrowZer Bootstrapper env config var that you now require, and I apologize for that gap.
I will post here again shortly with the info you need (so watch for that), and I will update our docs in the next day or two.
Well that at least makes me feel better that it's been identified. Thanks for the quick look at this, guys. Really appreciate OpenZiti and all the work you do to support it.
Thanks @curt . If it matters, as an example, my domain is *.clint.demo.openziti.org/. I doubt you need it, but I figured I'd give you a 'for example'...
Since some browsers (like Edge) have recently stopped making the JSPI flag available in the edge://flags UI (even though JSPI is available in Edge), enabling JSPI via an Origin Trial is the only way to get JSPI enabled.
I also assert that the Origin Trial approach is far better for end-users of a browZer-protected web app because they never need to manually enable JSPI, or even know JSPI exists. Origin Trials will transparently enable the JSPI flag for the end-user of your BrowZer-protected web app.
Now...
If you are using CloudZiti, we take care of the Origin Trial config for you.
If you are self-hosting your own OpenZiti BrowZer stack, you will need to acquire your own Origin Trial token (it's easy) that is appropriate for your domain /origin, and then provide that token to the BrowZer Bootstrapper.
Hello @curt , does the browzer need to manually enable JSPI to access it? After testing, Google Chrome's JSPI is disabled by default and needs to be manually enabled before the browzer can access it.
Does browzer support Firefox and Safari now?
I just deployed it today. The first time I accessed it, the Auth0 login page appeared, but after logging in, I got a 1014 error. Even when using incognito mode, it still doesn't work.
I'm not sure if it's a problem with my deployment or an issue with the browser.
It should only require manual enablement if the JSPI origin trial is not enabled, have you enabled the origin trial? Firefox is not supported, I'm not sure about Safari at this time, @curt will have to answer that one.
See what happens if you close the tab and wait a bit before trying again. Or possibly go to dev tools -> Application tab -> clear site data when you're on your site. That's the "hard reset" option that sometimes is necessary when doing the initial dev/setup. If that doesn't help, we'll definitely need @curt to comment
No, browZer doesn't yet support Firefox or Safari. Chromium-based browsers (Chrome, Brave, Edge) are all supported.
What version of browZer are you running? If less than 0.77.0, I suggest you upgrade. I saw an issue related to origin trial alignment recently, and it was resolved by upgrading the browZer release that was deployed.