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

Requests don't work anymore ? #2

Open
couscousyeah opened this issue Jul 25, 2023 · 1 comment
Open

Requests don't work anymore ? #2

couscousyeah opened this issue Jul 25, 2023 · 1 comment

Comments

@couscousyeah
Copy link

Hi !

I tried your addon (thank you for this work !), but immediatly ran into these errors. I had this problem in Godot 4.0.3 and 4.1.1 .
Godot outputs them at launch, in Mastodon_GD.gd and mastodon_auth_client.gd (there are other lines with the same type of errors for each file):

 res://addons/Mastodon_GD/Mastodon_GD.gd:204 - Parse Error: Cannot pass a value of type "HTTPClient.Method" as "String".
  res://addons/Mastodon_GD/Mastodon_GD.gd:204 - Parse Error: Invalid argument for "request()" function: argument 4 should be "String" but is "HTTPClient.Method".
  res://addons/Mastodon_GD/Mastodon_GD.gd:206 - Parse Error: Only String or StringName can be used as index for type "Error", but received a "int".
  res://addons/Mastodon_GD/Mastodon_GD.gd:973 - Parse Error: Too many arguments for "request_raw()" call. Expected at most 4 but received 5.
  res://addons/Mastodon_GD/Mastodon_GD.gd:973 - Parse Error: Cannot pass a value of type "bool" as "HTTPClient.Method".
res://addons/Mastodon_GD/mastodon_auth_client.gd:72 - Parse Error: Too many arguments for "request()" call. Expected at most 4 but received 5.
 res://addons/Mastodon_GD/mastodon_auth_client.gd:72 - Parse Error: Cannot pass a value of type "bool" as "HTTPClient.Method".
 res://addons/Mastodon_GD/mastodon_auth_client.gd:72 - Parse Error: Invalid argument for "request()" function: argument 3 should be "HTTPClient.Method" but is "bool".
 res://addons/Mastodon_GD/mastodon_auth_client.gd:72 - Parse Error: Cannot pass a value of type "HTTPClient.Method" as "String".
 res://addons/Mastodon_GD/mastodon_auth_client.gd:72 - Parse Error: Invalid argument for "request()" function: argument 4 should be "String" but is "HTTPClient.Method".
 res://addons/Mastodon_GD/mastodon_auth_client.gd:173 - Parse Error: Too many arguments for "request()" call. Expected at most 4 but received 5.
 res://addons/Mastodon_GD/mastodon_auth_client.gd:173 - Parse Error: Cannot pass a value of type "bool" as "HTTPClient.Method".

It looks like the request method has changed and doesn't work anymore this way, or did I miss something ?

@couscousyeah
Copy link
Author

I have some update, it looks like the "use openSSL" parameter is not used anymore in HTTPRequest so i removed it in every request that raised an error.
A browser window now opens to get a token but doesn't seem to have the proper URL (tested on mamot.fr and mastodon.gamedev.place), and it's complicated enough (for me) not to be able to figure out where the bug was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant