After some pain trying to get oTToDev talking to Ollama, I can now get it to inference with standard questions like hello etc. However, cant get it to action anything I assume because of this error message which appears in the Bolt Terminal:
Failed to spawn bolt shell
Failed to execute ‘postMessage’ on ‘Worker’: SharedArrayBuffer transfer requires self.crossOriginIsolated.
@Arka I was having trouble finding it, but I believe you had some suggestions about the prompt that also included coverage of COOP/COEP issues. If I’m remembering correctly, could you link to that here?
I’d like to surface this if it’s going to be a consistent issue with deployment of generated artifacts in production. Thanks
Little confused… the issue presents trying to render the terminal, so somewhat confused how prompt engineering could have anything to do with it? Dev console is full of CORS issues before even entering anything into the prompt asl well.
make sure to use the Cross-Origin-Embedder-Policy: credentialless variant in our configuration to allow loading the resources without credentials.
credentialless is the thing, because the preview display window is considered a “window within a window” (I don’t know the correct name for this), browsers are prohibited from showing websites inside websites
also: in browser console - you can copy errors and give them to llm - in 80% of cases the models can fix the errors themselves
The error is occurring in the bolt terminal not the preview window, I can understand that prompting not to use CORS could affect the preview window, but we can’t even get that far, our error occurs before the model even builds anything
I encountered the same error when running the setup on my home-lab server (Ubuntu 22) and accessing it from my laptop (Windows). Initially, I used the command “pnpm run dev --host”.
With this setup, I could access the oTToDev GUI, and various AI models were working without generating any code (my tokens were being consumed). However, I received the following error on my Bolt terminal:
Failed to spawn bolt shell
Failed to execute ‘postMessage’ on ‘Worker’: SharedArrayBuffer transfer requires self.crossOriginIsolated.
To resolve this, I used the following command (root access is needed, and use HTTPS as the default is HTTP):
“pnpm run start --local-protocol https --ip 192.168.0.xxx”
This worked for me.
Note: Everything works if i use “pnpm run dev” and run on localhost, so i assume its not related to context. what i suspect is the server needs to allow CORS policy so request coming from different origin(different ip/system) gets through.
Well alright, that explains a majority of my evening last night. DAMN. I’m away from keyboard, but yeah I couldn’t make heads or tails of this last night **until I started accidentally opening http localhost in Brave. 2 hours gone c’est la vie.
We have to make sure this is crystal clear at top of README, or something… I have a feeling many getting started have encountered this thinking Brave might be close enough to Canary. **Also if there is a specific dependency on Canary, there are some references to polyfilling against Chrome 129 for whatever purpose. Canary I believe is already at 132 so the sooner we can knock off this bug find and the Canary requirement the better. Hashtag thoughts
I spung up a new windows VM to test this “Cross-Origin” issue and I was able to bypass the error or reproduce it at will. The bypass is just a workaround not a solution as I am able to get the code to run in the bolt window only. We will need to pinpoint the exact setting that needs to be disabled/allowed in your browser, so yes, the workaround is to go into “Internet Option” and set it to a custom setting with most option set to allow allowed along with XSS filter. As stated this is not a solution as I bypass most of the browser security settings. Help! Cross-origin. Can't get this working for the life of me!