B4J Question [ Jserver 3 ] Error on ws.eval async function

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
hello everyone !
i am trying to call async function using ws.eval() with JServer3 Websocket handler;
but show this error :
B4X:
VM1668:3 Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules
    at new Function (<anonymous>)
    at b4j_eval (b4j_ws.js:55:13)
    at b4j_ws.onmessage (b4j_ws.js:87:13)
    at HTMLDivElement.<anonymous> (reconnecting-websocket.js:182:75)
    at ws.onmessage (reconnecting-websocket.js:282:29)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…