Comments (9)
I've started a project that uses this on ESP32, so I'll be working through issues over the next month or so. Stay tuned for updates.
from asynchttprequest.
@MkLHX it seems to work (sort of) if you simply change all #include <ESPAsyncTCP.h>
to #include <AsyncTCP.h>
in all the library files. However, it seems to be causing heap poising after a few minutes of activity. Not yet investigated whether this is an issue with this repo, or AsyncTCP
from asynchttprequest.
from asynchttprequest.
@MkLHX it seems to work (sort of) if you simply change all
#include <ESPAsyncTCP.h>
to#include <AsyncTCP.h>
in all the library files. However, it seems to be causing heap poising after a few minutes of activity. Not yet investigated whether this is an issue with this repo, or AsyncTCP
Hi @JarrettR, i tested this, but still crash my esp32 every time i call the lib's methods.
Since few hours, i fixed an other issue from arduino-esp32 sdkconfig file in platformio core.
The WiFi feature looks working better.
May have the time to try debug the lib with AsyncTCP instead of ESPAsyncTCP
from asynchttprequest.
I've been trying and finding that a core panic usually takes place within the IDF tcp code, and the stack back trace seems to suggest AsyncTCP may be to blame by using more closed slots than allowed after several client connects.
This is using an esp-prog in JTAG mode.
The (un-commented) printed debug info seems to suggest that the FIN handlers never get called despite FIN packets being present in the Wireshark trace.
Will be interesting to find others experiences.
from asynchttprequest.
Have made some progress with my core panics.
Firstly I have added some bounds checking to all the places in AsyncTCP tries to use _closed_slot
as an array index, this prevents badness in several places there - but the cause still needs to be understood:
if(msg->closed_slot >= 16 || msg->closed_slot < -1) {
Serial.printf("CLOSED SLOTS BOUNDS!! _tcp_recv_api (%d)\r\n", msg->closed_slot);
return msg->err;
}
if(msg->closed_slot == -1 || !_closed_slots[msg->closed_slot]) {
...
I then still had random failures where it looked like a race condition during the connect / send phases of asyncHTTPrequest causing core panics.
I solved that by altering the sample code to NOT call send() after open(), but hold that off until the request callback, adding a readyState = 1 condition:
void sendRequest(){
if(request.readyState() == 0 || request.readyState() == 4){
request.open("GET", "http://worldtimeapi.org/api/timezone/Europe/London.txt");
}
}
void requestCB(void* optParm, asyncHTTPrequest* pRequest, int readyState){
if(readyState == 4){ // response
String JSONinfo(pRequest->responseText());
Serial.println(JSONinfo);
Serial.println();
}
if(readyState == 1) { // connected
pRequest->send();
}
}
It has now ran for a good deal longer without issue, scraping a simple webpage for now.
The AsyncTCP closed slot issue is obviously not directly this library's fault, but needs to understood so it can be rectified. (eg: WTF is a closed slot anyway?)
from asynchttprequest.
I've started using asyncHTTPrequest in an ESP32 project. Now using the correct AsyncTCP library for ESP32 and have added a mutex semaphore to protect the data structures in multi-threaded operation. Seems to be working well now in my application (IoTaWatt). Have bumped version to 1.2.0 for ESP32 support. Assuming all will be fine with ESP8266 as nothing really changed there, but will update the ESP8266 version of IoTaWatt to use 1.2.0. Going to close this issue as most of this looks like it could be the thread corruption problem. Please file new issue if problems persist with this version.
from asynchttprequest.
Hi,
I keep getting an error :
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400556d5 PS : 0x00060130 A0 : 0x8205273c A1 : 0x3fcebe30
A2 : 0x00000000 A3 : 0xfffffffc A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x3fcb7f50 A11 : 0x3c15c740 A12 : 0x00000004 A13 : 0x3fcb7f54
A14 : 0x20544547 A15 : 0x00000000 SAR : 0x00000018 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff
Backtrace: 0x400556d2:0x3fcebe30 |<-CORRUPTED
from asynchttprequest.
I'm not supporting this for ESP32. You can get async HTTP by running any client in a FREErtos task. My esp32HTTPrequest works for me in that environment.
from asynchttprequest.
Related Issues (20)
- ESP32 crashes when making simultaneous requests with 2 instances HOT 3
- Connection not Closing HOT 3
- Question: Identifying Caller in Callback HOT 3
- Question: Use of Optional Argument in asyncHTTPRequest::onReadyStateChange() HOT 1
- Crash on Loading Data HOT 2
- Basic Authentication using URL Encoding (in POST) Crashes with Guru Meditation Error
- URL without trailing '/' after address causes crash on ESP32 HOT 1
- Issue when assigning result to a string HOT 2
- Following redirects? HOT 1
- HTTPS HOT 1
- Compilation error on esp32 HOT 3
- Compilation error on ESP8285 and PlatformIO
- Feature request: make readyStates public HOT 1
- Crash after second request to not accessible target HOT 9
- HTTP Basic Auth login password HOT 1
- Hello ! HOT 1
- Want to make 2 different requests, but how to say to the "void requestCB" function to which requests the result belongs ? HOT 8
- "Off by one" error in header values ? HOT 1
- assert failed: block_trim_free HOT 1
- Strange issue with ESP32
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 asynchttprequest.