Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

[1.x] Error on save in HttpStatisticsLogger #700

Closed
mihob opened this issue Feb 26, 2021 · 5 comments
Closed

[1.x] Error on save in HttpStatisticsLogger #700

mihob opened this issue Feb 26, 2021 · 5 comments

Comments

@mihob
Copy link

mihob commented Feb 26, 2021

Maybe I am wrong, but I think there is a bug in the HttpStatisticsLogger class. In the Save function the value "key" is not passed to the post request, only secret is present.

This leads to an exception in BeyondCode\LaravelWebSockets\Statistics\Http\Middleware\Authorize where the value "key" must be passed since commit e0d8f6a.

@mihob mihob changed the title [1.x] Error on statistics [1.x] Error on save in HttpStatisticsLogger Feb 26, 2021
@dannydinges
Copy link

dannydinges commented Feb 26, 2021

Having the same issue on a recent merge.

Argument 1 passed to BeyondCode\LaravelWebSockets\Apps\App::findByKey() must be of the type string, null given, called in .../vendor/beyondcode/laravel-websockets/src/Statistics/Http/Middleware/Authorize.php on line 11

@lovetoast
Copy link

Apologies @simonbuehler , you are indeed correct. It does not appear to stop the stats from working though I have a feeling it would stop events being broadcast?

@bbashy
Copy link

bbashy commented Mar 1, 2021

Getting same issue after Upgrading beyondcode/laravel-websockets (1.9.0 => 1.11.0)

TypeError POST /laravel-websockets/statistics
Argument 1 passed to BeyondCode\LaravelWebSockets\Apps\App::findByKey() must be of the type string, null given,
called in /filepath/releases/16744/vendor/beyondcode/laravel-websockets/src/Statistics/Http/Middleware/Authorize.php on line 11

@lovetoast
Copy link

@rennokki Fastest way is to change this to look at findBySecret, rather than findByKey, correct? If that works shall I make a PR or can you change?

@rennokki
Copy link
Collaborator

rennokki commented Mar 2, 2021

Just opened the PR to revert the change made in #626

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

No branches or pull requests

5 participants