Closed seros00 closed 2 years ago
Can you provide me with a Angular app demo that I can clone from where this fails. The code above looks correct, but I need a test app to test.
I have experienced the same. event is undefined. Please try the uploaded project. WebsocketProject.zip
is there any update on this issue? facing it on NS8 + Angular13
@seros00 @jakoguta if this is still a concern for you please check my PR
I believe this is fixed in 2.0.5
In angular 12 and 13, events return "undefined" The code for testing is:
The websocket is opened successfully and the URL is right. But all events are undefined. See next logs:
System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. JS: WebSocket isOpen true JS: WebSocket url ws://nativescript.rocks:3000 JS: WebSocket open event: undefined JS: WebSocket message event: undefined JS: webSocket message error: TypeError: Cannot read property 'data' of undefined JS: WebSocket message event: undefined JS: webSocket message error: TypeError: Cannot read property 'data' of undefined JS: WebSocket message event: undefined JS: webSocket message error: TypeError: Cannot read property 'data' of undefined
NOTE: The code above works with the old version 1.5.4 of "nativescript-websockets".