Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 4 Websockets Error
#1
Exclamation 

I ran into an error while using websockets on my project for the first time.
Everything works fine until I got into an error while connecting clients to the web socket server.
Code:
Running server on host 127.0.0.1:8282
Authentication activated
Running server on host 127.0.0.1:8282
New client connected as (162)
Client (162) authentication success
An error has occurred: Undefined property: Takielias\CodeigniterWebsocket\Libraries\CodeigniterWebsocket::$jwt_key
What's causing the error and how to fix please?
Reply
#2

See the error message:
An error has occurred: Undefined property: Takielias\CodeigniterWebsocket\Libraries\CodeigniterWebsocket::$jwt_key

It is the reason of the error.
Reply
#3
Lightbulb 

(11-12-2021, 05:39 PM)kenjis Wrote: See the error message:
An error has occurred: Undefined property: Takielias\CodeigniterWebsocket\Libraries\CodeigniterWebsocket::$jwt_key

It is the reason of the error.
To fix this I had to modify in the vendor folder vendor/takielias/codeigniter4-websocket/src/Libraries/CodeigniterWebsocket.php.

And add this:
/**
     * Default jwt var
     * @var bool
*/
public $jwt_key = false;

Is there any other solutions find out ?
Thx.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB