Giter Site home page Giter Site logo

Comments (7)

jwerle avatar jwerle commented on May 23, 2024

I tried your repo on my macOS machine and it seems to work there. I'll try again later on my Windows machine and report back.

from socket.

rorymcd98 avatar rorymcd98 commented on May 23, 2024

@jwerle thanks I'll try again later on another windows intel machine.

from socket.

rorymcd98 avatar rorymcd98 commented on May 23, 2024

More info. It doesn't work on my other windows 11 machine (identical error log I believe).

It does work on Linux Fedora 39.

from socket.

jwerle avatar jwerle commented on May 23, 2024

@rorymcd98 okay! We'll dive in and figure this out

from socket.

rorymcd98 avatar rorymcd98 commented on May 23, 2024

Thanks - I'll work on Linux for now. Let me know if you need more info.

from socket.

garth avatar garth commented on May 23, 2024

I think I may have found the issue... I get CORS errors when running from a regular command prompt, but if when starting from a Visual Studio Command Prompt the CORS errors are gone and the app loads.

Update:

This only fixes the issue with a production build. Starting the app in development (with vite) still has CORS errors even though vite is configured to allow any origin.

from socket.

WolfBearGames avatar WolfBearGames commented on May 23, 2024

I'm running into the same problem on Windows. It seems to work on Linux though.

Edit:
I tried to investigate the differences between Linux and Windows.
On Windows the request to "socket://internal/init" fails because the CORS headers are missing.
On Linux there does not seem to be CORS check, so the resource is requested responded correctly.

So, the webviews on Windows and Linux seem to handle the request differently.

Edit 2:
Running the app without the vite dev server ("ssc build -r") works. When using the context menu to reload the page one can the request to "socket://internal/init". In this case the request works and has response headers (Access-Control-Allow-Headers: * and Access-Control-Allow-Origin: *).

from socket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.