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

Flutter Web CORS Issue #121

Open
trey-a-hope opened this issue Jan 1, 2025 · 0 comments
Open

Flutter Web CORS Issue #121

trey-a-hope opened this issue Jan 1, 2025 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@trey-a-hope
Copy link

trey-a-hope commented Jan 1, 2025

Good evening gentlemen, and happy new year.

Thank you for creating such an awesome package—it's truly helpful with my game development. I've been running into a CORS issue with Flutter web when attempting to connect to my Nakama server deployed on Digital Ocean. The method below throws a Dio error stating "The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an error on the network layer. This indicates an error which most likely cannot be solved by the library." The app works fine when running on iOS or Android simulators. Besides this issue, the package is perfect. Have you encountered this problem before or know how to work around it? I look forward to your response.

`Future _auth() async {
try {
final client = getNakamaClient(
host: '24.144.85.68',
ssl: false,
serverKey: 'defaultkey',
httpPort: 7350,
);

final session = await client.authenticateEmail(
  email: '[email protected]',
  password: 'Peachy4040',
);

debugPrint(session.token);

} on DioException catch (e) {
debugPrint(e.message);
}
}`

@ilmalte ilmalte self-assigned this Jan 20, 2025
@ilmalte ilmalte added the type: bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants