firebase-admin-java
firebase-admin-java copied to clipboard
Realtime Database Async update hangs on error
[REQUIRED] Step 2: Describe your environment
- Operating System version: Docker openjdk:8 running on Google Cloud Run
- Firebase SDK version: 8.0.1
- Library version: 8.0.1
- Firebase Product: RT Database (auth, database, storage, etc)
[REQUIRED] Step 3: Describe the problem
I made an update request with a completionListener with a badly sanitized key that had " and :. While I handled errors, this caused the request to end with an Internal error code. I forced the database call to timeout and received an error saying that my input was malformed.
Expectations: if the call to the database is malformed, it should just quit immediately instead of hang.
Steps to reproduce:
- Call the updateChildren function with a malformed key
- Force the callback to terminate (I used 5 seconds)
- You should see an error s.a Firebase Database error: Invalid token in path
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hey @nsadeh I think I am experiencing the same problem. Noob question: how did you force the call to timeout?
Hey @jsdt can we get a quick comment on this issue just so we know the status when you have a second?
@stopachka it depends on what library you're using for async computation, but I wrapped my call to the DB in a future of some kind and then awaited it with a timeout. This is never good practice for production, but was useful to debug this issue, which is why it's important for this issue to be fixed.
When I am home from work I can post a more complete example of what I did, but since it's in Scala it might be less useful for you if you're using Java.