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

unserialize(): Error at offset 0 of 81 bytes #346

Open
irtzamazhar opened this issue Mar 7, 2024 · 3 comments
Open

unserialize(): Error at offset 0 of 81 bytes #346

irtzamazhar opened this issue Mar 7, 2024 · 3 comments

Comments

@irtzamazhar
Copy link

After setting up this package I faced unserialize(): Error at offset 0 of 81 bytes every time I reloaded my log-viewer route. It's working first time but if I refresh my page I get that error.
After some googling, I got a solution and to regenerate APP_KEY will resolve it but still, if I refresh my page I get that issue.

image

@MujeebAnwar
Copy link

MujeebAnwar commented Mar 8, 2024

@irtzamazhar If you're not using Sanctum, you have to disable the EnsureFrontendRequestsAreStateful middleware in config/log-viewer.php. This middleware utilizes Sanctum's encrypt_cookies middleware if available; otherwise, it defaults to Laravel's EncryptCookies middleware. In Laravel's EncryptCookies middleware, serialize is false by default.

@MNhat0308
Copy link

MNhat0308 commented Mar 9, 2024

what if i use sanctum , error will show again?
@MujeebAnwar

@MNhat0308
Copy link

In middle EncryptCookies file set protected static $serialize = false; to false and it work well

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

No branches or pull requests

3 participants