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

Error compiling to JavaScript. XMLHttpRequest error. #1554

Closed
swavkulinski opened this issue May 11, 2020 · 29 comments
Closed

Error compiling to JavaScript. XMLHttpRequest error. #1554

swavkulinski opened this issue May 11, 2020 · 29 comments

Comments

@swavkulinski
Copy link

What happened?

Console: Error compiling to JavaScript:
XMLHttpRequest error.

It was working fine through the morning. Suddenly it started to fail on every request. Is backend down?

Steps to reproduce problem

Start new Pad with Dart only
Press start button
Nothing happens
Try reload the page

error shows in the console:
Console: Error compiling to JavaScript:
XMLHttpRequest error.

Additional info

Browser

Browser: Chrome

Version: Version 81.0.4044.138 (Official Build) (64-bit) (MacOSX)

Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)?

Are there any warnings or errors in your browser's JavaScript console?
If so, paste them below:

[paste warnings or errors here]

Machine

Operating system: MacOSX

Version: Catalina

Your code

What code was in the editor, if any, when the failure occurred? You
can paste it in below:

void main() {
  for (int i = 0; i < 5; i++) {
    print('hello ${i + 1}');
  }
}

DartPad's output

Did DartPad print anything to the console pane? If so, paste it below:

Error compiling to JavaScript:
XMLHttpRequest error.

If you were running Flutter code, you can also paste an image of the
Flutter output directly into this bug report.

@Dalamar
Copy link

Dalamar commented May 11, 2020

Same issue here.

@swavkulinski
Copy link
Author

same on other browsers

@joshuadeguzman
Copy link

joshuadeguzman commented May 11, 2020

Encountered the same, I actually just filed #1555. Though I experienced it inside embedding.

@camillo777
Copy link

Same here. I can add this error:

Error compiling to JavaScript:
TimeoutException after 0:01:00.000000: Future not completed

@prabakaran-Code
Copy link

Yes same Error found

@nagarjunvv
Copy link

Even I am facing same issue, it was working fine yesterday night.

@Eyitemi01
Copy link

same error over here

@kolmakovruslan
Copy link

Chrome console output
DevTools failed to load SourceMap: Could not load content for https://dartpad.dev/split.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE DevTools failed to load SourceMap: Could not load content for https://dartpad.dev/scripts/playground.dart.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE flutter:1 Access to XMLHttpRequest at 'https://dart-services.appspot.com/api/dartservices/v2/version' from origin 'https://dartpad.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. playground.dart.js:9292 POST https://dart-services.appspot.com/api/dartservices/v2/version net::ERR_FAILED b4 @ playground.dart.js:9292 Cc @ playground.dart.js:1347 (anonymous) @ playground.dart.js:13182 (anonymous) @ playground.dart.js:1415 $2 @ playground.dart.js:6575 $1 @ playground.dart.js:6567 fl @ playground.dart.js:7371 $0 @ playground.dart.js:6933 eO @ playground.dart.js:1495 d0 @ playground.dart.js:6841 $0 @ playground.dart.js:6896 EF @ playground.dart.js:1525 EL @ playground.dart.js:1527 $1 @ playground.dart.js:6522 Fw @ playground.dart.js:532 (anonymous) @ playground.dart.js:540 childList (async) $1 @ playground.dart.js:6529 zP @ playground.dart.js:1532 e9 @ playground.dart.js:1593 ap @ playground.dart.js:6853 cD @ playground.dart.js:11673 hJ @ playground.dart.js:11206 eval @ VM790:3 $0 @ playground.dart.js:6733 $1 @ playground.dart.js:6741 cN @ playground.dart.js:7350 $1 @ playground.dart.js:7387 CH @ playground.dart.js:1451 CI @ playground.dart.js:1445 jj @ playground.dart.js:11204 (anonymous) @ playground.dart.js:11782 (anonymous) @ playground.dart.js:1415 $2 @ playground.dart.js:6575 by @ playground.dart.js:1401 d3 @ playground.dart.js:11784 jO @ playground.dart.js:11687 Dd @ playground.dart.js:4863 As @ playground.dart.js:5023 (anonymous) @ playground.dart.js:17220 (anonymous) @ playground.dart.js:17215 dartProgram @ playground.dart.js:17218 (anonymous) @ playground.dart.js:17220 flutter:1 Access to XMLHttpRequest at 'https://dart-services.appspot.com/api/dartservices/v2/analyze' from origin 'https://dartpad.dev' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. playground.dart.js:9292 POST https://dart-services.appspot.com/api/dartservices/v2/analyze net::ERR_FAILED

@swavkulinski
Copy link
Author

Can't replicate anymore. Looks like the backend is working again.

@Eyitemi01
Copy link

same error over here

it works now

@RedBrogdon
Copy link
Contributor

First off, thanks to @swavkulinski and the rest of you for reporting.

This morning, we experienced an outage in dart-services that we're still investigating. We've been able to bring the service back up, as you noticed, but the root cause has yet to be identified.

From here, we're going to:

  • Determine exactly what caused dart-services to get into a non-working state, and
  • Determine how we can get better monitoring/alerting in place. This could have been a thirty-minute problem rather than a six-hour problem, had the right people been notified at the right time.

I'm closing this issue, since calls to dart-services are once again working. While I'm bummed that so many people have been inconvenienced, the fact that so many of you noticed is a good signal that we're building something people like and care about. Thanks again for reporting the problem!

@allentv
Copy link
Contributor

allentv commented May 12, 2020

The CORS issue is still present. Here the screenshot from today

Screenshot 2020-05-12 at 19 38 09

@nuggetsnetwork
Copy link

getting the same issue

@vineetg3
Copy link

Same issue being reproduced.
I tried enabling CORS, disabling adblock , tried on Chrome and Firefox(latest versions) and even used a vpn.

@allentv
Copy link
Contributor

allentv commented May 12, 2020

I am getting The server encountered a temporary error and could not complete your request. Please try again in 30 seconds. when I try a POST request through Postman.

@allentv
Copy link
Contributor

allentv commented May 12, 2020

So I downloaded the dart-services repo on my machine and ran the service locally. I made a POST request via Postman to the analyze endpoint and can confirm that the CORS headers are available in the response.

Screenshot 2020-05-12 at 21 49 00

The issue seems to be a problem with the server which seems to be working now.

@domesticmouse
Copy link
Member

Yeah it went sideways again. Restarted everything, this time with a rolling restart after four hours policy

@MohamedAlsadig
Copy link

I learned from someone in an Arabic forum that the cause of this problem is to prevent access from this geographical location, try to log in with a Vpn.

@gppam
Copy link

gppam commented Nov 7, 2020

Just experienced this error. Went to dartpad after the dart.dev examples didn't work (which has the same error as dartpad).

Screen Shot 2020-11-07 at 5 39 52 PM

@domesticmouse
Copy link
Member

Please re-try. We recycle servers every 1.5 hours (give or take) in an effort to deal with these issues.

@Bukharee
Copy link

Bukharee commented Feb 2, 2021

Error compiling to JavaScript:
XMLHttpRequest error. i dont know why im burnt out !!!

@HicksonWei
Copy link

image

Chrome DevTools Console Error:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://dartpad.dev') does not match the recipient window's origin ('null').

@patzu
Copy link

patzu commented Apr 13, 2021

same error happening here as well. What is this?

@domesticmouse
Copy link
Member

Please raise a new issue with steps to reproduce the error.

@rshash30
Copy link

rshash30 commented Nov 8, 2021

You Should run a VPN and it will work correctly

@domesticmouse
Copy link
Member

Actually, these errors were due to unhappy servers. We have done a lot of work to improve the stability of the compilation service. Using VPN service probably wouldn't have helped in this instance.

Thanks!

@tunjineo
Copy link

Error compiling to JavaScript:
LateInitializationError: Field 'version' has not been initialized.

This happens on the flutter website

@parlough
Copy link
Member

Error compiling to JavaScript: LateInitializationError: Field 'version' has not been initialized.

This happens on the flutter website

Thanks for the report @tunjineo. I'm tracking the issue in #2494 and have a fix prepared at #2495.

@IshitaPathak
Copy link

In my case this error occurs due to some network issues 🥲

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