exodus4d / pathfinder

Mapping tool for EVE ONLINE
https://www.pathfinder-w.space
MIT License
382 stars 248 forks source link

500 error during SSO callback #525

Open djhype opened 7 years ago

djhype commented 7 years ago

Getting an error on a local install of Pathfinder. Have cleared client cookies/cache as well as pathfinder's cache on the server. Environment is Ubuntu 16.04.2, nginx 1.0.13, PHP 7.1. Everything has been working fine up until the issues experienced yesterday with the ESI endpoint.

Error displayed in the browser is: array_diff(): Argument #2 is not an array

Error log output is below:

2017/08/25 01:04:49 [error] 17463#17463: *432 FastCGI sent in stderr: "PHP message: Undefined field esiScopes
PHP message: [app/lib/magic.php:85] DB\SQL\Mapper->get()
PHP message: [app/lib/magic.php:126] Magic->offsetget()
PHP message: [app/lib/db/cortex.php:1773] Magic->__get()
PHP message: [app/lib/magic.php:85] DB\Cortex->get()
PHP message: [app/lib/magic.php:126] Magic->offsetget()
PHP message: [app/main/controller/controller.php:296] Magic->__get()
PHP message: [app/main/controller/api/user.php:119] Controller\Controller->getCookieCharacters()
PHP message: [index.php:23] Base->run()" while reading response header from upstream, client: 172.68.34.74, server: pf.mydomain.com, request: "POST /api/user/getCookieCharacter HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "pf.mydomain.com", referrer: "https://pf.mydomain.com/"
2017/08/25 01:05:11 [error] 17463#17463: *427 FastCGI sent in stderr: "PHP message: array_diff(): Argument #2 is not an array
PHP message: [app/main/model/charactermodel.php:640] array_diff()
PHP message: [app/main/model/charactermodel.php:665] Model\CharacterModel->hasBasicScopes()
PHP message: [app/main/controller/ccp/sso.php:223] Model\CharacterModel->updateLog()
PHP message: [index.php:23] Base->run()" while reading response header from upstream, client: 172.68.34.74, server: pf.mydomain.com, request: "GET /sso/callbackAuthorization?code=[...snip] HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "pf.mydomain.com", referrer: "https://login.eveonline.com/oauth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fpf.mydomain.com%2Fsso%2FcallbackAuthorization&client_id=[...snip]&scope=esi-location.read_location.v1%20esi-location.read_online.v1%20esi-location.read_ship_type.v1%20esi-ui.open_window.v1%20esi-ui.write_waypoint.v1&state=[...snip]"
westonmyers commented 7 years ago

I had this issue.

Make sure you're up to date with this commit via your settings: https://github.com/exodus4d/pathfinder/commit/f94e7269add4cb12a40ed083b4e124b5f1b37f01

Update your scopes over on CCP's end: https://developers.eveonline.com/applications

Within Pathfinder's /Setup route (Re-enable here: https://github.com/exodus4d/pathfinder/blob/master/app/routes.ini#L6), clear authentication data.

All was well for me after that.

djhype commented 7 years ago

@westonmyers thanks for the help but unfortunately this did not work. I stashed my configs, pulled/merged master, popped my configs back and updated necessary values. I made sure I kept the changes from master, just plugging in my instance specific settings. I also verified my ESI scopes, and even created a new application in the CCP app manager.

These are my scopes:

esi-location.read_location.v1
esi-location.read_ship_type.v1
esi-corporations.read_corporation_membership.v1
esi-ui.open_window.v1
esi-ui.write_waypoint.v1
esi-location.read_online.v1

I've also verified my environment.ini file is in sync with what is in master. The only difference between the repo and mine is instance specific settings (database credentials, ESI keys, etc...).

I'm considering wiping the whole repo and starting fresh to see if that fixes it.

Kill4Free commented 6 years ago

I had the same issue /setup route showed an error inside a table. Had to use fix button multiple times then all worked again :)

Hope that helps someone else