Похожие чаты

This is my code to get user auth on firebase. The

problem is when I'm offline it throws an error `auth/internal error`, but the promise doesn't catch it and app crashes!!
I know it's something wrong with handling the promise.
Any help?

6 ответов

6 просмотров

just to know, what is the value of userState when the you are offline?

Promises only resolve once, but your auth state can change multiple times.

u should resolve or reject promise inside callback

Oh yeah, that's a good first step lol

Banana
Oh yeah, that's a good first step lol

i didn't use firebase https://firebase.google.com/docs/reference/js/v8/firebase.auth.Auth#onauthstatechanged mb smth like const onAuthStateChangedPromise = new Promise((resolve, reject) => auth.onAuthStateChanged(resolve, reject));

Похожие вопросы

Обсуждают сегодня

Hey everyone! I won’t focus too much on what this person said (it’s clear they don’t understand the scope of what TF and TELOSX are achieving), but I’ll put it simply for thos...
Ana Ojeda
3
Hi did any of you experience a file error when download hex file for Windows?
Valya
17
как правильно удалить сддм? прописал в etc/portage.use/plasma-meta -sddm , но при обновлении юзов мне предлагает поставить lightdm (ещё лучше 😡), добавил туда - display-manage...
REDis
25
Коллеги, я тут для личных нужд пошел ставить MQTT сервер, пощупал mosquitto, но ужаснулся отсутствию такой банальности, как HTTP API для посмотреть список топиков. А тут что,...
Maksim Lapshin
13
Could the new Norse labs apps have just been called "VPN" instead of DVPN?
HDGVII
14
Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
i have a small doubt i developed a rest API in put mapping (we use if more than one filed needs to be updated by user ) but concern is i am using dto class in that i am u...
Surya
6
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
#include <stdio.h> #include <stdlib.h> #include <time.h> void mass_first_generate(int mass[5][7]) {     for (int N = 0; N < 5; N++) {         for (int A = 0; A < 7; A++) {   ...
Чувак
6
Telos is at a pivotal moment. While ambitious projects like zkEVM and SNARKtor have shown promise, the delay in delivering EVM 2.0—a cornerstone of the ecosystem—is a growing ...
Trinidad
8
Карта сайта