invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
419 stars 268 forks source link

Cant login after updating from 5.2.11 -> 5.2.19 #389

Closed danielgroen closed 3 years ago

danielgroen commented 3 years ago

Hi,

i use docker and since i updated, i can't login and i got the "500: server error" message at the login prompt.

Any idea's?

php artisan cahce:clear didn't do the trick!

[2021-08-19 14:27:03] production.ERROR: Call to undefined method App\Models\Account::emailsSent() {"userId":1,"exception":"[object] (BadMethodCallException(code: 0): Call to undefined method App\\Models\\Account::emailsSent() at /var/www/app/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php:50)
[stacktrace]
#0 /var/www/app/vendor/laravel/framework/src/Illuminate/Support/Traits/ForwardsCalls.php(36): Illuminate\\Database\\Eloquent\\Model::throwBadMethodCallException()
#1 /var/www/app/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1993): Illuminate\\Database\\Eloquent\\Model->forwardCallTo()
#2 /var/www/app/app/Models/BaseModel.php(79): Illuminate\\Database\\Eloquent\\Model->__call()
#3 /var/www/app/app/Transformers/AccountTransformer.php(83): App\\Models\\BaseModel->__call()
#4 /var/www/app/vendor/league/fractal/src/Scope.php(407): App\\Transformers\\AccountTransformer->transform()
#5 /var/www/app/vendor/league/fractal/src/Scope.php(346): League\\Fractal\\Scope->fireTransformer()
#6 /var/www/app/vendor/league/fractal/src/Scope.php(235): League\\Fractal\\Scope->executeResourceTransformers()
#7 /var/www/app/vendor/league/fractal/src/TransformerAbstract.php(162): League\\Fractal\\Scope->toArray()
#8 /var/www/app/vendor/league/fractal/src/TransformerAbstract.php(128): League\\Fractal\\TransformerAbstract->includeResourceIfAvailable()
#9 /var/www/app/vendor/league/fractal/src/Scope.php(435): League\\Fractal\\TransformerAbstract->processIncludedResources()
#10 /var/www/app/vendor/league/fractal/src/Scope.php(411): League\\Fractal\\Scope->fireIncludedTransformers()
#11 /var/www/app/vendor/league/fractal/src/Scope.php(349): League\\Fractal\\Scope->fireTransformer()
#12 /var/www/app/vendor/league/fractal/src/Scope.php(235): League\\Fractal\\Scope->executeResourceTransformers()
#13 /var/www/app/app/Http/Controllers/BaseController.php(595): League\\Fractal\\Scope->toArray()
#14 /var/www/app/app/Http/Controllers/Auth/LoginController.php(238): App\\Http\\Controllers\\BaseController->timeConstrainedResponse()
#15 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\Auth\\LoginController->apiLogin()
#16 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#17 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(254): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#18 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Route.php(197): Illuminate\\Routing\\Route->runController()
#19 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\\Routing\\Route->run()
#20 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#21 /var/www/app/app/Http/Middleware/ApiSecretCheck.php(31): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\ApiSecretCheck->handle()
#23 /var/www/app/app/Http/Middleware/QueryLogging.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\QueryLogging->handle()
#25 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#27 /var/www/app/app/Http/Middleware/SetEmailDb.php(42): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#28 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\SetEmailDb->handle()
#29 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(127): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#30 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(63): Illuminate\\Routing\\Middleware\\ThrottleRequests->handleRequest()
#31 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle()
#32 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#33 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(697): Illuminate\\Pipeline\\Pipeline->then()
#34 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(672): Illuminate\\Routing\\Router->runRouteWithinStack()
#35 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(636): Illuminate\\Routing\\Router->runRoute()
#36 /var/www/app/vendor/laravel/framework/src/Illuminate/Routing/Router.php(625): Illuminate\\Routing\\Router->dispatchToRoute()
#37 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(166): Illuminate\\Routing\\Router->dispatch()
#38 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#39 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestIpMiddleware.php(55): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#40 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\\Laravel\\Http\\SetRequestIpMiddleware->handle()
#41 /var/www/app/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Http/SetRequestMiddleware.php(52): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#42 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Sentry\\Laravel\\Http\\SetRequestMiddleware->handle()
#43 /var/www/app/app/Http/Middleware/Cors.php(25): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#44 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\\Http\\Middleware\\Cors->handle()
#45 /var/www/app/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#46 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\\Proxy\\TrustProxies->handle()
#47 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#48 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#49 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#50 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#51 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#52 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#53 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#54 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#55 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#56 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#57 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#58 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(141): Illuminate\\Pipeline\\Pipeline->then()
#59 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#60 /var/www/app/public/index.php(57): Illuminate\\Foundation\\Http\\Kernel->handle()
#61 {main}
"} 
turbo124 commented 3 years ago

how did you update? i was able to update using docker-composer pull with no issues.

danielgroen commented 3 years ago

at the beginning i did the same but when it failed i tried several things.

maybe some things changed?

however if i read the error log above i think it looks for the method App\Models\Account::emailsSent()

when i open the file Account.php i indeed dont see a method emailsSent, could it be it has to do something with that?

danielgroen commented 3 years ago

oh i see that it should be in the vendor. however i've also tried 'composer install' but it didn't do the trick. or do i have to clear some cache after doing the composer install?

turbo124 commented 3 years ago

You should never need to use composer install in docker.

I think winding back to the app to a different version has caused an issue somewhere.