Skip to content

[BUG] StorageReference _on_task_finished wrong number of argument #469

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

Open
LazyDridri opened this issue Apr 11, 2025 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@LazyDridri
Copy link
Contributor

In storage_reference.gd :
func get_string() -> StorageTask: var task := get_data() task.connect("task_finished", self, "_on_task_finished", [task, "stringify"]) return task
func _on_task_finished(task : StorageTask, action : String) -> void: match action: "stringify": if typeof(task.data) == TYPE_RAW_ARRAY: task.data = task.data.get_string_from_utf8()

In storage.gd, line 310 in _finish_request method:
task.emit_signal("task_finished", task.data)

When emitting signal, an error is logged:
E 0:00:18.407 emit_signal: Error calling method from signal 'task_finished': 'Reference(storage_reference.gd)::_on_task_finished': Method expected 2 arguments, but called with 3..
<C++ Source> core/object.cpp:1242 @ emit_signal()
storage.gd:314 @ _finish_request()
storage.gd:99 @ _internal_process()
storage.gd:51 @ _notification()

Couldn't find a way to solve it for now, I just commented the task.connect and it does not impact the rest of my project

@LazyDridri LazyDridri added the bug Something isn't working label Apr 11, 2025
@WolfgangSenff WolfgangSenff self-assigned this Apr 11, 2025
@WolfgangSenff
Copy link
Collaborator

Something that's weird is that our two codebases are different - you should try getting the one from here on github and using that instead, to see if it's something you changed. I don't think it is, but it's weird and I'm not sure why/what would be giving that error in this case (as in I know what is actually giving it, but not what would cause it).

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

2 participants