-
Notifications
You must be signed in to change notification settings - Fork 71
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
Cannot authorize OAuth zoom plugin: invalid state, 500 internal server error #152
Comments
That is weird. There is a bug in the code that that particular path may lead to plugin termination. Nevertheless, the path it is taking should happen only if the OAuth flow finishes with an "empty state". The state is sent into the flow, and the same values should return when the OAuth flow is finished. No idea how this might be happening on your side. |
@vmakarenko are you still seeing this? Are you seeing any other weird behaviour that may lead to this? |
We will retry to setup up to https://mattermost.gitbook.io/plugin-zoom/installation/zoom-configuration/zoom-setup-oauth, again - probably some settings were wrong... I let you know, thank you! |
We tried again. Authorize plugin -> Error 500.
Moreover, where is the ** Enable Password based authentication** feature located? It is mentioned in https://mattermost.gitbook.io/plugin-zoom/installation/mattermost-setup and cannot be found in mattermost (5.24.2) and zoom-plugin (1.4.1) settings. |
Regarding the "Enable Password based authentication", it was removed on 1.4.1. The same effect is by setting "Enable OAuth" to false. Regarding your problem, can you confirm when you are seeing this error? Are the steps the following?
Is this the flow you are seeing? If you want you can contact me on Mattermost Community (my username is |
@vmakarenko Do you need any more help with this? |
@larkox Hi Daniel, sorry for delay. We still need help with the problem. Let me contact you next week? Thank you already! |
We see the same behavior when clicking the install button when setting up the Zoom part.
We still get: 2020-10-09T13:49:12.579+0200 warn mlog/sugar.go:27 Could not verify webhook secreet {"plugin_id": "zoom"} in our logs. Mattermost 5.27.0 Regards |
@jprusch Regarding the logs, can you give me more information on how that happens? I know why the panic happens, but that state should never be reached. Do you have any "complex" backend configuration (cluster, db read replicas...)? Regarding the second error, is there any chance you have more than one webhook configured for this app? If webhooks are working fine, but you are seeing that error, the only thing that comes to my mind is that there is another misconfigured webhook. |
@larkox: I tried again with OAuth according to https://mattermost.gitbook.io/plugin-zoom/installation/zoom-configuration/zoom-setup-oauth. Same result: http response:
mattermost.log:
It would be highly wanted to understand what went wrong. |
Sorry for the late answer: We use a standard Mattermost standalone enterprise installation with a default MySQL backend. No clustering , no read replicas. Nginx is used as a reverse proxy with standard configuration. |
@vmakarenko Thank you for your patience. Somehow I missed your message. The state should come in the oauth query string. Something like this: |
@jprusch Can you also check my previous message and see if you are having a similar issue? |
@larkox Back from some days off.... After restart & checking config the issue cannot be reproduced anymore. Meetings can be started from MM. Ending the meeting sends a message to the channel. |
mattermost.log
access.log:
|
@vmakarenko This is puzzling me. You are using v1.4.1, right? The only instance I have seen this happening is when you use the "Install" button on the Zoom website (since that button does not go through Mattermost and therefore does not set the state). If you are following the link in mattermost and not the Install button on the Zoom website, I still don't know how this can happen. Another thing to check is the Zoom URL you get when the oauth process start (i.e. the site where you enter your zoom credentials). That URL should also hold the state. |
Hi Daniel, may I invite you as guest to our mattermost instance? https://community.mattermost.com/core/messages/@daniel.espino.garcia is closed due to exceeded number of allowed users :( |
I'm having a similar issue. I cannot install the oauth app on the zoom site. I receive the message "invalid OAuth user state" when I try. Starting meetings works, but I haven't seen the webhook work. |
@srpape Are you trying to hit the "install" button at the end of the Zoom setup? That is not needed. Regarding webhooks, have you configured them on the Zoom side? Is you instance receiving the calls (maybe some info in the server logs)? |
@srpape Are you still experiencing issues here? |
@larkox Yes, I was hitting the "install" button at the end of the Zoom setup. I did try to use it anyway, and we had people experiencing issues. I ended up reverting and going back to JWT after messing around with it for quite a while. I'll give it another try at some point, but don't hold the ticket open for me. |
Great. If there is anything I can do to help you, do not hesitate to open a new bug, or contact me on Mattermost Community. |
I am facing the same error as being discussed "invalid OAuth user state" . @larkox is there anything wrong ? |
@mickmister Do you know who can help troubleshooting this? |
Sure, @Kshitij-Katiyar are you or another developer able to look into this? |
@mickmister Sure looking into this. Should i reopen this issue ? |
@Kshitij-Katiyar I'd say let's leave it closed unless it's determined that there needs to be a code change here @umairjamali Do you have any more information on how this was produced, that may be specific to your environment? I assume you ran |
I followed this our self-hosted Mattermost is |
@Kshitij-Katiyar We've had another report of this, so reopening the issue. I've put this on the issue board for investigation |
@mickmister @larkox @umairjamali @vmakarenko I have examined the code and experimented with multiple OAuth app configurations; everything appears to be correct. The existing instructions in the plugin's readme ask us to specify two scopes: I encountered the same issue when I was using the scopes mentioned in the setup steps of the plugin's readme. However, when using the scopes below, the plugin seems to work perfectly. Please try the scopes below and let me know if it works for you. @mickmister, I will be creating a pull request (PR) to update the instructions in the readme files. |
@Kshitij-Katiyar Interesting. So having the missing scope in the Zoom UI causes an @srpape Are you able to check if selecting the above 3 OAuth scopes fixes the issue you were experiencing? Thank you |
@mickmister, the |
I'm trying to set up mattermost-plugin-zoom 1.4.1 (OAuth) according to manual
https://mattermost.gitbook.io/plugin-zoom/installation/zoom-configuration/zoom-setup-oauth
I stuck on activation stage, Install your app->Activate throws
browser:
mattermost.log
:Mattermost Version: 5.24.2
Database Schema Version: 5.24.0
The text was updated successfully, but these errors were encountered: