eve-seat / seat

SeAT 0x. [UNSUPPORTED]
https://github.com/eveseat/seat
MIT License
69 stars 37 forks source link

Exception with adding Corp API Key to SeAT #182

Closed eve-seat closed 9 years ago

eve-seat commented 10 years ago

From a EVEMail I have received. Looks like its trying to do a AccountStatus call for a Corporation key which it should not be doing.

--------------------------------
Exception with adding Corp API Key to SeAT
From: Cylin Rath
Sent: 2014.08.11 18:02
To: qu1ckkkk

Hi qu1ckkkk,

I installed SeAT today and have it up and running. The only big problem I've run into so far is trying to add a corporation api key to the tool. Every time I try I get "Error in exception handler." 

Adding character api keys is working just fine.

In the pheal_error.log I see: 
Mon, 11 Aug 2014 17:51:49 +0000 [GET] 0.3402s https://api.eveonline.com/account/AccountStatus.xml.aspx?keyID=3******&vCode=njVDxBT**2Neexue... "221: Illegal page request! Please verify the access granted by the key you are using!"

Masked some the api with *

Do you know how I may be able to resolve this?

Thanks!
Cylin
Nutbolt52 commented 10 years ago

Can confirm this is an issue. Just assumed you were aware of it lol.

eve-seat commented 10 years ago

Can confirm this is an issue. Just assumed you were aware of it lol.

Great. Could you dump a extract of laravel.log please?

Nutbolt52 commented 10 years ago

[2014-08-21 05:42:07] production.WARNING: Processing a ban request for api: AccountStatus scope: Account owner: 3379334 {"src":"Seat\EveApi\BaseApi"} []

Is that what you need, or more?

ghost commented 10 years ago

Tried the Endpoint for it with EVEMon API Tester, SeAT API Debugger and manual URL Call.

On a Character key it is working, for a Corp key it throws errors - no issue in SeAT, it could be something on CCP / API end.

Edit: Adding a new Corp key brings no error here.

eve-seat commented 10 years ago

The key here is that AccountStatus should not be called for a Corporation Key. See this line. Without inspecting the actual response API, my gut tells me that this field may have changed or is returning something else now.

ccatlett1984 commented 10 years ago

Can confirm this, let me know if I can be of any help t-shooting.

eve-seat commented 10 years ago

Can confirm this, let me know if I can be of any help t-shooting.

Ok so according to IRC you can add the key fine, but it freaks out during the updates? Please provide logs and or screenshots showing me the details for this.

@ the rest. Can you please do the same? I am able to add a key fine and it updates fine in SeAT v0.9.2 so its hard to find the problem.

eve-seat commented 10 years ago

Ok, update on what I have found so far.

It seems like I was able to replicate the error with a fresh db and clean cache directory. Adding a corporation key added fine, however this warning message showed up on the redirect back to the all keys page.

Great. Checking what caused it revealed the fact that $access['type'] was not set, meaning it was unable to determine the type of API key that was entered. Ok. So, determineAccess($keyID) has logic to resolve this, however, a call to Account\AccountStatus is done without first checking that Account\APIKeyInfo didn't find a Corporation key first.

If anyone has any other symptoms relating to this then please update this ticket so that I can l check it out. I'll rework the logic slightly and commit the changes for testing.

sybethiesant commented 10 years ago

I'm having this same issue receiving "Error in exception handler." in browser when trying to add a corp api. it shows as added when i go back to look but no data is available. I also receive the error when trying to "sign up" via the front page. let me know if you need any logs. I've tried looking through a few of them and i don't see any relevant entries.

Oddsodz commented 10 years ago

Hello there, I just did a fresh install and I am having this issue. Was any steps taken to fix it, and if so what was it?

eve-seat commented 10 years ago

@Oddsodz this is still something that needs fixing. Sorry just been so crap busy its unreal. It is a priority to fix though.

warlof commented 9 years ago

I've commited a fix for this issue which wait for a validation :)

eve-seat commented 9 years ago

@warlof fix is in the dev branch now. Those that can are free to test. Assuming everything is ok, this will land in master soon™

eve-seat commented 9 years ago

Could anyone else test this and revert if it is fixed now?

ghost commented 9 years ago

Added a few fresh Corp keys, no issues in laravel.log or in Web frontend showing up. Did not test in a fresh install so far.

eve-seat commented 9 years ago

Code is in release 0.10.0