nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #1 Hello all, I have one problem: B4X: Copy Dim ws As WebSocket ws.Initialize("ws") Dim url As String = "wss://stream.binance.com:9443/ws/bnbusdt@miniTicker" ws.Connect(url) Error: java.lang.Exception: Sub ws_connected signature does not match expected signature. public static anywheresoftware.b4a.pc.RemoteObject b4a.example.b4xmainpage_subs_0._ws_connected(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception Could you help me?
Hello all, I have one problem: B4X: Copy Dim ws As WebSocket ws.Initialize("ws") Dim url As String = "wss://stream.binance.com:9443/ws/bnbusdt@miniTicker" ws.Connect(url) Error: java.lang.Exception: Sub ws_connected signature does not match expected signature. public static anywheresoftware.b4a.pc.RemoteObject b4a.example.b4xmainpage_subs_0._ws_connected(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception Could you help me?
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #2 nicolino33 said: Sub ws_connected signature does not match expected signature. Click to expand... how does the sub signature look like? Upvote 0
nicolino33 said: Sub ws_connected signature does not match expected signature. Click to expand... how does the sub signature look like?
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #3 DonManfred said: how does the sub signature look like? Click to expand... The only thing I see is just the error I reported, there are no other indications Upvote 0
DonManfred said: how does the sub signature look like? Click to expand... The only thing I see is just the error I reported, there are no other indications
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #4 HOW does the sub signature look like? Noone can help if you do not post it! Upvote 0
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #5 This is all I see in the error report, and the code that runs is just what I wrote earlier, where can I find the signature? class anywheresoftware.b4a.pc.RemoteObject, *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create (first time) ** Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events. ** Activity (main) Resume ** ** Activity (main) Pause event (activity is not paused). ** ** Activity (main) Resume ** Error occurred on line: 0 (Main) java.lang.Exception: Sub ws_connected signature does not match expected signature. public static anywheresoftware.b4a.pc.RemoteObject b4a.example.b4xmainpage_subs_0._ws_connected(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception class anywheresoftware.b4a.pc.RemoteObject, Upvote 0
This is all I see in the error report, and the code that runs is just what I wrote earlier, where can I find the signature? class anywheresoftware.b4a.pc.RemoteObject, *** Service (starter) Create *** ** Service (starter) Start ** ** Activity (main) Create (first time) ** Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events. ** Activity (main) Resume ** ** Activity (main) Pause event (activity is not paused). ** ** Activity (main) Resume ** Error occurred on line: 0 (Main) java.lang.Exception: Sub ws_connected signature does not match expected signature. public static anywheresoftware.b4a.pc.RemoteObject b4a.example.b4xmainpage_subs_0._ws_connected(anywheresoftware.b4a.pc.RemoteObject,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception class anywheresoftware.b4a.pc.RemoteObject,
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #6 Last try: Post the complete sub ws_connected Upvote 0
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #7 B4X: Copy Sub ConnectToBinanceWebSocket() Public rp As RuntimePermissions rp.CheckAndRequest("INTERNET") Dim ws As WebSocket ws.Initialize("ws") Dim url As String = "wss://stream.binance.com:9443/ws/bnbusdt@miniTicker" ws.Connect(url) End Sub Upvote 0
B4X: Copy Sub ConnectToBinanceWebSocket() Public rp As RuntimePermissions rp.CheckAndRequest("INTERNET") Dim ws As WebSocket ws.Initialize("ws") Dim url As String = "wss://stream.binance.com:9443/ws/bnbusdt@miniTicker" ws.Connect(url) End Sub
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #8 DonManfred said: Last try: Post the complete sub ws_connected Click to expand... B4X: Copy Sub ws_Connected (WebSocket1 As WebSocket) Log("Connessione WebSocket stabilita") End Sub Upvote 0
DonManfred said: Last try: Post the complete sub ws_connected Click to expand... B4X: Copy Sub ws_Connected (WebSocket1 As WebSocket) Log("Connessione WebSocket stabilita") End Sub
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #9 I give up.... I asked you to post the sub ws_connected and you posted sub ConnectToBinanceWebSocket? I´m out here B4X: Copy Sub ws_Connected Log("Connessione WebSocket stabilita") End Sub Upvote 0
I give up.... I asked you to post the sub ws_connected and you posted sub ConnectToBinanceWebSocket? I´m out here B4X: Copy Sub ws_Connected Log("Connessione WebSocket stabilita") End Sub
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #10 B4A - WebSocket See the events listed there... Upvote 0
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #11 DonManfred said: I give up.... I asked you to post the sub ws_connected and you posted sub ConnectToBinanceWebSocket? I´m out here B4X: Copy Sub ws_Connected Log("Connessione WebSocket stabilita") End Sub Click to expand... I posted both! Upvote 0
DonManfred said: I give up.... I asked you to post the sub ws_connected and you posted sub ConnectToBinanceWebSocket? I´m out here B4X: Copy Sub ws_Connected Log("Connessione WebSocket stabilita") End Sub Click to expand... I posted both!
LucaMs Expert Licensed User Longtime User Mar 1, 2023 #12 To get always the correct sub signatures, you should: (pressing TAB) Upvote 0
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #13 DonManfred said: B4A - WebSocket See the events listed there... Click to expand... i don't understand.... the event is "connected" and the websocket is ws, the sub ws_Connected should be right, right? Upvote 0
DonManfred said: B4A - WebSocket See the events listed there... Click to expand... i don't understand.... the event is "connected" and the websocket is ws, the sub ws_Connected should be right, right?
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #14 nicolino33 said: ws_Connected should be right, right? Click to expand... without any parameters, yes. Upvote 0
nicolino33 said: ws_Connected should be right, right? Click to expand... without any parameters, yes.
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #15 DonManfred said: without any parameters, yes. Click to expand... ok i removed the sub..... now it works! Thank you! Upvote 0
DonManfred said: without any parameters, yes. Click to expand... ok i removed the sub..... now it works! Thank you!
LucaMs Expert Licensed User Longtime User Mar 1, 2023 #16 nicolino33 said: i don't understand.... the event is "connected" and the websocket is ws, the sub ws_Connected should be right, right? Click to expand... Did you "watch" my previous post? ? ? (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case) Upvote 0
nicolino33 said: i don't understand.... the event is "connected" and the websocket is ws, the sub ws_Connected should be right, right? Click to expand... Did you "watch" my previous post? ? ? (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case)
nicolino33 Active Member Licensed User Longtime User Mar 1, 2023 #17 LucaMs said: Did you "watch" my previous post? ? ? (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case) Click to expand... Yes, thanks! Upvote 0
LucaMs said: Did you "watch" my previous post? ? ? (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case) Click to expand... Yes, thanks!
DonManfred Expert Licensed User Longtime User Mar 1, 2023 #18 LucaMs said: Did you "watch" my previous post? Click to expand... you used websocket_connected there. But it will not work this way as he used ws as prefix. So the subname should be ws_connected Upvote 0
LucaMs said: Did you "watch" my previous post? Click to expand... you used websocket_connected there. But it will not work this way as he used ws as prefix. So the subname should be ws_connected
LucaMs Expert Licensed User Longtime User Mar 1, 2023 #19 nicolino33 said: Yes, thanks! Click to expand... So you wouldn't have needed to ask for confirmation that the sub should be without parameters, the editor itself "tells" you. Upvote 0
nicolino33 said: Yes, thanks! Click to expand... So you wouldn't have needed to ask for confirmation that the sub should be without parameters, the editor itself "tells" you.
LucaMs Expert Licensed User Longtime User Mar 1, 2023 #20 DonManfred said: you used websocket_connected there. But it will not work this way as he used ws as prefix. So the subname should be ws_connected Click to expand... Yes, this is why a few moments ago I added: LucaMs said: (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case) Click to expand... Upvote 0
DonManfred said: you used websocket_connected there. But it will not work this way as he used ws as prefix. So the subname should be ws_connected Click to expand... Yes, this is why a few moments ago I added: LucaMs said: (Ok, I wrote "Websocket1", instead of "ws", ma it's the same, you must enter the event name associated to the object, websocket object in this case) Click to expand...