Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket error when lume --serve #155

Closed
johanbrook opened this issue Dec 26, 2021 · 2 comments
Closed

WebSocket error when lume --serve #155

johanbrook opened this issue Dec 26, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@johanbrook
Copy link

Just dropping this here so that it's tracked:

I'm getting a WebSockets error when running

lume --serve

First the site builds fine, then the server starts. When I visit any page or reload the existing one, this is logged in the lume terminal:

Log
200 /
Socket errored ErrorEvent {
  bubbles: false,
  cancelable: false,
  composed: false,
  currentTarget: WebSocket {
    [Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
    [Symbol()]: {
      assignedSlot: false,
      hasActivationBehavior: false,
      host: null,
      listeners: { open: [Array], close: [Array], error: [Array] },
      mode: ""
    },
    [Symbol("[[server]]")]: true,
    [Symbol(eventHandlers)]: Map {
      "open" => [Function: wrappedHandler] [Object],
      "close" => [Function: wrappedHandler] [Object],
      "error" => [Function: wrappedHandler] [Object]
    },
    [Symbol("[[rid]]")]: 892,
    [Symbol("[[protocol]]")]: null,
    [Symbol("[[readyState]]")]: 3
  },
  defaultPrevented: false,
  eventPhase: 2,
  srcElement: null,
  target: WebSocket {
    [Symbol("[[webidl.brand]]")]: Symbol("[[webidl.brand]]"),
    [Symbol()]: {
      assignedSlot: false,
      hasActivationBehavior: false,
      host: null,
      listeners: { open: [Array], close: [Array], error: [Array] },
      mode: ""
    },
    [Symbol("[[server]]")]: true,
    [Symbol(eventHandlers)]: Map {
      "open" => [Function: wrappedHandler] [Object],
      "close" => [Function: wrappedHandler] [Object],
      "error" => [Function: wrappedHandler] [Object]
    },
    [Symbol("[[rid]]")]: 892,
    [Symbol("[[protocol]]")]: null,
    [Symbol("[[readyState]]")]: 3
  },
  returnValue: true,
  timeStamp: 1640513418825,
  type: "error",
  message: "WebSocket protocol error: Connection reset without closing handshake",
  filename: "",
  lineno: 0,
  colno: 0,
  error: null
}

The browser console logs:

Lume live reloading is ready. Listening for changes...

To clarify further, the auto reload of the site doesn't work due to this.

Details:

  • Safari 14.1.2
  • Lume 1.3.1
  • deno 1.16.4 (release, x86_64-apple-darwin)
  • v8 9.7.106.15
  • typescript 4.4.2
@oscarotero
Copy link
Member

Hi. It seems it's a problem with Safari. In Chrome and FF works fine. I'll take a look.
Thanks!

@oscarotero oscarotero added the bug Something isn't working label Dec 26, 2021
@oscarotero
Copy link
Member

I've fixed it and this patch will be available in the next version of Lume (v2.0.0). If you want to test it now, you can upgrade lume to the latest development version with lume upgrade --dev. Let me know if you find more issues.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants