leaningtech/webvm

Uncaught ReferenceError: noral is not defined

Closed this issue · 6 comments

I tried to fork this repo here and deploy using this Dockerfile but when I visit the webpage I get this error in the JavaScript console:

Uncaught ReferenceError: noral is not defined
    getSharedArrayBufferMissingMessage http://vaibhavsagar.com/webvm/:166
    runBash http://vaibhavsagar.com/webvm/:281
    loadCX http://vaibhavsagar.com/webvm/:352
    async* http://vaibhavsagar.com/webvm/:355
webvm:166:120
    getSharedArrayBufferMissingMessage http://vaibhavsagar.com/webvm/:166
    runBash http://vaibhavsagar.com/webvm/:281
    (Async: EventListener.handleEvent)
    loadCX http://vaibhavsagar.com/webvm/:352
    InterpretGeneratorResume self-hosted:1412
    AsyncFunctionNext self-hosted:799
    (Async: async)
    <anonymous> http://vaibhavsagar.com/webvm/:355

Is this something I'm doing wrong somewhere?

There was a typo in the handling on error messages, now fixed, please update your fork.

Please notice that the error happens since SharedArrayBuffer is not enabled. You need to supply the right header for that to work. When deployed to GitHub pages WebVM is integrated with a service worker to automatically supply the right headers. I would recommend to follow the README instructions and deploy to GitHub Pages if you don't have previous experience with using SharedArrayBuffer and Cross Origin Isolation

I was using GitHub Pages already, but it turned out I needed to enable "Enforce HTTPS" in my Pages settings before this would work (in Firefox).

That's correct. Cross origin isolation can only work in secure contexts.

Maybe you could add this to your instructions?

Yes, but this means your "Fork, deploy, customize" instructions are incomplete. I created a PR: #105.