We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Pulse::rememberUser()
1.0.0
11.6.0
8.2.18
3.4.12
–
Note: A similar problem was reported in #324, but closed due to lack of reproducibility.
We use Pulse::handleExceptionsUsing() to send silenced exceptions to Sentry via sentry/sentry-laravel like this:
Pulse::handleExceptionsUsing()
sentry/sentry-laravel
# AppServiceProvider::boot() Pulse::handleExceptionsUsing(fn (\Throwable $e) => Integration::captureUnhandledException($e));
If a user triggers a Logout event without an active session (for example, already logged out in another tab), this will throw a TypeError:
Logout
TypeError
Laravel\Pulse\Pulse::rememberUser(): Argument #1 ($user) must be of type Illuminate\Contracts\Auth\Authenticatable, null given
We'd expect Pulse not to throw an error in this case, even if Pulse::handleExceptionsUsing() is used to handle silenced exceptions.
Reproduction repository: https://github.com/vintagesucks/repro-pulse-rememberuser-typeerror-authenticatable
composer create-project laravel/laravel repro-pulse-rememberuser-typeerror-authenticatable cd repro-pulse-rememberuser-typeerror-authenticatable composer require laravel/jetstream php artisan jetstream:install inertia --no-interaction npm install npm run build composer require laravel/pulse
Add the following to boot() in app/Providers/AppServiceProvider.php:
boot()
app/Providers/AppServiceProvider.php
\Laravel\Pulse\Facades\Pulse::handleExceptionsUsing(fn (\Throwable $e) => throw($e));
The text was updated successfully, but these errors were encountered:
Thanks, @vintagesucks. I've fixed this in #366.
I'll close this and we can track that issue.
Sorry, something went wrong.
timacdonald
Successfully merging a pull request may close this issue.
Pulse Version
1.0.0
Laravel Version
11.6.0
PHP Version
8.2.18
Livewire Version
3.4.12
Database Driver & Version
–
Description
Note: A similar problem was reported in #324, but closed due to lack of reproducibility.
We use
Pulse::handleExceptionsUsing()
to send silenced exceptions to Sentry viasentry/sentry-laravel
like this:If a user triggers a
Logout
event without an active session (for example, already logged out in another tab), this will throw aTypeError
:We'd expect Pulse not to throw an error in this case, even if
Pulse::handleExceptionsUsing()
is used to handle silenced exceptions.Steps To Reproduce
Reproduction repository: https://github.com/vintagesucks/repro-pulse-rememberuser-typeerror-authenticatable
Setup
composer create-project laravel/laravel repro-pulse-rememberuser-typeerror-authenticatable cd repro-pulse-rememberuser-typeerror-authenticatable composer require laravel/jetstream php artisan jetstream:install inertia --no-interaction npm install npm run build composer require laravel/pulse
Add the following to
boot()
inapp/Providers/AppServiceProvider.php
:Steps
Result
The text was updated successfully, but these errors were encountered: