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

' An authentication token is required, but you didn’t send one' #866

Open
jloganolson opened this issue Oct 24, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@jloganolson
Copy link
Collaborator

So i'm still seeing this issue 556:
[HocuspocusProvider] An authentication token is required, but you didn’t send one. Try adding a token to your HocuspocusProvider configuration. Won’t try again.

And the provider is disconnected until I restart the server

But only on my node server (not web client) - the server is using the provider with HocuspocusProviderWebsocket

export const socket = new HocuspocusProviderWebsocket({
    WebSocketPolyfill: WebSocket, url: WS_URL
});

    const provider = new HocuspocusProvider({
        name: projectId,
        websocketProvider: socket,
        token: 'notoken' //necessary for the server to work
    })

Is there a workaround I should add? I'm using the most up to date release of hocuspocus (2.13.7)

@jloganolson jloganolson added the bug Something isn't working label Oct 24, 2024
@jloganolson
Copy link
Collaborator Author

This works but is pretty yikes

export const socket = new HocuspocusProviderWebsocket({
    WebSocketPolyfill: WebSocket,
    url: WS_URL,
    //hack to keep the socket alive
    onDisconnect: () => {
        socket.connect();
    }
});

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