speedtest-tracker: No Application Encryption Key Error
Describe the bug After deploying the latest version via Docker & MariaDB I am getting the following error which leads to a Server Error 500:
“No application encryption key has been specified”
To Reproduce Steps to reproduce the behavior:
- Deployed the latest version (v.0.11.20) via a docker-compose file - same settings as the prior version - no other changes other than shutting down the container, pulling the new image and starting it back up
- reverting to 0.11.17 brings it back up so it is definitely associated with the most recent releases
- Could be same root cause as the other reported bug relating to SQLite errors?
- docker stop container speed-tracker
- docker pull the latest image
- docker compose up -d
- full error log below
Expected behavior Should have been upgraded in-place. Reverting to v.0.11.19 does not bring it back up - same error as above - this version worked fine until 10 minutes ago
Environment (please complete the following information):
- Debian 12
- Architecture: amd64
- Browser chrome & safari
- Version v.0.11.20 & 0.11.19 while trying to downgrade
Screenshots If applicable, add screenshots to help explain your problem.
Logs
docker-compose.yml:
version: ‘3.3’ services: speedtest-tracker: container_name: speedtest-tracker ports: - ‘8280:80’ - ‘8281:443’ environment: - PUID=1000 - PGID=1000 - TZ=America/New_York - TELEGRAM_BOT_TOKEN=*********************************** - DB_CONNECTION=mysql - DB_HOST=mariadb - DB_PORT=3306 - DB_DATABASE=speedtest_tracker - DB_USERNAME=root - DB_PASSWORD=********
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '*******/config:/config'
- '*******/web:/etc/ssl/web'
image: 'ghcr.io/alexjustesen/speedtest-tracker:latest'
restart: unless-stopped
###Log file:
`--------------------------------------------------------------------
| |.-----.-----.-----.–| | |.-----.-----.| | | || _ | -| -| _ | | -| --|| | ||| |||___|||||___| |__|
|_ |.----.—.-.----.| |–.-----.----. | | | | _ | || <| -| | || || |.|____||||___||
To support Speedtest Tracker visit: https://github.com/alexjustesen/speedtest-tracker
GID/UID
User uid: 1000 User gid: 1000
🔒 SSL_MODE has been set to MIXED, setting the web server to work in HTTP + HTTPS…
🐇 Configuring Speedtest Tracker…
🔒 Fixing app path file permissions… ✅ Permissions fixed.
✅ Environment file exists.
🔗 Creating symlinks for config and log files… ✅ Symlinks created.
✅ App key exists
🔐 Linking the storage… ✅ Storage linked.
💰 Building the cache… ✅ Cache set.
🚛 Migrating the database… ✅ Database migrated.
✅ All set, Speedtest Tracker started.
[31-Aug-2023 09:57:59] NOTICE: fpm is running, pid 126 [31-Aug-2023 09:57:59] NOTICE: ready to handle connections [31-Aug-2023 09:57:59] NOTICE: systemd monitor interval set to 10000ms 172.26.0.6 - - [31/Aug/2023:09:58:12 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 284 “-” “-” [2023-08-31 13:58:15] 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) [stacktrace] #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(307): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(81): tap() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(60): Illuminate\Encryption\EncryptionServiceProvider->key() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(32): Illuminate\Encryption\EncryptionServiceProvider->parseKey() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(908): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(937): Illuminate\Container\Container->resolve() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve() #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(922): Illuminate\Container\Container->make() #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1066): Illuminate\Foundation\Application->make() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(982): Illuminate\Container\Container->resolveClass() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(943): Illuminate\Container\Container->resolveDependencies() #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(937): Illuminate\Container\Container->resolve() #14 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(922): Illuminate\Container\Container->make() #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(169): Illuminate\Foundation\Application->make() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(800): Illuminate\Pipeline\Pipeline->then() #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(777): Illuminate\Routing\Router->runRouteWithinStack() #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(741): Illuminate\Routing\Router->runRoute() #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(730): Illuminate\Routing\Router->dispatchToRoute() #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch() #23 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #24 /var/www/html/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Livewire\DisableBrowserCache->handle() #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() #29 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #31 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle() #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #33 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(89): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #36 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #37 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\HandleCors->handle() #38 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #39 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle() #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #41 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then() #42 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #43 /var/www/html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle() #44 {main} “} 172.26.0.6 - - [31/Aug/2023:09:58:16 -0400] “GET / HTTP/1.1” 500 6628 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36” [2023-08-31 13:58:16] 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) [stacktrace] #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(307): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(81): tap() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(60): Illuminate\Encryption\EncryptionServiceProvider->key() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php(32): Illuminate\Encryption\EncryptionServiceProvider->parseKey() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(908): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(937): Illuminate\Container\Container->resolve() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve() #8 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(922): Illuminate\Container\Container->make() #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1066): Illuminate\Foundation\Application->make() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(982): Illuminate\Container\Container->resolveClass() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(943): Illuminate\Container\Container->resolveDependencies() #12 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(795): Illuminate\Container\Container->build() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(937): Illuminate\Container\Container->resolve() #14 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(731): Illuminate\Foundation\Application->resolve() #15 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(922): Illuminate\Container\Container->make() #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(255): Illuminate\Foundation\Application->make() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(213): Illuminate\Foundation\Http\Kernel->terminateMiddleware() #18 /var/www/html/public/index.php(55): Illuminate\Foundation\Http\Kernel->terminate() #19 {main} "} 172.26.0.6 - - [31/Aug/2023:09:58:16 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 284 “-” “-” 172.26.0.6 - - [31/Aug/2023:09:59:00 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 284 “-” “-” 172.26.0.6 - - [31/Aug/2023:09:59:01 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 284 “-” “-” 172.26.0.6 - - [31/Aug/2023:09:59:03 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 284 “-” “-” 172.26.0.6 - - [31/Aug/2023:10:00:48 -0400] “GET /api/speedtest/latest HTTP/1.1” 200 282 “-” “-” `
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 15 (7 by maintainers)
You need the
APP_KEY
env variable: I have these in mydocker-compose.yml
environment section:(the
APP_KEY
was generated automatically in the.env
file first time I installed ST, I moved all variables from there and put them indocker-compose.yml
)You can generate a new
APP_KEY
from the container’s shell:@alexdelprete - sorry for the delay as I was busy elsewhere - confirmed - the APP_KEY did the trick - thank you very much
thank you very much, I will apply the correction
As I wrote: “I have these in my
docker-compose.yml
environment section”.You can leave it, currently if its missing on startup it’s going to recreate it.
@alexjustesen that fixed it … thanks - could I delete the
.env
file than? or is it in a future release?