Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to execute 'send' on 'WebSocket': Still in CONNECTING state #84

Open
DodoSeal opened this issue Feb 1, 2025 · 0 comments
Open

Comments

@DodoSeal
Copy link

DodoSeal commented Feb 1, 2025

<button id="send">Send Message</button>
<script type="text/javascript" src="/node_modules/osc-js/lib/osc.min.js"></script>
<script type="text/javascript">
 var osc = new OSC();
 osc.open({ host: "192.168.1.247", port: 8001 }); // connect by default to ws://localhost:8080

 document.getElementById('send').addEventListener('click', () => {
   var message = new OSC.Message('/go', Math.random());
   osc.send(message);
 });
</script>

I am using mostly the exact code from the examples for WebSockets. I always get an error saying that the socket was still in a connecting state and was unable to send the data. I am trying to send a QLab /go command for show control. Other issues that I've seen with this error aren't helpful since they are using the package on Node while I am using it for web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant