question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: The XMLHttpRequest compatibility library was not found.

See original GitHub issue

Hi guys

I’ve recently updated my angularfire2 to version RC6, which stopped my webapp from being served as SSR webapp. I’ve provided information below. I hope this will suffice. 😃

Version info

"dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@firebase/app": "^0.1.8",
    "angularfire2": "5.0.0-rc.6",
    "core-js": "^2.4.1",
    "firebase": "4.9.1",
    "path": "^0.12.7",
    "rxjs": "^5.5.1",
    "zone.js": "^0.8.14"
}

How to reproduce these conditions

Install angularfire2 with firebase as per my dependency versions.

Steps to set up and reproduce I’ve setup a firebase function which serves my application like shown in the video from firebase -> Link to firebase tutorial When trying to access my site online, it comes out with a 503 - first byte timeout

This did not appear until i updated angularfire2 to version rc6. Since then i’ve had this error. Note that i’ve tried with multiple versions of "firebase" this includes 4.8.0, 4.8.2 and 4.9.0 without luck. Everything compiles perfectly when running ng serve.

Debug output

I’ve checked the functions logs and this error comes out. Unhandled Promise rejection: The XMLHttpRequest compatibility library was not found. ; Zone: <root> ;

Errors in the JavaScript console GET https://path-to-site 503 ()

Screenshot

Screenshot 1 screen shot 2018-02-09 at 14 07 37

Screenshot 2 screen shot 2018-02-09 at 14 14 51

Screenshot 3 screen shot 2018-02-09 at 14 26 35

Expected behavior

Should serve the webapp

Actual behavior

Comes out with service unavailable and function log errors

I hope i’ve provided sufficient data for you guys to take a look at. I can provide more information if need be.

Kind regards Chris

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
davideastcommented, Feb 9, 2018

Hey @chriseenberg! AngularFire currently doesn’t work with Angular Universal but we are very close!

I’m not sure what you were doing to get it working before, but it shouldn’t have been. I hope we are only around a week away from getting Universal support released to a next tag. I’m closing this issue to keep the conversation confined the the PR I linked above. Feel free to follow that and post any comments or feedback there.

0reactions
davideastcommented, Apr 26, 2018

@davidmartinezros See the comment above yours about installing angularfire2@next. It should solve this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: The XMLHttpRequest compatibility library was not ...
I had the same issue by using Angularfire2 with Universal Server Side rendering. I've solved it by adding the xmlhttprequest to my server.js...
Read more >
The XMLHttpRequest compatibility library was not found ...
UnhandledPromiseRejection: Error: ENOENT: no such file or directory, open '/var/task/functions/protos/google/firestore/v1/firestore.proto'"," at process.
Read more >
The XMLHttpRequest compatibility library was not found.
Hi, Im new to universal. first I fixed an error 'cannot read property 'filter' of undefined' by going into ...
Read more >
"The XMLHttpRequest compatibility library was not found." ...
When doing the same in Frontity, I receive an error saying “Error: The XMLHttpRequest compatibility library was not found.”.
Read more >
Using XMLHttpRequest - Web APIs | MDN
In this guide, we'll take a look at how to use XMLHttpRequest to issue HTTP requests in order to exchange data between the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found