From a790ed5697286c2e6c96bb3bb22671706c106d63 Mon Sep 17 00:00:00 2001 From: Salakar Date: Wed, 9 Oct 2019 10:35:16 +0100 Subject: [PATCH] [auth] create a stack trace for phone auth listener (fixes #2639#issuecomment-539915313) --- packages/auth/lib/PhoneAuthListener.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/auth/lib/PhoneAuthListener.js b/packages/auth/lib/PhoneAuthListener.js index 9640bcfd..a778115d 100644 --- a/packages/auth/lib/PhoneAuthListener.js +++ b/packages/auth/lib/PhoneAuthListener.js @@ -26,6 +26,7 @@ export default class PhoneAuthListener { this._reject = null; this._resolve = null; this._promise = null; + this._jsStack = new Error().stack; this._timeout = timeout || 20; this._phoneAuthRequestId = REQUEST_ID++; @@ -172,7 +173,7 @@ export default class PhoneAuthListener { state: 'error', }; - snapshot.error = new NativeFirebaseError({ userInfo: state.error }, null, 'auth'); + snapshot.error = new NativeFirebaseError({ userInfo: state.error }, this._jsStack, 'auth'); this._emitToObservers(snapshot); this._emitToErrorCb(snapshot);