GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
554 stars 79 forks source link

With latest, seems like the recent fix for Firestore documents broke something else. #166

Closed WolfgangSenff closed 3 years ago

WolfgangSenff commented 3 years ago

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"

        match action:
            Task.TASK_LIST, Task.TASK_QUERY:
                data = bod[0].error
                emit_signal("error", data.code, 0, data.message)
            _:
                data = bod.error #this line throws the error
                emit_signal("error", data.code, 0, data.message)

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

DanielVZ96 commented 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: