Laravel-websockets: Exception `BeyondCode\LaravelWebSockets\WebSockets\Exceptions\UnknownAppKey`

Created on 4 Jan 2019  路  4Comments  路  Source: beyondcode/laravel-websockets

Hi!

I'm facing this issue when starting server:
Exception `BeyondCode\LaravelWebSockets\WebSockets\Exceptions\UnknownAppKey` thrown: `Could not find app key `xxxxxxxxxxxxxxxxxxxxxxx`.` Unknown app id

All keys are copied and works locally, but on staging - no.

Most helpful comment

Yeah, i think cache... Thanks!

All 4 comments

Hi, there are a few things to check here.

  • Check to make sure your config/websockets.php contains the app key you are trying to use (on your staging site).

  • Also try to clear your config cache (php artisan config:clear) to make sure the values are not cached.

  • If your config is loaded from your .env (default is 'key' => env('PUSHER_APP_KEY'),) make sure the PUSHER_APP_KEY is in there with the app key you are trying to use.

Yeah, i think cache... Thanks!

I just hard coded env('PUSHER_APP_KEY'), to my custom key "myKey" in config/websocket.php that Solved the problem for me.

'key' => env('PUSHER_APP_KEY'),

to

'key' => 'mykey',

yeah bintariq, that work

Was this page helpful?
0 / 5 - 0 ratings