speedtest-tracker: Error 500 when accessing Admin-General page

Describe the bug I have very fresh installation of Speedtest Tracker. I just set up the new user accounts, re-login to new admin name and tried to open Settings->General page. The loading takes more seconds than usual and then show “500 Server Error”. In “docker logs” output I don’t see anything possibly related to some error. Last 2 lines of the log:

\\n[previous exception] Over 9 levels deep, aborting normalization"}
10.0.2.30 - - [04/Oct/2023:13:24:31 +0200] "GET /admin/general-page HTTP/1.1" 500 6628 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"

To Reproduce Steps to reproduce the behavior:

  1. Make fresh deployment / today’s latest version
  2. Login by default admin/password account
  3. Create 1 new admin account and 1 new user account
  4. Log out
  5. Log in with new admin account
  6. Delete old admin account
  7. Click to Options->General

Expected behavior Page with settings should be displayed.

Environment (please complete the following information):

  • OS: Debian 11 + Docker
  • Architecture: x86_64 GNU/Linux
  • Browser Firefox latest/Windows
  • Version 0.13.1

Logs

\\n[previous exception] Over 9 levels deep, aborting normalization"}
10.0.2.30 - - [04/Oct/2023:13:24:31 +0200] "GET /admin/general-page HTTP/1.1" 500 6628 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"

Additional context My docker run settings:

    docker run -d --name speedtest-tracker --restart unless-stopped \
    -p 8765:80 \
    -p 8766:443 \
    -e PUID=2511 \
    -e PGID=2511 \
    -e TZ=Europe/Prague \
    -e DB_CONNECTION=mysql \
    -e DB_HOST=10.0.3.1 \
    -e DB_PORT=3306 \
    -e DB_DATABASE=speedtest \
    -e DB_USERNAME=speedtest \
    -e DB_PASSWORD=XXXXXXXXX \
    -v /etc/localtime:/etc/localtime:ro \
    -v /docker/data/speedtest_tracker/config:/config \
    -v /docker/data/speedtest_tracker/directory/web:/etc/ssl/web \
    ghcr.io/alexjustesen/speedtest-tracker:latest


About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 48 (4 by maintainers)

Most upvoted comments

To get around this, run docker exec -ti name_of_your_container /bin/bash, when inside the container run the following command php artisan key:generate --show copy the output as you’ll need to set the APP_KEY environment variable to it (either in your compose file or within your docker run command).

Example: APP_KEY="base64:23423h4v23hg4v2j34bvc1y231v2y3"

I don’t know if it’s relevant but I’m getting this error in my logs:

[2023-10-04 15:26:24] production.ERROR: No application encryption key has been specified. {“exception”:"[object] (Illuminate\Encryption\MissingAppKeyException(code: 0): No application encryption key has been specified. at /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:79)

I was getting error 500 on the last version, but then restarting the docker container would at least let me log in once. Now I restart and I’m still getting error 500.

Big shoutout to @RobertD502 - your workaround solved the issue here, too.

I have the same issue - Error 500 constantly - Updating from Portainer.

But did use @RobertD502’s tip, and that solved the issue 👍

Set the following into my portainer config under environment:

  • APP_KEY=“base64:API KEY FOUND IN THE COMMAND ABOVE”

Wow. I’ve probably found the problem and fixed. The log message helped me. The container had DNS resolving issue. When I recreate the container adding --dns=1.1.1.1 --dns=8.8.8.8 --dns=1.0.0.1 --dns=8.8.4.4 to the docker run command, the Error 500 is gone!

Thank you anyway for the troubleshooting!

My docker install ran smoothly until updating my container today. Now I also get Error 500.

Hi, just created an account to thanks you for this thread, had to jump from 0.11.16 to 0.14.4 and was confronted with error 500. perfect workaround and explanations for a novice like me. Thanks @RobertD502

@christoney I also had the same experience with Portainer and had to add ENV variable via Synology Container Manager.

I too am running Synology NAS, Portainer, etc. I also was experiencing some trouble with adding to the ENV with Portainer. Once I did the work from the Synology container manager, it worked just fine. Not sure where the block was, but completing the task from RobertD502 in the Synology container manager worked the first try. Hope this post saves hours of trying and giving up multiple times. Cheers!

…in Synology DSM, then select the running speedtest-tracker docker container and open the terminal in that container (somewhere in the Docker app menu you will find an Open Terminal knob).

Many thanks (It’s under the Action menu)

image

@ks2018ks, you have to give the command inside the container. To do that you can open the Docker app (or the Container Manager app if you have DSM 7.0 or above) in Synology DSM, then select the running speedtest-tracker docker container and open the terminal in that container (somewhere in the Docker app menu you will find an Open Terminal knob).

Succes!

same issue on Unraid

I was able to do @RobertD502 instructions on Unraid to get it going slightly modified. Click on icon for the SpeedTest Tracker docker container. Bring up the Console. Use the php command to have it generate a key. Copy the key to the clipboard. Then go to the container settings and add the APP_KEY environment variable by clicking “Add another Path, Port, Variable, Label or Device” link at the bottom of the settings page. In the popup select the Config Type: to Variable. Enter “APP_KEY” in the Name and Key fields. Then paste in the “base64:generatedkey” into the Value field. Then Save and Apply the change. You should get the login screen now after the docker restarts.

To get around this, run docker exec -ti name_of_your_container /bin/bash, when inside the container run the following command php artisan key:generate --show copy the output as you’ll need to set the APP_KEY environment variable to it (either in your compose file or within your docker run command).

Example: APP_KEY="base64:23423h4v23hg4v2j34bvc1y231v2y3"

This is the way…

Also of note, there isn’t a good process for nuking the old .env file without destroying some settings by accident. I suggest…

  1. Copy the contents of the .env file from the mounted drive or volume
  2. Delete it
  3. Restart the container and let it copy in the new one
  4. Port over any of your custom changes (i.e. Telegram token or SMTP configs)

Same for me, after upgrading docker image, error 500 appears on admin page.