Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: InvalidArgumentException Auth guard [web] is not defined. #2931

Open
otsuga opened this issue Feb 12, 2025 · 4 comments
Open

[Bug]: InvalidArgumentException Auth guard [web] is not defined. #2931

otsuga opened this issue Feb 12, 2025 · 4 comments
Assignees
Labels

Comments

@otsuga
Copy link

otsuga commented Feb 12, 2025

What is your set up?

Cloud Hosted

Version

3.3.3

Describe the issue

Description:

I am trying to run Leantime on my development environment, but I am receiving the following error when trying to access the application:

InvalidArgumentException: Auth guard [web] is not defined.

Followed the installation instructions for Leantime. But when trying to access the application in the browser, I received the error mentioned.

Reproduction steps

  1. Followed the installation instructions for Leantime
  2. Created .env
  3. Created first account
  4. Then error

Error Logs (LEANTIMEFOLDER/storage/logs)

InvalidArgumentException thrown with message "Auth guard [web] is not defined."

Stacktrace:
#26 InvalidArgumentException in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php:86
#25 Illuminate\Auth\AuthManager:resolve in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php:70
#24 Illuminate\Auth\AuthManager:guard in /home/ubuntu/leantime/vendor/laravel/sanctum/src/Guard.php:57
#23 Laravel\Sanctum\Guard:__invoke in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php:57
#22 call_user_func in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Auth/RequestGuard.php:57
#21 Illuminate\Auth\RequestGuard:user in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php:56
#20 Illuminate\Auth\RequestGuard:check in /home/ubuntu/leantime/app/Core/Middleware/AuthCheck.php:130
#19 Leantime\Core\Middleware\AuthCheck:authenticate in /home/ubuntu/leantime/app/Core/Middleware/AuthCheck.php:86
#18 Leantime\Core\Middleware\AuthCheck:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#17 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/app/Core/Middleware/Updated.php:41
#16 Leantime\Core\Middleware\Updated:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#15 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/app/Core/Middleware/Installed.php:60
#14 Leantime\Core\Middleware\Installed:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#13 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/app/Core/Middleware/StartSession.php:128
#12 Leantime\Core\Middleware\StartSession:handleStatefulRequest in /home/ubuntu/leantime/app/Core/Middleware/StartSession.php:95
#11 Leantime\Core\Middleware\StartSession:handleRequestWhileBlocking in /home/ubuntu/leantime/app/Core/Middleware/StartSession.php:64
#10 Leantime\Core\Middleware\StartSession:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#9 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/app/Core/Middleware/InitialHeaders.php:24
#8 Leantime\Core\Middleware\InitialHeaders:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#7 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/app/Core/Middleware/TrustProxies.php:75
#6 Leantime\Core\Middleware\TrustProxies:handle in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183
#5 Illuminate\Pipeline\Pipeline:{closure:{closure:Illuminate\Pipeline\Pipeline::carry():158}:159} in /home/ubuntu/leantime/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119
#4 Illuminate\Pipeline\Pipeline:then in /home/ubuntu/leantime/app/Core/Http/HttpKernel.php:119
#3 Leantime\Core\Http\HttpKernel:sendRequestThroughRouter in /home/ubuntu/leantime/app/Core/Http/HttpKernel.php:141
#2 Leantime\Core\Http\HttpKernel:handle in /home/ubuntu/leantime/app/Core/Bootloader.php:87
#1 Leantime\Core\Bootloader:handleRequest in /home/ubuntu/leantime/app/Core/Bootloader.php:68
#0 Leantime\Core\Bootloader:boot in /home/ubuntu/leantime/public/index.php:14

@marcelfolaron
Copy link
Contributor

Just to confirm, seems you are currently using the latest master branch? It's not quite stable yet but I'll take a look at that one.

@otsuga
Copy link
Author

otsuga commented Feb 12, 2025

Yes, I am currently using the latest master branch. Could you recommend a stable branch that I could use in the meantime?

Thank you for your help!

@marcelfolaron
Copy link
Contributor

Yes, we tag the latest stable releases. In this case it would be v3.3.3
https://github.com/Leantime/leantime/tree/v3.3.3

@marcelfolaron
Copy link
Contributor

Curious, I was looking into the bug. Did you change the laravel config and in particular the guard definition in there?
The web guard was removed and should not even have been called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants