-
Notifications
You must be signed in to change notification settings - Fork 53
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
Socket IO ACL not setup. Keypad not working. stuck in Please Wait Loading #93
Comments
Worked for me. Thanks! |
I did a little more digging and this is actually due to Flask-login changing the internal session variables it uses to prefix with an underscore starting with version 0.5.0: maxcountryman/flask-login@1d1a3a8. Your solution can work, the smallest possible chance to make it compatible with Flask-login 0.5.0 is to just change 'user_id' to '_user_id'. I don't know that this is actually a better method, but it works with existing logic. Submitted PR: #97 |
@ajschmidt8 This is both of the above changes. ie the diff above, as well as changing user_id to '_user_id' in line: |
I will review PRs that are open. I'm not going to parse comments from issues and try to figure out what changes need to be made. |
…t Loading From jimmyhchan nutechsoftware#93 I have manually setup an raspbian image on a raspberrypi 3 and have most of everything working with a customized version of the docker file. Unfortunately, the virtual keypad was not working. The symptoms is the same as outlined here https://www.alarmdecoder.com/forums/viewtopic.php?f=3&t=1167&p=4267&hilit=keypad+loading#p4267 Steps to repro: setup the webapp go through the setup flow navigate to the keypad page BUG: Keypad only shows Please Wait Loading... Clicks on any button causes the log ERROR: default_error_handler: method_access_denied, You do not have access to method "on_keypress" (endpoint=/alarmdecoder, msg_id=None) [in /usr/local/lib/python2.7/dist-packages/socketio/virtsocket.py:51] Root cause I debugged a bit and found the root cause is user_id is None in the recv_connect method which calls add_acl_method: https://github.com/nutechsoftware/alarmdecoder-webapp/blob/master/ad2web/decoder.py#L829 I could not find anything which sets the user_id for the session. Perhaps a dependency api changed. Fix/workaround I have a fix using user_is_authenticated(current_user) instead. Happy to create a real PR if someone can confirm this is the desired approach.
Hi there.
I have manually setup an raspbian image on a raspberrypi 3 and have most of everything working with a customized version of the docker file.
Unfortunately, the virtual keypad was not working. The symptoms is the same as outlined here https://www.alarmdecoder.com/forums/viewtopic.php?f=3&t=1167&p=4267&hilit=keypad+loading#p4267
Steps to repro:
BUG:
Please Wait Loading...
Root cause
I debugged a bit and found the root cause is
user_id
isNone
in therecv_connect
method which callsadd_acl_method
:https://github.com/nutechsoftware/alarmdecoder-webapp/blob/master/ad2web/decoder.py#L829
I could not find anything which sets the user_id for the session. Perhaps a dependency api changed.
Fix/workaround
I have a fix using
user_is_authenticated(current_user)
instead. Happy to create a real PR if someone can confirm this is the desired approach.The text was updated successfully, but these errors were encountered: