ripgarpr / garpr

the revival of GarPR. may gar rest in RIP
16 stars 14 forks source link

403 on Login attempt? #202

Open mpql opened 7 years ago

mpql commented 7 years ago

I'm probably doing something wrong because I'm not a python dev, but I've installed and reinstalled this thing over and over, and no matter what I do, I keep getting CORS issues and 403s. I've configured the dragon var (and most recently have just been trying with .+ in case python regex is weird), I've tried overriding headers with Apache, and if I disable security features in-browser to bypass the CORS errors, I still get 403s on the API.

Domain is at https://pr.coloradosmash.com/ , API is at https://api.pr.coloradosmash.com/ if you guys want to look. I can create an account with credentials if someone wants to message me or something. I've attempted running the API on the same domain on port 3000 (https://pr.coloradosmash.com:3000 instead of the api. subdomain), and the errors don't change.

The most baffling part if that even before reinstalls, the app used to work, and when I went back to it for the most recent quarter, was having the same CORS/403 issues -- but I've made no changes. Some googling said something about some stricter CORS policies being in recent Chrome versions, so I thought it might just be something with that. I've tried updating all python modules (which I have no other occasion to touch), reran pip install -r requirements.txt, I have tried using the most recent git revision, I've tried spinning up a vagrant and copying over the files, etc. I had my password saved in KeePass, but just in case, I've tried resetting it with python scripts/change_passwd.py -- nothing seems to be working. I even at one point wrote in something to automatically log in my user if the visitor is coming from my IP to try to avoid the 403'd calls to /users/session/, but then I get errors uploading tournaments, so I can't actually make any changes.

Again, I am probably doing something dumb from lack of experience with python, but I've been at this for a few days, and even had a friend versed in python look at it, and we can't figure out what's up. I don't know if something about my setup is triggering a weird bug, if the current revision in master has some bug, or what. I'm currently on a vanilla setup of the current git revision from the master branch (4fceb6c as of this writing), ran the scripts vagrant would run, and with the config/config.ini and webapp/script_config.js files and the BASE_REGION and dragon variables in server.py configured.

I was trying to find another method to contact you, but seeing as the slack is for actual developers of the application, and I don't know that this isn't being caused by some mysterious bug, I figured I'd post an issue. Huge apologies if I'm stepping on toes here, and thanks in advance for any input or even pointing in the right direction.

jschnei commented 7 years ago

Hey @mopquill,

Sorry for the delay in replying. You should definitely join our slack if you're using GarPR in the wild; it's not just for actual developers, we do a lot of support through slack as well (our README is a bit out of date and definitely lies a bit). To join the slack, ping me at jschneider2013@gmail.com and I'll send you an invite.

It's hard to tell what might be going wrong without some more information, but I'm guessing that since your other API calls seem to work, it's not actually a CORS problem. Rather, I suspect Python is throwing an exception somewhere in the login workflow; from past experience, this often manifests itself as a 403/CORS issue, although I don't remember off the top of my head why. If you're running the server with the upstart scripts (or logging server output somehow some other way), I'd suggest taking a look at the server log files and seeing if there are any helpful tracebacks there.

Best, Jon

BrandonCookeDev commented 6 years ago

@jschnei did this get resolved?

mpql commented 6 years ago

Not that I am aware of. I've tried posting about it in the slack, but I don't think anything came of it (or I missed it). I am willing to try updating, or following instructions to troubleshoot as necessary, and I can pull the slack up, too.

BrandonCookeDev commented 6 years ago

I am in the slack at the moment. @cookie and I will try to assist you