[GH-ISSUE #51] self-hosted: troubleshooting API issues #655

Closed
opened 2026-03-14 09:57:37 +03:00 by kerem · 7 comments
Owner

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!

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!
kerem closed this issue 2026-03-14 09:57:42 +03:00
Author
Owner

@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/anonaddy like 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.

<!-- gh-comment-id:644600229 --> @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/anonaddy` like 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.
Author
Owner

@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.

<!-- gh-comment-id:644752639 --> @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.
Author
Owner

@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?

<!-- gh-comment-id:644883148 --> @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`?
Author
Owner

@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/ and mysqladmin -u root -p drop anonaddy_database, or just start from the top of artisan commands?

<!-- gh-comment-id:644891660 --> @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/` and `mysqladmin -u root -p drop anonaddy_database`, or just start from the top of artisan commands?
Author
Owner

@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.

<!-- gh-comment-id:645920226 --> @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.
Author
Owner

@willbrowningme commented on GitHub (Jun 21, 2020):

@h-town did you manage to resolve this issue?

<!-- gh-comment-id:647106596 --> @willbrowningme commented on GitHub (Jun 21, 2020): @h-town did you manage to resolve this issue?
Author
Owner

@willbrowningme commented on GitHub (Jul 29, 2020):

Closing this due to inactivity.

<!-- gh-comment-id:665568872 --> @willbrowningme commented on GitHub (Jul 29, 2020): Closing this due to inactivity.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#655
No description provided.