Trouble with websockets on VueJS front-end

26 views
Skip to first unread message

Noel da Costa

unread,
Feb 20, 2024, 8:26:25 PMFeb 20
to Enterprise Web Developer Community
This might be for Rob Tweed and or Ward Backer,

I've been revisiting QEWD. Nice to see it has evolved a bit. I am getting some difficulties in getting VueJS to work now in the new paradigm. 

I've documented the issue I'm getting in detail here: https://github.com/wdbacker/vue3-qewd-hello-world/issues/1#issue-2144801181

In summary: 
  1. Using docker qewd 
  2. Accessing a REST API directly in the browser works
  3. The basic helloworld qewd-app works
  4. VueJS as a separate app does not work
I'm not sure exactly why but it looks to me like a Cookie issue. I know that the browser security around CORS and Session Cookies was tightened up in 2023 and I suspect this is falling afoul of that change.

I've created a repo containing all this: https://github.com/geoidesic/CLQD

To use it:

  1. Edit the `docker-compose.yml` file to change the container image to suit your platform (it's currently for arm64). 
  2. Run `docker-compose up` from the project root.
  3. Open a second terminal and browse into the `www/hellovue` folder.
  4. Run `npm install` or `yarn` from there (using node >v14)
  5. Run `npm run dev` or `yarn dev`
  6. You can then browse to `localhost:8080/qewd/helloworld` to see the working helloworld qewd-app.
  7. You can browse to `localhost:5173` to see the broken Vue implementation, which loads ok but clicking the send button doesn't actually manage to send a message to the qewd backend that can be processed.

Noel da Costa

unread,
Jul 5, 2024, 4:54:35 AM (12 days ago) Jul 5
to Enterprise Web Developer Community
Nudge!  Please help...

Tx

Reply all
Reply to author
Forward
0 new messages