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]: Cannot Login Fresh Install Leantime 3.2.1 #2710

Closed
swanadiva opened this issue Sep 25, 2024 · 11 comments · Fixed by #2754
Closed

[Bug]: Cannot Login Fresh Install Leantime 3.2.1 #2710

swanadiva opened this issue Sep 25, 2024 · 11 comments · Fixed by #2754
Assignees
Labels

Comments

@swanadiva
Copy link

What is your set up?

Self Hosted Server

Version

3.2.1

Describe the issue

Hi, just trying to install leantime 3.2.1 on my own server using apache setup. Installation is successfull i think because the database is well migrated, but everytime i try to login it's always redirected to login page again and when i check th log file in leantime.log there is error like this

[2024-09-25 16:25:46] production.ERROR: foreach() argument must be of type array|object, null given {"exception":"[object] (ErrorException(code: 0): foreach() argument must be of type array|object, null given at /var/www/html/leantime/vendor/illuminate/collections/Arr.php:255) [stacktrace] #0 /var/www/html/leantime/app/Core/Exceptions/HandleExceptions.php(255): Leantime\\Core\\Exceptions\\HandleExceptions->handleError() #1 /var/www/html/leantime/vendor/illuminate/collections/Arr.php(255): Leantime\\Core\\Exceptions\\HandleExceptions->Leantime\\Core\\Exceptions\\{closure}() #2 /var/www/html/leantime/app/Core/Console/ConsoleKernel.php(154): Illuminate\\Support\\Arr::flatten() #3 /var/www/html/leantime/app/Core/Console/ConsoleKernel.php(36): Leantime\\Core\\Console\\ConsoleKernel->commands() #4 /var/www/html/leantime/app/Core/Console/ConsoleKernel.php(253): Leantime\\Core\\Console\\ConsoleKernel->bootstrap() #5 /var/www/html/leantime/app/Domain/Cron/Controllers/Run.php(60): Leantime\\Core\\Console\\ConsoleKernel->call() #6 /var/www/html/leantime/app/Core/Events/EventDispatcher.php(470): Leantime\\Domain\\Cron\\Controllers\\Run->Leantime\\Domain\\Cron\\Controllers\\{closure}() #7 /var/www/html/leantime/app/Core/Events/EventDispatcher.php(74): Leantime\\Core\\Events\\EventDispatcher::executeHandlers() #8 /var/www/html/leantime/app/Core/Events/DispatchesEvents.php(28): Leantime\\Core\\Events\\EventDispatcher::dispatch_event() #9 /var/www/html/leantime/app/Core/Http/HttpKernel.php(109): Leantime\\Core\\Http\\HttpKernel::dispatch_event() #10 /var/www/html/leantime/app/Core/Bootstrap/Bootloader.php(154): Leantime\\Core\\Http\\HttpKernel->terminate() #11 /var/www/html/leantime/app/Core/Bootstrap/Bootloader.php(129): Leantime\\Core\\Bootstrap\\Bootloader->handleRequest() #12 /var/www/html/leantime/public/index.php(13): Leantime\\Core\\Bootstrap\\Bootloader->boot() #13 {main} "} [2024-09-25 16:25:46] production.INFO: Command Output: [2024-09-25 16:25:46] production.INFO: Cron run finished

and i can't login at all
Screenshot_20240925_162603_Termius

Reproduction steps

...

Additional Notes

No response

@PGostek
Copy link

PGostek commented Sep 26, 2024

Similar story here, but run on docker on the Synology DSM. I tried a full fresh installation of 3.20 or 3.2.1, but still behave as described above.

@marcelfolaron
Copy link
Contributor

marcelfolaron commented Sep 26, 2024 via email

@swanadiva
Copy link
Author

no, not yet, but can we unflag the "secure" cookies by set it up in the config file or any other files?

@fvbuelow
Copy link

Same problem here on Unraid docker.

@vladimirdulov
Copy link

It looks like it caused by the commit.

cfe4539#diff-7d7f8f3296724f453ed9b7898d373759994164cbcb4800f014d1c5c11fcdf175

I've reverted changes in app/Core/Console/ConsoleKernel.php and the error has disappeared.

foreach() argument must be of type array|object, null given {"exception":"[object] (ErrorException(code: 0): foreach() argument must be of type array|object, null given at /var/www/html/leantime/vendor/illuminate/collections/Arr.php:255)

@PGostek
Copy link

PGostek commented Oct 8, 2024

It looks like it caused by the commit.

cfe4539#diff-7d7f8f3296724f453ed9b7898d373759994164cbcb4800f014d1c5c11fcdf175

I've reverted changes in app/Core/Console/ConsoleKernel.php and the error has disappeared.

foreach() argument must be of type array|object, null given {"exception":"[object] (ErrorException(code: 0): foreach() argument must be of type array|object, null given at /var/www/html/leantime/vendor/illuminate/collections/Arr.php:255)

Is there any way I can do that mod for the docker image? Or should we wait for the next official release ?

@vladimirdulov
Copy link

vladimirdulov commented Oct 9, 2024

You can try to download app/Core/Console/ConsoleKernel.php from the repo and push it to the docker container (don't forget to create a backup copy of the file in the container before file replacement).
https://github.com/Leantime/leantime/blob/103c79ecb5ac4af169a5ff74731a18509a6d17fb/app/Core/Console/ConsoleKernel.php
If you feel unsure about it, better to wait when it gets sorted and released.

@blqdev
Copy link

blqdev commented Oct 12, 2024

You can try to download app/Core/Console/ConsoleKernel.php from the repo and push it to the docker container (don't forget to create a backup copy of the file in the container before file replacement). https://github.com/Leantime/leantime/blob/103c79ecb5ac4af169a5ff74731a18509a6d17fb/app/Core/Console/ConsoleKernel.php If you feel unsure about it, better to wait when it gets sorted and released.

This doesn't work for me - replacing ConsoleKernel.php causes the same issue but with no log/error entry.

Installing 3.2.0 causes the same issue, also with no log/error entry.

Installing 3.1.4 causes Error 500.

Does it matter if I'm running MariaDB instead of MySQL?

@swanadiva
Copy link
Author

Do you have ssl set up? I realized this may be the source of the problem. The cookies have the “secure” flag set in 3.2 Marcel Folaron - Co-Founder phone. 206-371-1325 email. @.*** web. https://leantime.io

On Thu, Sep 26, 2024 at 08:38 PGostek @.> wrote: Similar story here, but run on docker on the Synology DSM. I tried a full fresh installation of 3.20 or 3.2.1, but still behave as described above. — Reply to this email directly, view it on GitHub <#2710 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALG4EFXS4WICTHXCBGCCZPTZYP527AVCNFSM6AAAAABO2DAQD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZWHAZTMOJXGQ . You are receiving this because you were assigned.Message ID: @.>

I've tried everything that mention in the reply, but there is still problem and this is the only solution that can work for me. Setup the SSL

@gramakri
Copy link
Contributor

I was looking into fixing the Cloudron package and hit this issue. It seems the CLI is throwing exceptions. Web interface generally works. The init, migrate and cron commands all fail with the same exception.

root@7a205e0a-e703-4deb-b8e6-8eabb113190c:/app/code# /app/code/bin/leantime db:migrate
ErrorException: foreach() argument must be of type array|object, null given in /app/code/vendor/illuminate/collections/Arr.php:255
Stack trace:
#0 /app/code/app/Core/Exceptions/HandleExceptions.php(255): Leantime\Core\Exceptions\HandleExceptions->handleError()
#1 /app/code/vendor/illuminate/collections/Arr.php(255): Leantime\Core\Exceptions\HandleExceptions->Leantime\Core\Exceptions\{closure}()
#2 /app/code/app/Core/Console/ConsoleKernel.php(154): Illuminate\Support\Arr::flatten()
#3 /app/code/app/Core/Console/ConsoleKernel.php(36): Leantime\Core\Console\ConsoleKernel->commands()
#4 /app/code/app/Core/Console/ConsoleKernel.php(233): Leantime\Core\Console\ConsoleKernel->bootstrap()
#5 /app/code/app/Core/Bootstrap/Bootloader.php(163): Leantime\Core\Console\ConsoleKernel->handle()
#6 /app/code/app/Core/Bootstrap/Bootloader.php(129): Leantime\Core\Bootstrap\Bootloader->handleRequest()
#7 /app/code/bin/leantime(14): Leantime\Core\Bootstrap\Bootloader->boot()
#8 {main}
root@7a205e0a-e703-4deb-b8e6-8eabb113190c:/app/code# /app/code/bin/leantime cron:run
ErrorException: foreach() argument must be of type array|object, null given in /app/code/vendor/illuminate/collections/Arr.php:255
Stack trace:
#0 /app/code/app/Core/Exceptions/HandleExceptions.php(255): Leantime\Core\Exceptions\HandleExceptions->handleError()
#1 /app/code/vendor/illuminate/collections/Arr.php(255): Leantime\Core\Exceptions\HandleExceptions->Leantime\Core\Exceptions\{closure}()
#2 /app/code/app/Core/Console/ConsoleKernel.php(154): Illuminate\Support\Arr::flatten()
#3 /app/code/app/Core/Console/ConsoleKernel.php(36): Leantime\Core\Console\ConsoleKernel->commands()
#4 /app/code/app/Core/Console/ConsoleKernel.php(233): Leantime\Core\Console\ConsoleKernel->bootstrap()
#5 /app/code/app/Core/Bootstrap/Bootloader.php(163): Leantime\Core\Console\ConsoleKernel->handle()
#6 /app/code/app/Core/Bootstrap/Bootloader.php(129): Leantime\Core\Bootstrap\Bootloader->handleRequest()
#7 /app/code/bin/leantime(14): Leantime\Core\Bootstrap\Bootloader->boot()
#8 {main}

gramakri added a commit to cloudron-io/leantime that referenced this issue Oct 18, 2024
The commands are cached in cache store and not in session object.

Fixes Leantime#2710
@blqdev
Copy link

blqdev commented Oct 20, 2024

Can confirm setting up SSL resolved the issue.

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

Successfully merging a pull request may close this issue.

7 participants