mirror of
https://github.com/anonaddy/anonaddy.git
synced 2026-04-25 14:15:53 +03:00
[GH-ISSUE #51] self-hosted: troubleshooting API issues #94
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/anonaddy#94
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @h-town on GitHub (Jun 16, 2020).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/51
i'm having issues with certain API calls in a self-hosted environment. attempts to either create 2FA or individual API keys from the settings page results in http 500 but i'm afraid i won't be able to root cause the issue without significant familiarity with the codebase.
i'm running on a custom port though i (think i?) ruled that out as the problem by changing to nginx 443 (fail) and changing 443->$custom_port in node_modules/websocket-driver/lib/websocket/driver/proxy.js. these were just crapshoot efforts, clearly. also tried rebooting, disabling ufw, creating a different user, etc.
i don't typically make a habit of using github issues to solicit help but i've spent a good 4-5 hours on this and can't figure out. please let me know if you have any suggestions for troubleshooting!
@willbrowningme commented on GitHub (Jun 16, 2020):
Have you checked the Laravel log files to see what the stack trace is for the 500 errors?
These should be located at
/var/www/anonaddy/storage/logs/if you placed your web application at/var/www/anonaddylike the instructions do.If you could paste the error message (with any private details removed) here then I might be able to get a better idea of what's going on.
@h-town commented on GitHub (Jun 16, 2020):
thanks for the quick reply @willbrowningme! below are the two prevalent errors in the laravel logs.
[2020-06-16 04:04:56] production.ERROR: Trying to get property 'secret' of non-object {"userId":"eea1aebc-8615-4784-8399-4f5eec3429c7","exception":"[object]
(ErrorException(code: 0): Trying to get property 'secret' of non-object at /var/www/anonaddy/vendor/laravel/passport/src/PersonalAccessTokenFactory.php:96)
[2020-06-16 04:05:09] production.ERROR: Error while reading line from the server. [tcp://127.0.0.1:6379] {"exception":"[object]
(Predis\Connection\ConnectionException(code: 0): Error while reading line from the server. [tcp://127.0.0.1:6379] at /var/www/anonaddy/vendor/predis/predis/src/Connection/AbstractConnection.php:155)
i can post the entire trace but this might be enough to draw some suggestions from.
@willbrowningme commented on GitHub (Jun 16, 2020):
Have you checked the docs for Laravel Passport - https://laravel.com/docs/7.x/passport
Did you already run
php artisan passport:install?@h-town commented on GitHub (Jun 16, 2020):
@willbrowningme i'd not checked the docs yet, as i wasn't sure what the possible issue was before your last reply. 👍
your question re: whether or not i ran the passport installation is interesting, and it may actually be the root cause. i've run it several times while troubleshooting other issues; including one instance using --force.
assuming that might have broken links between certain other components, what's the best way to blow it up and start from scratch?
rm -rf /var/www/anonaddy/andmysqladmin -u root -p drop anonaddy_database, or just start from the top of artisan commands?@willbrowningme commented on GitHub (Jun 18, 2020):
Yes those commands should do it if you want to start with fresh files and a new database. Then pick up on the instructions making sure to do all steps required.
@willbrowningme commented on GitHub (Jun 21, 2020):
@h-town did you manage to resolve this issue?
@willbrowningme commented on GitHub (Jul 29, 2020):
Closing this due to inactivity.