Closed jonas-martinez closed 8 months ago
@taorepoara @shiipou @lenra-io/devs
This was just a problem in my application. In fact, if your listener that is called by the webhook runs async calls and terminates without making sure that these calls are finished, it will revoke the token (as expected) and the API calls inside of these async calls will fail with the token invalid error.
Solution: Just make sure to await on your async calls on your webhook's listener.
What happened?
It seems that the webhook authentication token received in the listener is invalid. I tried to check where this problem could appear in the server, but I only came to the conclusion that it might be a problem on the
send_env_event
function inserver/libs/application_runner/lib/event_handler.ex:24
.It seems to differ from the
send_session_event
line 34.Each of these two functions go to the
handle_call
function inlibs/application_runner/lib/event_handler.ex:94
which generates a new token at line 103.I don't understand what might be causing this issue but it could cause the crons to return the same error when trying to insert data from this token as it is an env token.
This issue is quite important to solve quickly so don't hesitate to write some ideas in the comments.
How to reproduce this error quickly
Run the Achiever app locally https://github.com/jonas-martinez/achiever Use the steam id that you can find in the file
technical.md
and then use the app-id.What browsers are you seeing the problem on?
No response
Version
No response
Relevant log output