Subscriptions-transport-ws: Cannot set property 'readyState' of undefined

Created on 7 Dec 2019  路  3Comments  路  Source: apollographql/subscriptions-transport-ws

subscriptions-transport-ws dependency of ws, but this is already missing 2 major version.

this version make my server crash

issue

subscriptions-transport-ws can update to 7.2?

  websocket.readyState = WebSocket.CLOSING;
                       ^

TypeError: Cannot set property 'readyState' of undefined
    at Socket.socketOnClose (/Users/aru/Desktop/WanFang/onecare_server/node_modules/ws/lib/websocket.js:757:24)
    at Socket.emit (events.js:194:15)
    at TCP._handle.close (net.js:597:12)

Most helpful comment

This is still occuring, still no update?

All 3 comments

This is still occuring, still no update?

I am also getting this issue,
Code:

//GQL
GQLServer.applyMiddleware({ app });
const server = createServer(app);
GQLServer.installSubscriptionHandlers(server);

server.listen(port, () => {
    new SubscriptionServer(
        {
            execute,
            subscribe,
            schema: buildSchema(typeDefs),
        },
        {
            server: server,
            path: '/graphql',
        },
    );
});

+1

Was this page helpful?
0 / 5 - 0 ratings