Can't connect on server #74
Replies: 4 comments 2 replies
-
I tried adding socketio to the bootstrap function without the plugin to see what happens, but the connection error also occurred. bootstrap({ strapi }) {
const io = new Server((strapi as LoadedStrapi).server.httpServer, {
cors: {
origin: "*",
methods: ["GET", "POST"]
}
});
io.on("connection", (socket) => {
console.log("User connected");
}
} |
Beta Was this translation helpful? Give feedback.
-
Versions 4.15.0 and 4.15.1 are deprecated version due to them having various issues. I would upgrade to the latest version (v4.15.5 ) and see if the issue still occurs. |
Beta Was this translation helpful? Give feedback.
-
Hi! I tried updating the version but that didn't solve it, the problem kept happening. I also tried to create a new project from strapi 0 and the installation didn't work. I'll leave the link with some videos showing my tests. https://drive.google.com/file/d/1AKCMV50tteT9r6U4T1HxMOfm5PpApjKR/view?usp=sharing |
Beta Was this translation helpful? Give feedback.
-
I have a strapi 4.15.0 and installed the plugin. Set the plugins.ts to
And I have a client for testing that is the same of the example on documentation. But I simply can't connect.
![image](https://private-user-images.githubusercontent.com/143028023/289088750-e55b9ce9-620d-4bd1-a73d-30249e2a5851.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTIzMjksIm5iZiI6MTczOTI5MjAyOSwicGF0aCI6Ii8xNDMwMjgwMjMvMjg5MDg4NzUwLWU1NWI5Y2U5LTYyMGQtNGJkMS1hNzNkLTMwMjQ5ZTJhNTg1MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQxNjQwMjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kZjE5ZmI0ZjhjNzFlOWNjMWYzMjZhNzE3YWZhNjZkY2E2ZTk5MDhmYzM0MDkwNDQ4ZTYwN2RmZTBmZWFkNjRjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9._Rj9No_A0SX8dkKfDlCP7chZrjB6tk8g3caQmb-MHmE)
The configuration seems to be ok
But I all get is:
trying to connect http://localhost:4000
connect_error due to xhr poll error
connect_error due to xhr poll error
trying to connect http://localhost:4000
connect_error due to websocket error
connect_error due to websocket error
Beta Was this translation helpful? Give feedback.
All reactions