Replies: 1 comment 2 replies
-
|
Try registering the namespace before you initialize the extension. If that does not help, then please create a runnable version of your application demonstrating the problem so that I can debug this further. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I used the class namespace-based method to register a handle to the event, and I encountered the following problem when using it
After starting the server first, and then accessing from the web page, I saw from the server logs that the message had arrived at the server, but its corresponding handler was not triggered, and after I restarted the server, I was able to trigger the handler corresponding to the event, and once I refreshed the webpage and re-established the websocket connection, server could not trigger the handler, which has been bothering me for several days
Code snippets
Some logs
The logs that are properly handled are as follows
e1guDYwAPdZLnEDQAAAA: Sending packet OPEN data {'sid': 'e1guDYwAPdZLnEDQAAAA', 'upgrades': [], 'pingTimeout': 20000, 'pingInterval': 25000} e1guDYwAPdZLnEDQAAAA: Received request to upgrade to websocket e1guDYwAPdZLnEDQAAAA: Upgrade to websocket successful e1guDYwAPdZLnEDQAAAA: Received packet MESSAGE data 0/terminal,{"Authorization":"Bearer xxxxxxxxx"} check passed e1guDYwAPdZLnEDQAAAA: Sending packet MESSAGE data 0/terminal,{"sid":"O877ogJUcP8FClXhAAAB"} e1guDYwAPdZLnEDQAAAA: Received packet MESSAGE data 2/terminal,["shell",{"action":"start","cid":"d026bb907fa5","pid":"1721288587434"}] on shell {'action': 'start', 'cid': 'd026bb907fa5', 'pid': '1721288587434'} e1guDYwAPdZLnEDQAAAA: Received packet MESSAGE data 2/terminal,["resize",{"pid":"1721288587434","msg":{"rows":22,"cols":75}}] e1guDYwAPdZLnEDQAAAA: Sending packet MESSAGE data 2/terminal,["message","{\"pid\": \"1721288587434\", \"msg\": \"Connection established\\r\\n\", \"new_id\": \"cdab99d1-8a29-4e3b-8ac8-452836ea9681\"}"] e1guDYwAPdZLnEDQAAAA: Sending packet MESSAGE data 2/terminal,["message","{\"pid\": \"cdab99d1-8a29-4e3b-8ac8-452836ea9681\", \"msg\": \"root@d026bb907fa5:/# \"}"] e1guDYwAPdZLnEDQAAAA: Received packet MESSAGE data 2/terminal,["shell",{"action":"stop","pid":"cdab99d1-8a29-4e3b-8ac8-452836ea9681"}] on shell {'action': 'stop', 'pid': 'cdab99d1-8a29-4e3b-8ac8-452836ea9681'}The following is a log where the handler was not triggered
YQiFEOQc1cHhuPLSAAAC: Sending packet OPEN data {'sid': 'YQiFEOQc1cHhuPLSAAAC', 'upgrades': [], 'pingTimeout': 20000, 'pingInterval': 25000} YQiFEOQc1cHhuPLSAAAC: Received request to upgrade to websocket YQiFEOQc1cHhuPLSAAAC: Upgrade to websocket successful YQiFEOQc1cHhuPLSAAAC: Received packet MESSAGE data 0/terminal,{"Authorization":"Bearer xxxxxxx"} YQiFEOQc1cHhuPLSAAAC: Sending packet MESSAGE data 0/terminal,{"sid":"ROpPs___EGVGm32uAAAD"} YQiFEOQc1cHhuPLSAAAC: Received packet MESSAGE data 2/terminal,["shell",{"action":"start","cid":"3940d07c61dc","pid":"1721288606588"}] YQiFEOQc1cHhuPLSAAAC: Received packet MESSAGE data 2/terminal,["resize",{"pid":"1721288606588","msg":{"rows":22,"cols":75}}] YQiFEOQc1cHhuPLSAAAC: Received packet MESSAGE data 2/terminal,["shell",{"action":"stop","pid":"1721288606588"}]Beta Was this translation helpful? Give feedback.
All reactions