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

Problem with the connection between the Cortex API and Flutter #140

Closed
nicpenaloza opened this issue May 12, 2021 · 4 comments
Closed

Problem with the connection between the Cortex API and Flutter #140

nicpenaloza opened this issue May 12, 2021 · 4 comments

Comments

@nicpenaloza
Copy link

Hello, I am currently trying to make a connection between my App in Flutter and Cortex API through the websocket, as such it does not generate an error, but I am not receiving a response.

I am sending a json as a request (as the documentation indicates). The Websocket should respond with a json, but I am not receiving any response, it generates a null.

dudap1

dudap2

dudap3

@bchaperon
Copy link
Contributor

Hi @nicolaspgamba

I have no experience with Flutter, and we don't use this framework at EMOTIV. So it impossible for me to check if your source code is correct or not.

Which OS are you using?
Can you try the Python example (or any other example) from this Github repo and see if it works?
Does your program handle the errors that may occur when you connect to the web socket?

@nicpenaloza
Copy link
Author

Hi @bchaperon

It seems that the problem is with the port, Flutter tells me that it has problems trying to certify it. Does the API only work on that port? Is there no way to change it?

This is the error that generates me
image

@bchaperon
Copy link
Contributor

Hi @nicolaspgamba

The problem comes from the certificate. The Cortex web socket server uses a self-signed certificate. By default, most web socket clients consider that such certificate is invalid.

Maybe you can configure Flutter to accept self signed certificate. I know it is possible in other languages.
I see that other people had the same issue with Flutter: dart-lang/sdk#34284

@shathaalotaibi
Copy link

Did the connection work with you?

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

3 participants