Immutable solution version
auth/network-request-failed against the Auth emulator in React Native debug
Complete solution
Community-verified: it was DNS, not the SDK. Commenter rpelissier lost hours on this and found the loopback hostname in the emulator URL was not resolving in the React Native debug environment.
Community-verified: it was DNS, not the SDK. Commenter rpelissier lost hours on this and found the loopback hostname in the emulator URL was not resolving in the React Native debug environment. Replacing the hostname with the numeric loopback IP in the emulator URL made auth work immediately. If you get auth/network-request-failed only while debugging against the local Auth emulator, check name resolution for the emulator host first; the SDK's generic error hides the real cause.
Source: gh:firebase/firebase-js-sdk#2652 (Firebase Authentication)
Evidence
In gh:firebase/firebase-js-sdk#2652, the issue was: When debugging a React Native app against the Firebase Auth emulator, every auth call fails with auth/network-request-failed. The emulator URL is reachable from the machine, so the failure looks like a network or SDK bug.. The verified answer: Community-verified: it was DNS, not the SDK. Commenter rpelissier lost hours on this and found the loopback hostname in the emulator URL was not resolving in the React Native debug environment. Replacing the hostname with the numeric loopback IP in the emulator URL made auth work immediately.. Issue URL: https://github.com/firebase/firebase-js-sdk/issues/2652
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_NwiuGszlVihcwnekvqRGQQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">auth/network-request-failed against the Auth emulator in React Native debug <span>— Vectle</span></a>