ESP32 3.03 Httupdate conflict

Hello,
I use Arduino 1.8.57
I use ESP32 library version 3.0.3
I have the multi errors on the httpUpdate library like:

C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:54:48: error: 'HTTPClient' was not declared in this scope; did you mean 'HttpClient'?
   54 | using HTTPUpdateRequestCB = std::function<void(HTTPClient *)>;
      |                                                ^~~~~~~~~~
      |                                                HttpClient
C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:54:61: error: template argument 1 is invalid
   54 | using HTTPUpdateRequestCB = std::function<void(HTTPClient *)>;
      |                                                             ^
C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:54:34: error: '<expression error>' in namespace 'std' does not name a type
   54 | using HTTPUpdateRequestCB = std::function<void(HTTPClient *)>;
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:73:27: error: 'followRedirects_t' has not been declared
   73 |   void setFollowRedirects(followRedirects_t follow) {
      |                           ^~~~~~~~~~~~~~~~~
C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:95:107: error: 'HTTPUpdateRequestCB' has not been declared
   95 |   t_httpUpdate_return update(NetworkClient &client, const String &url, const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL);
      |                                                                                                           ^~~~~~~~~~~~~~~~~~~
C:\Users\vorms\OneDrive\Documents\ArduinoData\packages\esp32\hardware\esp32\3.0.3\libraries\HTTPUpdate\src/HTTPUpdate.h:98:123: error: 'HTTPUpdateRequestCB' has not been declared
   98 |     NetworkClient &client, const String &host, uint16_t port, const String &uri = "/", const String &currentVersion = "", HTTPUpdateRequestCB requestCB = NULL

I have no error with other library and other project.
What can I do for solving errors ?

That may be a 3.0.3 issue, drop the esp32 boards back to 2.0.17 and try to compile again.

Do you think the version 3.03 has bugs or incompatibility issues ?

Perhaps you didn't hear about the big change.
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

How ! Many thanks for your comment!
Best regards
Thierry

Hello,
I try many things about the conflict with the Espressif HTTPUpdate library.
I try to install the 2.017 version and it not solve the problem.
I try to uninstall Arduino, remove the Arduino15 folder and reinstall all the chain and it doesn't solve the problem.
It's like the HTTPUpdate library doesn't respect the http object.

Please, I have to modify an application for a client and I have to recompile a project.
I don't know how to solve the issue.

Many thanks for your help.

Best regards

Thierry

I add #pragma message on libraries.
I see the message on the library HTTPUpdate.h
I don't see the message on HTTPClient.h (same folder as HTTPUpdate.h)
why ?

Hi @Vorms. I'm going to ask you to provide the full verbose output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences...(or Arduino > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compilation" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. After the compilation fails you'll see a button on the right side of the orange bar in Arduino IDE: Copy error messages. Click that button.
    This copies the full output to the clipboard.
  6. Open a forum reply here by clicking the "Reply" button.
  7. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  8. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  9. Move the cursor outside of the code block markup before you add any additional text to your reply.
  10. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.