xgerhard / DestinyCommand

Destiny integration for chatbots
https://destinycommand.com
4 stars 2 forks source link

Not Importing Database #18

Open thatjk opened 7 months ago

thatjk commented 7 months ago

Hi,

I know this github hasn't been updated in a while, but I tried to install onto my server and having database issues. I ran the commands composer install and php artisan and replacing generated key and also providing my bungie api. I also created a mysql database and updated values within .env, also uncommented manifest as directions said.

When I try to run a query, I get SQL database error of destiny_bungie_players , display_name and display_code errors.

Even after creating destiny_bungie_players with columns display_name and display_code and running query, I get error "@System: Something went wrong, please try again later (1)."

is there better ways to debug in .env file I have APP_DEBUG=true APP_LOG_LEVEL=debug

or am I missing a database import or is the code outdated and need to be updated

Thanks

xgerhard commented 7 months ago

Hiya! Yeah the repo is a bit out of date, sorry about that. The error you are seeing is from the request handler and is triggered by a non-200 http return code: https://github.com/xgerhard/DestinyCommand/blob/b547c9299638daac94e6951761e4d5eb56d58269/src/app/RequestHandler.php#L69

You can check the response of the request to see if there is an error message returned. After line 61 where we receive the response you can dump the response:

$oResponse = $aResult['value'];
$responseContent = json_decode($oResponse->getBody()->getContents());
echo '<pre>';
print_r($responseContent);
die;

Hope this helps!

thatjk commented 7 months ago

Hi, no worries, I thought the project was interesting so I wanted to look more into it by hosting it myself

Thanks for the assistance that helped me to see what tables I was missing, originally I was missing Orgin which I resolved and then I was missing some additional database tables which I also created

The error that I get now is

stdClass Object
(
    [ErrorCode] => 217
    [ThrottleSeconds] => 0
    [ErrorStatus] => UserCannotResolveCentralAccount
    [Message] => We couldn't find the account you're looking for. The account may not exist, or we may be experiencing technical difficulties.
    [MessageData] => stdClass Object
        (
        )

)

Which is odd since I am using the same query for yours and works fine and during debug it was finding the different accounts that I had such as on crossave such as steam and ps etc.

xgerhard commented 7 months ago

We're making progress :) I'll need some more information, what is the url you use when you are seeing that error, so I can replicate your error. You might see different results from the live app and your local one, because of stored linked accounts in the live database.