unserialize(): Error at offset 0 of 81 bytes
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.
@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.
what if i use sanctum , error will show again? @MujeebAnwar
In middle EncryptCookies file set protected static $serialize = false; to false and it work well
This seems to be an issue when using Sanctum, correct? Not sure why cookie serialization & deserialization fails, but it can be fixed by disabling serialization in EncryptCookies middleware, like mentioned above.
Closing the issue.