wink icon indicating copy to clipboard operation
wink copied to clipboard

Session table issue with Laravel 8 + Jetstream

Open mukarramkhalid opened this issue 4 years ago • 5 comments

Hi,

I installed Laravel 8 with Jetstream which uses default database session driver out of the box.

It creates a sessions table having user_id column with type BigInt.

As soon as I login to mydomain.com/wink, I get the following error.

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'user_id' at row 1 (SQL: update `sessions` set `payload` = YTo0OntzOjY6Il90b2tlbiI7c..., `user_id` = 3f5c4ff0-3923-4ebb-ad4d-3cca3fabb9fb, `ip_address` = 127.0.0.1, `user_agent` = Mozilla/5.0 where `id` = ksqEGwiSy4qq8vmbhc9rnXTBL9cMZYPs4VJpCjYj)

Which makes sense because user_id column in sessions table doesn't support id from authors table.

Is this package not supported with Jetstream/Fortify yet, or am I missing something?

Thanks.

mukarramkhalid avatar Sep 27 '20 14:09 mukarramkhalid

Workaround: In your .env file change the session driver to SESSION_DRIVER=file

dominikgeimer avatar Oct 09 '20 11:10 dominikgeimer

Workaround: Change user_id column type as varchar

bgencacat avatar Oct 10 '20 01:10 bgencacat

Hi,

I installed Laravel 8 with Jetstream which uses default database session driver out of the box.

It creates a sessions table having user_id column with type BigInt.

As soon as I login to mydomain.com/wink, I get the following error.

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'user_id' at row 1 (SQL: update `sessions` set `payload` = YTo0OntzOjY6Il90b2tlbiI7c..., `user_id` = 3f5c4ff0-3923-4ebb-ad4d-3cca3fabb9fb, `ip_address` = 127.0.0.1, `user_agent` = Mozilla/5.0 where `id` = ksqEGwiSy4qq8vmbhc9rnXTBL9cMZYPs4VJpCjYj)

Which makes sense because user_id column in sessions table doesn't support id from authors table.

Is this package not supported with Jetstream/Fortify yet, or am I missing something?

Thanks.

Im having the exact same Issue. The work around Dominik Geimer mentioned worked for me. hopefully package is brought inline for Laravel 8.. I love the package

skino2019 avatar Oct 10 '20 09:10 skino2019

Im having the exact same Issue. I changed user_id column type as varchar

Hadi-pd avatar Nov 29 '21 07:11 Hadi-pd

in my case, i'm having this error E11000 duplicate key error collection: mongodb.sessions index: id_1 dup key: { id: "zIUMn9kLsakFOdS2fakKqiEgLQhnmctAATfR6NdQ" } when i try to get the register page, i'm using MongoDB as database, i will so gratefull if someone can help me

Ahmed-max-b avatar Mar 14 '22 09:03 Ahmed-max-b

Why is this issue closed? Is project still alive?

yevhen113 avatar Sep 05 '23 17:09 yevhen113