Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Myo.js had an error with the socket #23

Open
bendiksolheim opened this issue Aug 24, 2016 · 1 comment
Open

Myo.js had an error with the socket #23

bendiksolheim opened this issue Aug 24, 2016 · 1 comment

Comments

@bendiksolheim
Copy link

Hello

I struggled quite a bit with connecting to Myo from node.js. No matter what, I got the error message Myo.js had an error with the socket. Myo Connect might not be running. If it is, double check the API version.Myo.js had an error with the socket. Myo Connect might not be running. If it is, double check the API version..

After a while, I tried removing the "app id" in my.connect("my-app-id"), and suddenly it worked. Turns out it crashes if you have less than 3 dot-separated words in your app id (i.e. "my.app.id"). This might be common sense, I don't know, but I can't see any mention of it in the documentation. Also, the error message is not very helpful. I debugged it a bit (add console.log(arguments) between line 20 and 21 in myo.js), and it seems the websocket started by Myo Connect returns 400 if you have less than 3 dot-separated words in your app id.

@vshivam
Copy link

vshivam commented Aug 25, 2016

I have been using the Android SDK for Myo. The corresponding init method in the Android SDK says,

applicationIdentifier : must follow a reverse domain name format (ex. com.domainname.appname). Application identifiers can be formed from the set of alphanumeric ASCII characters (a-z, A-Z, 0-9). The hyphen (-) and underscore (_) characters are permitted if they are not adjacent to a period (.) character (i.e. not at the start or end of each segment), but are not permitted in the top-level domain. Application identifiers must have three or more segments. For example, if a company's domain is example.com and the application is named hello-world, one could use "com.example.hello-world" as a valid application identifier. Application identifiers must not be longer than 255 characters. applicationIdentifier can be an empty string.

https://developer.thalmic.com/docs/api_reference/android/classcom_1_1thalmic_1_1myo_1_1_hub.html#a91352ca197594c1cd447755d83d0b4e1

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

No branches or pull requests

2 participants