BitPhinix / slate-yjs

Yjs binding for Slate
https://docs.slate-yjs.dev
MIT License
505 stars 70 forks source link

Nextjs - Firefox can’t establish a connection to the server at ws://127.0.0.1:1234/. #408

Closed pierrelouisdelx closed 4 months ago

pierrelouisdelx commented 1 year ago

Hi, there is an issue using slate-yjs in next@13.4.6. When I try to connect with HocusPocusProvider to my hocus-pocus server the socket connects and disconnects immediately. The connection reach the server but somehow the socket hangs up.

The problem is that for the same code, it's working without any problem with vite but not on nextjs.

Here is the link to reproduce the bug: https://codesandbox.io/p/github/pierrelouisdelx/slate-yjs-next/main?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj6visrd000b3b6239wpwhoy%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522panelType%2522%253A%2522TABS%2522%252C%2522id%2522%253A%2522clj6visrd000d3b620rccr33b%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clj6visrd000b3b6239wpwhoy%2522%253A%257B%2522id%2522%253A%2522clj6visrd000b3b6239wpwhoy%2522%252C%2522activeTabId%2522%253A%2522clj6vnwau00ha3b62y8gh3hl2%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clj6visrd000a3b62w5cdh252%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fpackage.json%2522%252C%2522id%2522%253A%2522clj6vnwau00ha3b62y8gh3hl2%2522%252C%2522mode%2522%253A%2522temporary%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%257D%252C%2522clj6visrd000d3b620rccr33b%2522%253A%257B%2522id%2522%253A%2522clj6visrd000d3b620rccr33b%2522%252C%2522activeTabId%2522%253A%2522clj6vnj6l008r3b628ulv16z0%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clj6vnj6l008r3b628ulv16z0%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TASK_LOG%2522%252C%2522taskId%2522%253A%2522dev%2522%257D%252C%257B%2522type%2522%253A%2522TASK_PORT%2522%252C%2522taskId%2522%253A%2522dev%2522%252C%2522port%2522%253A3000%252C%2522id%2522%253A%2522clj6vpvr400cm3b62q1y4mx1d%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

BitPhinix commented 1 year ago

Sounds more of an issue with hocuspocus, could you open an issue there? (https://github.com/ueberdosis/hocuspocus)