-
Notifications
You must be signed in to change notification settings - Fork 95
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
Using client.send() outside the loop (FireFox client incompatibility) #11
Comments
Yes it is possible, and even very easy. Message callbacks come in 2 forms, you use the shorter one but if you wish to also accept the client as parameter to handle_message, you can. Look here After you get the client as parameter in handle_message, passing it over to |
Like this? (I've cut non relevant code) It works, but I'm not sure I've done it correctly.
|
Looks good to me 👍 |
This is the project - https://robotzero.one/esp-who-recognition-with-names/ I need to make some improvements to the tutorial I noticed that it doesn't work in Firefox. I get a cannot connect to ws//... error. If you're interested in testing your library with one of the ESP32 cameras I'll buy one for you. |
There is no need to buy me anything, thank you. Can you elaborate on what's not working? In what manners do things fail? How can I re-produce? Are you able to re-produce without a camera (just by sending very long messages)? |
I've tried with 0.4.0. and 0.4.2 and this code in a web page:
gives a Firefox can't establish a connection to the server at ws://192.168.1.108:82/. error Cut down ESP32 code:
Works great in Chrome. All the communication after the page loads is done with Websockets: https://vimeo.com/338402026 |
Thank you for the details! This definitely looks like a big with my implementation of websockets that FireFox does not want to accept (maybe chrome doesn't care). Thanks |
Firefox is 67 (64 bit) on Win 10. |
I found and fixed the issue. Patch 0.4.3 is now released. Thank you for the error reporting and details. Gil. |
New problem with .4.3 and .4.4 with Chrome and Firefox. The send binary part of the script (that sends video frames) is crashing:
|
Can you try reverting to version 0.4.2 to see if it is an error in the library or in something external (WiFiClient for example)? |
0.4.0 works great. After that they crash. |
Interesting.. I will look into it, thank you. Just making sure, you mean even 0.4.1 crashes, right? |
Yep but with less detail in the serial monitor. This is after refreshing the browser 3 times to test:
|
Can you open a new issue with this new bug? |
Iv'e started working on it. The error is raised here It's an error inside esp32's library code of WiFiClient. This might be because the connection is not available and you try to write to it. I can't see any reason why it should not work, all tests I've tried pass with no issue. This might be a server side error.. Otherwise, please share more info: Thank you. |
Hi. This might be more of a programming question again but...
Something like this works:
But I would prefer to send the message from the delete_all_faces function something like this...
Is it possible to make 'client' accessible outside the loop?
The text was updated successfully, but these errors were encountered: