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

Printing "Hello World" outputs this error: Error compiling to JavaScript: XMLHttpRequest error #2503

Closed
tokamohamedQC opened this issue May 1, 2023 · 9 comments
Labels
area-dart-services closed-stale Closed as the issue or PR is assumed stale. type-question A question about expected behavior or functionality

Comments

@tokamohamedQC
Copy link

So I'm Trying to print "Hello World" using dartpad, but error is displayed: Error compiling to JavaScript:
XMLHttpRequest error.

Browser: Chrome
OS: windows

@parlough
Copy link
Member

parlough commented May 1, 2023

Thanks for opening an issue!

Could you provide us with the full code you are using?

I just tried:

void main() {
  print('Hello world!');
}

and it worked as expected: https://dartpad.dev/?id=571b1f6e6611e62fa55fe04f04b527bc

@tokamohamedQC
Copy link
Author

void main() {

print('Hello');
}

@tokamohamedQC
Copy link
Author

I tried your code and I got same error

@parlough
Copy link
Member

parlough commented May 1, 2023

Thanks for the information.

Could you try opening the Chrome DevTools Console and letting us know what shows up when you try running the code?

It could be your network blocking access. Consider trying at https://dartpad.cn and seeing if that works.

@tokamohamedQC
Copy link
Author

Here's a screenshot of network: https://prnt.sc/xCWnjC11LPpH
and I tried other link and worked perfectly
Thanks

@domesticmouse
Copy link
Member

This is working for me, so it doesn't appear to be a server-side issue. That leaves one of the thirty of so middleboxes between your browser and our server, and that's a hard issue to debug from here.

I'd suggest trying alternate networks to see if you can find one that works.

@parlough
Copy link
Member

parlough commented May 2, 2023

If you are in Egypt, this seems to have been a recurring issue with some Egypt ISPs for many sites.

For now, try other networks as domesticmouse mentioned or use https://dartpad.cn if those don't work. You can also Get Dart or Get Flutter to run code on your own machine too :D

@printgourav
Copy link

The Problem seems to be with your Internet Service Provider if possible switch to one or
best would be you download Dart SDK Directly into your PC.

@johnpryan johnpryan added type-question A question about expected behavior or functionality area-dart-services labels Jan 8, 2024
@parlough
Copy link
Member

Thanks again for the report! I'm going to close this issue as stale, as it is likely a local network setup issue or an ISP level problem.

If someone is still experiencing similar issues, please open a new issue with reproduction details and network information. Thanks again :)

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
@parlough parlough added the closed-stale Closed as the issue or PR is assumed stale. label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart-services closed-stale Closed as the issue or PR is assumed stale. type-question A question about expected behavior or functionality
Projects
None yet
Development

No branches or pull requests

5 participants