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

Unable to Connect Remote Server #142

Open
ankitshankar123 opened this issue Mar 21, 2024 · 2 comments
Open

Unable to Connect Remote Server #142

ankitshankar123 opened this issue Mar 21, 2024 · 2 comments

Comments

@ankitshankar123
Copy link

Hello Please Help! me i am stuck in very big issues as when is use ws url Colyseus not working in iOS device but when i use wss url its give error that unable to connect Remote Server. Can you please give me Some solution urgently.

@ankitshankar123
Copy link
Author

Hello @endel please help me we are not able to connect wss in old colyseus version can you please help

@omarsdev
Copy link

omarsdev commented Aug 12, 2024

Hey @endel I'm facing the same issue while trying to connect to my remote server using the

const client = new Client('ws://${IP}:${PORT}');

it's seems to be working perfectly on the Android device but not on the IOS device

client
    .joinOrCreate('my_room')
    .then(room => {
      roomInstance = room;
      console.log(room.roomId, room.sessionId, 'joined', room.name);

      room.onError((code, message) => {
        console.log(
          `Room error (${code}): ${message}, attempting to rejoin...`,
        );
        rejoinRoom();
      });
    })
    .catch(error => {
      console.error('Failed to join room:', JSON.stringify(error));
      setTimeout(joinRoom, 5000); // Retry after 5 seconds
    });

And the error that I receive on the IOS side ONLY
Failed to join room: [ServerError: Network request failed]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants