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

Error including map #1

Closed
patricknn opened this issue Oct 24, 2020 · 12 comments
Closed

Error including map #1

patricknn opened this issue Oct 24, 2020 · 12 comments

Comments

@patricknn
Copy link

When I try to compile I receive the following error:

C:\Users\xxxx\Documents\Arduino\libraries\StreamlabsArduinoAlerts\src/StreamlabsAPI.h:2:10: fatal error: map: No such file or directory
#include
^~~~~
compilation terminated.
exit status 1

@lucalas
Copy link
Owner

lucalas commented Oct 25, 2020

Hi @patricknn , please give me more info like:
Are you trying to build the sources or are you including the library into your project?
Which platform are you using? ESP8266, Arduino, etc..?

It seems like you have not installed library using Arduino IDE Library Manager.

@patricknn
Copy link
Author

I'm Just trying to compile an empty file with the StreamLabsAPI.h included
I forgot to select the board that I am using that is NodeMCU V3 ESP-12e
Now I am receiving the following error
C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp: In member function 'void SocketIoClient::beginSSL(const char*, int, const char*, const char*)': C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp:46:50: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive] _webSocket.beginSSL(host, port, url, fingerprint); ^ In file included from C:\Users\patri\Documents\Arduino\libraries\SocketIoClient/SocketIoClient.h:7:0, from C:\Users\patri\Documents\Arduino\libraries\SocketIoClient\SocketIoClient.cpp:1: C:\Users\patri\Documents\Arduino\libraries\WebSockets\src/WebSocketsClient.h:50:10: error: initializing argument 4 of 'void WebSocketsClient::beginSSL(const char*, uint16_t, const char*, const uint8_t*, const char*)' [-fpermissive] void beginSSL(const char * host, uint16_t port, const char * url = "/", const uint8_t * fingerprint = NULL, const char * protocol = "arduino"); ^ exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).

@lucalas
Copy link
Owner

lucalas commented Oct 27, 2020

The problem is in the SocketIoLibrary dependency, here is the Issue #86
There is even a pull request, we have to wait until the library will be updated.

This error happens because new version of ArduinoWebSockets was released (SocketIoLibrary is based on it).

I could use SocketIOClient class in ArduinoWebSockets instead of using SocketIoLibrary, I have to think about it.

For the moment the quick fix is to change:
SocketIoClient.h:
void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const char* fingerprint = DEFAULT_FINGERPRINT); into void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const uint8_t* fingerprint = DEFAULT_FINGERPRINT);

SocketIoClient.cpp:
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const char* fingerprint) {
into
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const uint8_t* fingerprint) {

StreamlabsAPI.cpp:
webSocket.beginSSL(SL_HOSTNAME, SL_PORT, queryParams.c_str(), SL_FINGERPRINT);
into
webSocket.beginSSL(SL_HOSTNAME, SL_PORT, queryParams.c_str(), {0xE7, 0x93, 0x77, 0x36, 0xDA, 0xD4, 0x15, 0x0F, 0xC1, 0xC1, 0x8F, 0x14, 0xD5, 0x2A, 0xC8, 0x72, 0x93, 0xD0, 0x6F, 0x2A});

I didn't test this piece of code, let me know if it works.

@adam-antite
Copy link

Hello, I had this same issue with the type conversion of the fingerprint. Your provided changes did not solve the problem, however the solution that did at least get it to compile and run was the same one linked in the issue above. Simply changed from WebSockets 2.3.0 to 2.2.0. I still run into errors on execution though, once the WiFi is connected it fails to connect to the Streamlabs Socket server. Just repeatedly giving the line '[SIoC] Disconnected!' inside the serial monitor.

@lucalas
Copy link
Owner

lucalas commented Oct 29, 2020

Hello, I had this same issue with the type conversion of the fingerprint. Your provided changes did not solve the problem, however the solution that did at least get it to compile and run was the same one linked in the issue above. Simply changed from WebSockets 2.3.0 to 2.2.0. I still run into errors on execution though, once the WiFi is connected it fails to connect to the Streamlabs Socket server. Just repeatedly giving the line '[SIoC] Disconnected!' inside the serial monitor.

Hi @adam-antite I didn't tell you to go back to WebSocket 2.2.0 because i fixed a problem in WebSocket library here 567 and is available from WebSocket 2.3.0, when i fixed the problem, this library was still compatible with socketIo, some changes occured after my pull request.
I will try to speak with SocketIoLibrary guys and WebSocket guys, i will update you ASAP.

@lucalas
Copy link
Owner

lucalas commented Nov 11, 2020

Hi Guys, for the moment try to use this version of WebSocket that contains my fix:
https://github.com/lucalas/arduinoWebSockets
Download it as zip and replace it under arduino library folder.
It is compatible with socketIO Library that StreamlabsArduino use.
For the moment there isn't an update from the creator of SocketIO library, this is the pull request with the fix 88

Let me know if it works

@audreycgltt
Copy link

Hey @lucalas , just tried your fix and it's working like a charm, thanks a lot ! Great job !

@lucalas
Copy link
Owner

lucalas commented Jan 31, 2021

Right now i'm going to close the issue because there is a workaround.
I'm going to open an Issue to replace the use of socket-io client library with socket-io class inside of arduinowebsocket.
I'll appreciate everyone who want to collaborate.

@lambader
Copy link

I hate websockets library.
I couldn't find these lines
I found only StreamlabsAPI.cpp:

SocketIoClient.h:
void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const char* fingerprint = DEFAULT_FINGERPRINT); into void beginSSL(const char* host, const int port = DEFAULT_PORT, const char* url = DEFAULT_URL, const uint8_t* fingerprint = DEFAULT_FINGERPRINT);

SocketIoClient.cpp:
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const char* fingerprint) {
into
void SocketIoClient::beginSSL(const char* host, const int port, const char* url, const uint8_t* fingerprint) {

Could this program be a little easier for novices. Which version of libraries should we use?
Everything gives an error. Can't be uploaded to the internet with a ready rar file.
Thanks.

@lambader
Copy link

Hey @audreycgltt
You can help me for tihis project ?
Lucas is very busy.

@audreycgltt
Copy link

Hey @lambader I will try to have a look at it by the end of December when I got a bit of time :)

@lucalas
Copy link
Owner

lucalas commented Dec 21, 2021

Hi @lambader, sorry for these problems.
I know that there are a lot of incompatibility issues with the library.
I had no time to have a look, I tried to replace the socket-io library but I had a lot of problems and in the end, I didn't find a solution.

I will try to have a look again.

BTW, did you try to follow these steps? using my socketio library fork

Hi Guys, for the moment try to use this version of WebSocket that contains my fix: https://github.com/lucalas/arduinoWebSockets Download it as zip and replace it under arduino library folder. It is compatible with socketIO Library that StreamlabsArduino use. For the moment there isn't an update from the creator of SocketIO library, this is the pull request with the fix 88

Let me know if it works

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

5 participants