pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.6k stars 406 forks source link

pyfa.io: Something went wrong! : Add character option can't authorize with pyfa.io #1587

Open sincomil opened 6 years ago

sincomil commented 6 years ago

I have a problem with EVE SSO/Python Anywhere. After entering my credentials and authorizing required scopes for pyfa:

"The pyfa web authentication application is requesting that you authorize it to use the following permission scopes with your selected character."

I get into a page at www.pyfa.io with Python Anywhere that say me the following:

Something went wrong :-(

This website is hosted by PythonAnywhere, an online hosting environment. Something went wrong while trying to load it; please try again later.
$ lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a

$ python --version
Python 3.6.5

$  pacman -Q pyfa python-wxpython python-logbook python-matplotlib python-dateutil python-requests python-sqlalchemy python-cryptography python-markdown2 python-packaging python-beautifulsoup4 python-pyaml python-diskcache python-esipy python-roman
pyfa 2.0.1-1
python-wxpython 4.0.1-2
python-logbook 1.2.1-1
python-matplotlib 2.2.2-2
python-dateutil 2.7.3-1
python-requests 2.18.4-1
python-sqlalchemy 1.2.7-1
python-cryptography 2.2.2-1
python-markdown2 2.3.5-1
python-packaging 17.1-1
python-beautifulsoup4 4.6.0-1
python-pyaml 17.12.1-1
python-diskcache 3.0.6-1
python-esipy 0.3.4-1
python-roman 2.0.0-1
blitzmann commented 6 years ago

@sincomil does your IP address change often? If not, could you let me know what it is? (if you don't feel comfortable posting it here, please email me it at sable.blitzmann@gmail.com). I want to lookup web server access for your IP and check to see what data pyfa is sending to the server. :)

blitzmann commented 6 years ago

@sincomil I know you've stated previously that cookies are enabled, but I would ask that you double check again. The only way that I can reproduce the error is if I disable cookies on my browser - it can no longer save session information, and thus when EVE sends you back to the callback I can no longer access some variables I need.

I'll be looking into a way to work around the requirement for cookies, but in the mean time, please double check.

blitzmann commented 6 years ago

@sincomil Actually, nevermind, I made a quick change to the server that should eliminate need for cookies - please check to see if it works now. :)

sincomil commented 6 years ago

Yes! You have made it working! Grate thanks, real dude!

blitzmann commented 6 years ago

@sincomil I actually just had to revert back, as the fix I put in place was causing other issues for #1560. More research is needed. But, the fact that it started working for you tells me that it's almost definitely a cookie issue - you may have to whitelist pyfa.io, or turn of ad blockers or something.

I'll get a page up an running that should show you if cookies are enabled or disabled, which might be useful information. I'll continue to look for solutions that doesn't rely on cookies.

sincomil commented 6 years ago

Now I've revoked my character and tried to add it again, same issue as before. Cookies are definietely enabled and working, ad-blocking plugin is disabled (also tried with other browsers without any plugins and etc), FYI there is no any cookie from pyfa.io - this is checked in three browsers that I have installed, all browsers allows cookies: firefox, chromium, falkon.

blitzmann commented 6 years ago

@sincomil

http://www.pyfa.io/cookie_check

Check that please, let me know what it says. If it says disabled, and cookies are enabled, then something else is going on somewhere that is blocking the cookie. v0v

FYI there is no any cookie from pyfa.io

Yeah, that's what I'm trying to figure out... For some reason cookies aren't being set for your browsers. This is what it looks like for me. image

Sorry about all the trouble, but I thank you for sticking with me and helping me troubleshoot all this :) Are you free tomorrow during what I guess would be late afternoon your time? Might want to get with you on slack or something for more real-time communications

sincomil commented 6 years ago

Ok I'll try to check that cookie-testing thing when come home, and now I'm on the way. Tomorrow I we can meet in discord, that I'm using at recent times.

пт, 18 мая 2018 г., 16:55 Ryan Holmes notifications@github.com:

@sincomil https://github.com/sincomil

http://www.pyfa.io/cookie_check

Check that please, let me know what it says. If it says disabled, and cookies are enabled, then something else is going on somewhere that is blocking the cookie. v0v

FYI there is no any cookie from pyfa.io

Yeah, that's what I'm trying to figure out... For some reason cookies aren't being set for your browsers. This is what it looks like for me. [image: image] https://user-images.githubusercontent.com/3904767/40238256-b7443384-5a80-11e8-841a-a81c1a602226.png

Sorry about all the trouble, but I thank you for sticking with me and helping me troubleshoot all this :) Are you free tomorrow during what I guess would be late afternoon your time? Might want to get with you on slack or something for more real-time communications

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pyfa-org/Pyfa/issues/1587#issuecomment-390214946, or mute the thread https://github.com/notifications/unsubscribe-auth/Ale21lXT8M9qsoCsZrdU6r3rAgZAs_Quks5tztLEgaJpZM4UC0uj .

blitzmann commented 6 years ago

@sincomil any update?

sincomil commented 6 years ago

@blitzmann http://www.pyfa.io/cookie_check is showing to me that cookies are working ok. And I have installed pyfa2 at home computer and realized that it is installed with much less dependancies that it was on my laptop at work. And good news that it is working ok at home computer without any problem and characters are added without any issues... So I need to check what the difference between two installations, coz both computers working on same Arch Linux, then need to try remove all dependant packages from work laptop and try to reinstall all things to test again with more attention. So I take a pause until Monday then post an update, thank you!

sincomil commented 6 years ago

Now I have tested http://www.pyfa.io/cookie_check from work laptop and it says "Cookies work! :)" but I do not see any cookies from pyfa.io. Tryed to remove pyfa and depedencies and install all again from scratch still getting an error when adding characters: URL: https://www.pyfa.io/sso/callback?code=fEZhHFS40jp5ynB0z8SeRIaGxDzj4srhpOF7d9jLJDLpGPWQ2ICW1cTlcutAU2d_0&state=45397949da44c13a5f10bc79e682acd4d1c0ffc9955c0d8ee1c85b3d2e24d0ad Something went wrong :-(

This website is hosted by PythonAnywhere, an online hosting environment. Something went wrong while trying to load it; please try again later. Then I have checked with developer debug window from browser and got that returned pyfa.io page has: www.pyfa.io - no cookies www.pythonanywhere.com - 1 cookie

2018-05-19 4:46 GMT+03:00 Ryan Holmes notifications@github.com:

@sincomil https://github.com/sincomil any update?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pyfa-org/Pyfa/issues/1587#issuecomment-390369798, or mute the thread https://github.com/notifications/unsubscribe-auth/Ale21nCF_vuqxWm5OvUEeGEnBHlQ_W4Uks5tz3mDgaJpZM4UC0uj .

blitzmann commented 6 years ago

Now I have tested http://www.pyfa.io/cookie_check from work laptop and it says "Cookies work! :)" but I do not see any cookies from pyfa.io

simply going to the page wouldn't set any cookies (more specifically, it sets the cookie to see if it works, then deletes it).

To make the login work without cookies will require persistence of session data to a database. It will take some time to get that up and running, then I'll give you a test build specifically for testing that vs the session method. Please keep an eye on this issue for updates. :)

lord-carlos commented 6 years ago

I have the same error with pyfa git. Took me a couple of hours to install pyfa on debian stable, as it does not have python 3.6 :(

Cookies test is working. And I can also see a cookie named "sessionid" is set for pufa.io

blitzmann commented 6 years ago

o/ @lord-carlos long time no see :)

I still don't have it hooked up to properly read from a mysql database (honestly haven't tried much, been busy with other priorities in and out of pyfa)

What is your IP address, so that I can search the logs

lord-carlos commented 6 years ago

I wrote you an email, I hope that's ok.

blitzmann commented 6 years ago

Thanks, that's fine...

I'm wondering if this is kind of specific to browser, or distro..

As a workaround @lord-carlos you can create your own developer keys and set those in the preferences.