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

Create a chat-client demo using the standard browser WebSockets API (php). #38

Open
jonasfroeller opened this issue Apr 20, 2024 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed sprint-07 sprint info task Work, to do.

Comments

@jonasfroeller
Copy link
Member

https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_client_applications

@jonasfroeller jonasfroeller changed the title Create a demo using the standard browser WebSockets API (php). Create a chat demo using the standard browser WebSockets API (php). Apr 20, 2024
@jonasfroeller jonasfroeller added the enhancement New feature or request label Apr 21, 2024
@jonasfroeller jonasfroeller changed the title Create a chat demo using the standard browser WebSockets API (php). Create a chat-client demo using the standard browser WebSockets API (php). Apr 23, 2024
@jonasfroeller jonasfroeller added the task Work, to do. label May 1, 2024
@jonasfroeller
Copy link
Member Author

vanilla-chat and sveltekit-chat can help with that.

@jonasfroeller jonasfroeller added sprint-06 sprint info sprint-07 sprint info and removed sprint-06 sprint info labels May 20, 2024
@jonasfroeller jonasfroeller self-assigned this May 25, 2024
jonasfroeller added a commit that referenced this issue Jun 5, 2024
@jonasfroeller
Copy link
Member Author

waiting for https://github.com/sirn-se/websocket-php/tree/v3.0-main

Declaration of WebSocket\Client::setLogger(Psr\Log\LoggerInterface $logger): WebSocket\Client must be compatible with Psr\Log\LoggerAwareInterface::setLogger(Psr\Log\LoggerInterface $logger): void

@jonasfroeller jonasfroeller assigned stevan06v and unassigned stevan06v Jun 11, 2024
@jonasfroeller jonasfroeller added the help wanted Extra attention is needed label Jun 13, 2024
@jonasfroeller
Copy link
Member Author

jonasfroeller commented Jun 13, 2024

Property type not supported in Livewire for property: [{}]

@jonasfroeller
Copy link
Member Author

jonasfroeller commented Jun 13, 2024

Maximum execution time of 60 seconds exceeded
PHP is blocking

Connection opened for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection errored for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection closed for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection closed for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection opened for chat room $2y$12$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO
Connection errored for chat room $2y$12$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO
Connection closed for chat room $2y$12$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO
Connection closed for chat room $2y$12$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO
Connection errored for chat room y$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO ErrorEvent {
  bubbles: false,
  cancelable: false,
  composed: false,
  currentTarget: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  defaultPrevented: false,
  eventPhase: 2,
  srcElement: null,
  target: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  returnValue: true,
  timeStamp: 0,
  type: "error",
  message: "No response from ping frame.",
  filename: "",
  lineno: 0,
  colno: 0,
  error: undefined
} {
  binaryType: "arraybuffer",
  close: [Function: close],
  protocol: [Getter],
  raw: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  readyState: [Getter],
  url: null,
  send: [Function: send]
}
Connection closed for chat room y$IDPqikVpYsvrba6yJ8zyxe.iMpotiWVjT0opH2Mdo9PuVZfsAqmrO CloseEvent {
  bubbles: false,
  cancelable: false,
  composed: false,
  currentTarget: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  defaultPrevented: false,
  eventPhase: 2,
  srcElement: null,
  target: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  returnValue: true,
  timeStamp: 0,
  type: "close",
  wasClean: true,
  code: 1005,
  reason: ""
} {
  binaryType: "arraybuffer",
  close: [Function: close],
  protocol: [Getter],
  raw: WebSocket {
    url: "",
    readyState: 3,
    extensions: "",
    protocol: "",
    binaryType: "arraybuffer",
    bufferedAmount: 0,
    onmessage: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onclose: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  readyState: [Getter],
  url: null,
  send: [Function: send]
}

@jonasfroeller
Copy link
Member Author

Invalid status code 401.

WebSocket \ Exception\ HandshakeException

@jonasfroeller
Copy link
Member Author

Connection opened for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection errored for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
Connection closed for chat room $2y$12$W3pHWdAtePn1wjCm4.t4xO9lY9jOcu8/5SC0bDEsaAfSB8pKA5k.K
error: Uncaught (in promise) InvalidStateError: readyState not OPEN
    send: (source) => socket.send(source),
                             ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed sprint-07 sprint info task Work, to do.
Projects
Status: In Progress
Development

No branches or pull requests

2 participants