Comments (9)
I've looked into it abit. This looks like a bug in the library itself, it has nothing to do with memory restrictions on the esp32 or anything like that.
I'm not even sure it has something to do with the message size, I think it's something about the protocol that is not implemented corectly (probably on my end).
I've tried poking around, but nothing too obvious popped out. I'm working on it and will keep you updated.
Thanks,
Gil.
from arduinowebsockets.
Oh good, glad it wasn't me being daft! Let me know if there's anything I can do to help debug it.
from arduinowebsockets.
Thanks again for openning this issue @Jonty!
Look for version 0.4.7, It should resolve your issue. I've tested it locally and it seems to work fine. Iv'e tried running your code on an ESP8266 and it crashed, I guess it makes sense considering how much data is being transferred. (Everything worked fine with an ESP32, after using the new version).
Version 0.4.7 is available as a zip from the release page, and it will be on the Library Manager very soon.
Please make sure everything works as expected on your end.
Best regards,
Gil.
from arduinowebsockets.
Just in case this is also relevant, I can't seem to find any way to get the library to reconnect properly when the connection closes like this.
Adding client.connect(websockets_connection_string);
to the WebsocketsEvent::ConnectionClosed
block does result in the connection reopening, however ping()
or send()
after that no longer get responses from the server - presumably they're not being sent, or the responses are not being handled.
from arduinowebsockets.
Sorry to have to reopen this, but it doesn't appear to be resolved for me!
Running the example code above still results in:
.ConnectionOpened
GotPong
Got Message: {"op":"pong"}
ConnectionClosed
I've fetched the latest zip and installed it - I even removed the library and checked it wouldn't build when it was removed! No dice.
If there's anything I can do to help debug this, let me know.
from arduinowebsockets.
Bah, wait, ignore me - this seems to have been a cache problem. It is now reliably crashing so I presume this esp32 doesn't have enough memory!
Thanks.
from arduinowebsockets.
Well, I get inconsistent crashes. Sometimes the ESP32 does not crash and prints the data correctly. I might try to improve the memory usage of the library, it is far from optimized..
Anyway, I recommend you try another websockets library just to see if it's an optimization problem or a physical restriction.
Let me know if you found a solution (if you don't mind sharing),
Gil.
from arduinowebsockets.
I am almost certain that is because the response sizes can vary enormously and it's hit-and-miss as to if the data will fit in memory on a standard ESP32 WROOM module - I've got a much larger WROVER module on the way and will test with that!
from arduinowebsockets.
Ok cool, good luck!
from arduinowebsockets.
Related Issues (20)
- Hieromon/AutoConnect & WebSockets Client on ESP8266 - Can't Establish wss
- Secured-ESP8266-Client can't seem to receive any messages while connection is open HOT 1
- Compilation error: 'WebsocketsClient' does not name a type ?? HOT 3
- Getting a error from the TCPServer using the Arduino GIGA R1 WIFI on the ESP-32Client code. HOT 10
- ESP32-CAM WebSocket Server: Failure to Stream Camera Feed after Page Refresh or Multiple Connections
- WSS Connection error
- [ 5236][E][WiFiClient.cpp:313] setSocketOption(): fail on -1, errno: 9, "Bad file number" HOT 2
- Reconnecting after lost connection HOT 2
- Disconnecting almost inmediately
- Random disconnects, fails on binary ping including 0x00 HOT 1
- Issue with WSS and ESP 32 HOT 4
- Esp32 WebSocket Client won't work with WebSocket Node.js server. HOT 3
- Client-Message-Buffer
- ESP32 Server disconnected when receiving messages HOT 1
- Compilation errors with arduino_esp32 version 3.0.0 HOT 6
- wrong username
- Project is dead
- network::TcpServer* _server HOT 1
- Getting my connection closed when on node js wss server HOT 4
- Esp8266-Client example compiles with warnings, maybe others do too. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinowebsockets.