You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to read from a ref with no read permission results in an error: Uncaught TypeError: Cannot read property 'hasCancelCallback' of undefined. Stack trace I'm seeing is:
Uncaught TypeError: Cannot read property 'hasCancelCallback' of undefined
at ChildEventRegistration.createCancelEvent (index.esm.js:13164)
at index.esm.js:9384
at Array.forEach (<anonymous>)
at viewRemoveEventRegistration (index.esm.js:9383)
at syncPointRemoveEventRegistration (index.esm.js:9596)
at syncTreeRemoveEventRegistration (index.esm.js:9900)
at onComplete (index.esm.js:10200)
at Object.onComplete (index.esm.js:11199)
at index.esm.js:3351
at PersistentConnection.onDataMessage_ (index.esm.js:3566)
at Connection.onDataMessage_ (index.esm.js:2411)
at Connection.onPrimaryMessageReceived_ (index.esm.js:2405)
at WebSocketConnection.onMessage (index.esm.js:2307)
at WebSocketConnection.appendFrame_ (index.esm.js:1917)
at WebSocketConnection.handleIncomingFrame (index.esm.js:1965)
at WebSocket.mySock.onmessage (index.esm.js:1864)
The cancelCallbackOrContext is no longer being called, either.
Previously the error was effectively ignored (and certainly didn't cause the running script to crash), and if a cancelCallbackOrContext parameter was provided, it was called.
I confirmed this works in SDK v8.3.3.
Steps to reproduce:
Update to firebase@8.4.1.
Add a child_added event listener to a path in which the authenticated user does not have read access
Relevant Code:
firebase.database().ref("/some/path/with/no/read/access").on("child_added",()=>{},(error)=>{// This gets called in SDK v8.3.3 and earlier, but not after 8.4.0});
The text was updated successfully, but these errors were encountered:
joekrill
changed the title
Error handlers no longer being called for reference listeners, permission causes crash
Error handlers no longer being called for reference listeners, permission denied causes crash
Apr 21, 2021
Hi @joekrill, thanks for the report. I was able to replicate the behavior where the error could no longer be caught in the callback using SDK version 8.4.1.
I've filed an internal bug for this issue. Please use the working version for the meantime.
Describe your environment
Describe the problem
Attempting to read from a ref with no read permission results in an error:
Uncaught TypeError: Cannot read property 'hasCancelCallback' of undefined
. Stack trace I'm seeing is:The
cancelCallbackOrContext
is no longer being called, either.Previously the error was effectively ignored (and certainly didn't cause the running script to crash), and if a
cancelCallbackOrContext
parameter was provided, it was called.I confirmed this works in SDK v8.3.3.
Steps to reproduce:
firebase@8.4.1
.child_added
event listener to a path in which the authenticated user does not have read accessRelevant Code:
The text was updated successfully, but these errors were encountered: