I am following Firebase Web App with ESP32. The code works well but
I am getting an occasional error when updating firebase real time database from the function firebaseData.errorReason() The error is as follows: “connection refused”. I have tried to find possible causes in Firebase docs but no luck there. I have also tried different networks.
This happens when updating using individual “set” commands or updating all readings at once using json.
Note: if I immediately try again to update it usually works so I have added code to retry on error, but I would still like to know possible causes of this error. Thanks,
Rob
Hi.
Im not sure what is causing the error.
checking for the error and retrying in case of failing seems a good solution.
What is exactly the code that you’re testing?
Regards.
Sara
Hi Sara, code is here. (same code as last issue which was resolved.)
https://pastebin.com/ixzFLQdx
Hi.
Everything seems fine with the code…
So, I’m not sure what’s the cause of the error. So, it’s better to add the lines for retying in case of failing.
Regards,
Sara