Skip to content

firebase.auth() fails in v5.x at nodejs with - "XMLHttpRequest compatibility library was not found" #799

@pontius-g

Description

@pontius-g

I'm submitting a...


[x] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

node index.js

Connecting...

/Users/pontius/Desktop/ipmg-b2b-ott/test-tmp/node_modules/@firebase/auth/dist/auth.js:140
!me())throw new K("internal-error","The XMLHttpRequest compatibility library was not found.");this.c=void 0;me()?this.c=new Pg(self):oe()?this.c=new zh(c):this.c=new Ag}var Fh,L="idToken",Bh=new Ce(3E4,6E4),Ch={"Content-Type":"application/x-www-form-urlencoded"},Dh=new Ce(3E4,6E4),Eh={"Content-Type":"application/json"};function Gh(a,b){b?a.a["X-Firebase-Locale"]=b:delete a.a["X-Firebase-Locale"]}
^
Error: The XMLHttpRequest compatibility library was not found.
npm ERR! code ELIFECYCLE
npm ERR! errno 1

Expected behavior

Anonymous Auth()

Minimal reproduction of the problem with instructions

###server code used as client in nodejs:

const firebase = require("firebase");
firebase.initializeApp(clientSDKapiConfig);
console.log('Connecting...');
firebase.auth().signInAnonymously().catch(e=>{ console.error(e); process.exit(); });

What is the motivation / use case for changing the behavior?

firebase-admin not-used to prevent usage of private-key on non-secure environments

Environment


Firebase version: 5.0.1

 
For Tooling issues:
- Node version: v10.1.0  
- Platform:  Mac,Linux
Others:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions