Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] task_error signal unable to convert argument from int to String #315

Closed
Tailchakra opened this issue Oct 24, 2022 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Tailchakra
Copy link

Describe the bug
The addon is unable to convert an argument type during a query call on a collection. Authenticating works like a charm, however calling a collection returns the error upon query.from.

Expected behavior
I expected to grab the skill tree data from the database, instead it returned an error.

To Reproduce

func _ready():
	Firebase.Auth.connect("login_succeeded", self, "_on_login_succeeded")
	Firebase.Auth.connect("login_failed", self, "on_login_failed")
	Firebase.Auth.login_with_email_and_password(auth_email, auth_password)

func GetSkillTree():
	var query = FirestoreQuery.new()
	query.from("skill_tree", false)
	var result = yield(Firebase.Firestore.query(query), "result_query")
	
	print(result)

func _on_login_succeeded(_auth):
	yield(GetSkillTree(), "completed")

image

Environment:

  • OS: Windows 11

Additional context
ADD: I have cache turned OFF

E 0:00:07.956   emit_signal: Error calling method from signal 'task_error': 'Node(firestore.gd)::_on_task_error': Cannot convert argument 2 from int to String..
  <C++ Source>  core/object.cpp:1242 @ emit_signal()
  <Stack Trace> firestore_task.gd:170 @ emit_error()
                firestore_task.gd:155 @ _on_request_completed()
                firestore.gd:303 @ _pooled_request()
                firestore.gd:153 @ query()
                Database.gd:28 @ GetSkillTree()
                Database.gd:227 @ _on_login_succeeded()
                auth.gd:416 @ _on_FirebaseAuth_request_completed()
@Tailchakra Tailchakra added the bug Something isn't working label Oct 24, 2022
@BearDooks
Copy link
Member

@Tailchakra Thanks for submitting this. I will be testing over the next week and let you know what I find

@BearDooks BearDooks self-assigned this Jan 20, 2023
@WolfgangSenff
Copy link
Collaborator

I have resolved this through a very long path - namely, I have done a huge refactor of the entire Firestore codebase to remove FirestoreTask altogether (from public usage). Please see this guide for more on how to approach something like the above, and apologies it took me so long to get the fix in! This refactor has been a long time in coming.

https://github.com/GodotNuts/GodotFirebase/wiki/Upgrade-Guide-to-4.x-version-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants