Closed WolfgangSenff closed 3 years ago
This is currently happening to me but I haven't updated or anything. The only difference is that I'm using a slower connection. The bug appears because the task is being called while GodotFirebase is in offline mode and it doesn't provide a body correctly. Here's a rough stack trace:
_on_request_completed
tries to get bod.error
, but bod
was built from the empty PoolByteArray
else:
match action:
Task.TASK_LIST, Task.TASK_QUERY:
data = bod[0].error
emit_signal("error", bod[0].error)
_:
---> data = bod.error
printerr(bod.error)
emit_signal("error", bod.error)
PoolByteArray
instead of a JSON containing error
func _pooled_request(task : FirestoreTask) -> void:
if _offline:
---> task._on_request_completed(HTTPRequest.RESULT_CANT_CONNECT, 404, PoolStringArray(), PoolByteArray())
return
When I call
collection.get("DOCUMENT_ID")
I receive the following error:
Invalid get index "error" (on base: "Dictionary")
on line 154 in "firestore_task.gd"
I've also already pulled the latest GodotFirebase changes at the time of this posting
Thanks in advance for any pointers or assistance!
Originally posted by @Rysm in https://github.com/GodotNuts/GodotFirebase/discussions/165