• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Unit 11 – Asynchronous Web Server – Error

Q&A Forum › Category: ESP32 › Unit 11 – Asynchronous Web Server – Error
0 Vote Up Vote Down
x3mvz5pl5g5k asked 5 years ago

I am getting the following error on upload.  Would appreciate your input to resolve.

Arduino: 1.8.10 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 115200, None"
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7855fb]
goroutine 1 [running]:
github.com/arduino/arduino-cli/legacy/builder.ResolveLibrary(0x11c0e780, 0x1203411f, 0x5, 0x1203411f)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/resolve_library.go:64 +0x14b
github.com/arduino/arduino-cli/legacy/builder.findIncludesUntilDone(0x11c0e780, 0x11cb4320, 0x88ed00, 0x11f42240, 0x11f4e140, 0x11d48000, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:358 +0x3b6
github.com/arduino/arduino-cli/legacy/builder.(*ContainerFindIncludes).Run(0xdebc68, 0x11c0e780, 0xdebc68, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/container_find_includes.go:152 +0x3e5
github.com/arduino/arduino-cli/legacy/builder.runCommands(0x11c0e780, 0x11c35e1c, 0x20, 0x20, 0x409a01, 0xff, 0x0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:210 +0xbd
github.com/arduino/arduino-cli/legacy/builder.(*Builder).Run(0x11c65f40, 0x11c0e780, 0xdebbb4, 0x11c06ca0)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:117 +0xb9c
github.com/arduino/arduino-cli/legacy/builder.RunBuilder(...)
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-cli/legacy/builder/builder.go:226
main.main()
/home/jenkins/workspace/arduino-builder-all-cross-cli-inception/src/github.com/arduino/arduino-builder/main.go:398 +0x6d2
C:\Program Files (x86)\Arduino\arduino-builder returned 2
Error compiling for board DOIT ESP32 DEVKIT V1.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Question Tags: error Temperature Humidity Server
13 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.
I’ve never faced that error.
Did that happen with just that example, or it also happened with other sketches? Can you try a blink sketch and see if you get the same error?
Regards,
Sara

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

It is just with this example.  Blink is good. I rechecked and loaded the following sketches without issue as well:

– ExternalWakeUp_ext1_with_GPIO
– Hall_Effect_Sensor
– PIR_Interrupts_Timers
– TimerWakeUp
– Touch_Sensitive_LED
– WiFi_Web_Server_Outputs

However, I am also experiencing errors with the following sketches:

External Wake Up

Arduino: 1.8.10 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 115200, None”
ExternalWakeUp:51:20: error: expected initializer before ‘up’
void print GPIO wake up(){
^
ExternalWakeUp:51:12: error: expected initializer before ‘GPIO’
void print GPIO wake up(){
^
exit status 1
expected initializer before ‘up’
This report would have more information with
“Show verbose output during compilation” option enabled in File -> Preferences.

ServoSweep

Arduino: 1.8.10 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 115200, None”
WARNING: library Servo claims to run on avr, megaavr, sam, samd, nrf52, stm32f4 architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
In file included from C:\Users\jack\Documents\ELECTRONICS\esp32\Code\ServoSweep\ServoSweep.ino:7:0:
C:\Program Files (x86)\Arduino\libraries\Servo\src/Servo.h:75:2: error: #error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”
#error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”
^
Multiple libraries were found for “Servo.h”
Used: C:\Program
Not used: C:\Users\jack\Documents\Arduino\libraries\ESP32_Arduino_Servo_Library
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

I even reinstalled the Arduino IDE and the servo library, but again got these errors:

Arduino: 1.8.10 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 115200, None”

WARNING: library Servo claims to run on avr, megaavr, sam, samd, nrf52, stm32f4 architecture(s) and may be incompatible with your current board which runs on esp32 architecture(s).
In file included from C:\Users\jack\Documents\ELECTRONICS\esp32\Code\ServoSweep\ServoSweep.ino:7:0:

C:\Program Files (x86)\Arduino\libraries\Servo\src/Servo.h:75:2: error: #error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”

#error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”

^

Multiple libraries were found for “Servo.h”
Used: C:\Program
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.
Invalid library found in C:\Users\jack\Documents\Arduino\libraries\ESP32_Arduino_Servo_Library: no headers files (.h) found in C:\Users\jack\Documents\Arduino\libraries\ESP32_Arduino_Servo_Library
Invalid library found in C:\Users\jack\Documents\Arduino\libraries\ESP32_Arduino_Servo_Library: no headers files (.h) found in C:\Users\jack\Documents\Arduino\libraries\ESP32_Arduino_Servo_Library

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

So that is a total of three sketches that I am having some frustration.

Jack

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Jack.

I’m sorry you’re having those troubles.

  • External wake up: you’re not using the code we provide in the unit. You’ve probably modified something the wrong way. For example, the error suggests that you have a line with “void print GPIO wake up”. If you are trying to create a new function, its name shouldn’t have spaces.
  • Servo: if you go to your libraries folder at C:\Users\jack\Documents\Arduino\libraries\, you should have a servo library for arduino, besides the ESP32 servo library you’ve installed. Move the arduino servo library out of that folder, and everything should work fine.
  • As for the asyncrhonous web server, I don’t know what might be issue. Have you installed the libraries properly? In which folder are your libraries located?

Regards,
Sara

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

I also tried to run these sketches on a different computer, but instead faced another separate problem doing this.  After updating the Arduino IDE, I tried to install the esp32 board by adding the appropriate line in Preferences:
https://dl.esperssif.com/dl/package_esp32_index.json
– and then went to board manager to install the boards, but instead ended up with the following error:

Error downloading https://dl.esperssif.com/dl/package_esp32_index.json

It seems to be a week with a lot of issues for me!

Jack

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

Hi Sarah Thanks for your feedback.

1. Regarding the External Wake Up sketch, I seem to have worked this out, but nevertheless the code listed in Unit 4 doesn’t look identical with the code per the link provided in the chapter?

https://github.com/RuiSantosdotme/ESP32-Course/blob/master/code/DeepSleep/ExternalWakeUp/ExternalWakeUp.ino

2. The Arduino\libraries folder contains only one servo library – the ESP32_Arduino_Servo_Library folder.   It is still problematic for me.

3. It is Aruino\libraries. So I am now encountering issues with the libraries and not clear why or what to do. I suppose I could uninstall everything and delete any remaining files, then start from the beginning?

 

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.

Answering your first publication.

You’re right about the external wake up sketch. When there’s a new library update or something, we always update the code on GitHub first. Then, we update the code on the ebook in the next update. That’s probably what happened in that case. That’s why we provide a link to github in every chapter. The link always contains the most updated code.

You’re having trouble installing the boards because you’ve copied the URL wrong. Here’s the right URL

https://dl.espressif.com/dl/package_esp32_index.json

You’ve typed esperssif instead of espressif. That’s probably why it is not working.

Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Answering your second publication.

You are right that you only have one servo library on the C:\Users\jack\Documents\Arduino\libraries\ path

But you have another Servo library on the following path (it’s another arduino folder):

C:\Program Files (x86)\Arduino\libraries\Servo\src/Servo.h
Remove the servo library from this folder and try to compile the code again.

Try to follow what I’ve suggested and then let me know if it worked, or if you need further help.

Regards,
Sara

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

Many thanks Sarah, I now see what happened.
External wakeup – incorrect folder/file structure
Servo – I didn’t realize there was another libraries folder in the Programs/Arduino folder, and a file would ever need to be removed from there
Boards – typo
So that leaves the DHT sketch that I am still unable to resolve.  It is sending a GO runtime error?
What are your thoughts?  I have run this in the past so uncertain why now I am getting this.
Jack

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

I’ve searched for a while about that error, and it seems to be happening on Arduino 1.8.10. Is this the version that you’re using?
Some people reporting that error said the error went away after downgrading to Arduino 1.8.9. If that’s you case, you can download arduino 1.8.9 here: https://www.arduino.cc/en/Main/OldSoftwareReleases#previous
Let me know if this solves the issue.
Regards,
Sara

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

Yes, I recently updated to that version.   I tried to reinstall with 1.8.9, but encountered a problem I had before with my laptop where I cannot add the esp32 boards.  But this time there is no typo in Preferences.  When I search for esp32 in the Boards Manager, it is just blank.  Ugh!

Also, I tried to insert an image in this response, but it isn’t working.  What is the method?

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi again.

I think that is a conflict between older and newer versions of the ESP32 packages.

Can you remove the ESP32 board add-on from your Arduino IDE?

Then, open the folder explorer and enter: C:\Users\<YOUR_WINDOWS_USERNAME>\AppData\Local\Arduino15 and press enter key:

Then, delete packages folder inside the Arduino15 folder.

Restart the Arduino IDE.

Then, Install the ESP32 Board in Arduino IDE again: https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

Tools > Board > Boards Manager

Wait for downloads to finish.

Click “Close”.

Re-open your Arduino IDE. And it should work now.

 

To upload an image here, you can share a link to Google Drive file, dropbox, imgur.com, or box.com (any file sharing service).

Regards,
Sara

0 Vote Up Vote Down
x3mvz5pl5g5k answered 5 years ago

This solved the problem with configuring the board and the sw downgrade also allowed me to successfully upload the DHT sketch.  So all is good, and I appreciate taking the time to walk me through the problems.

So it seems Arduino IDE upgrades will sometimes mess up a program.  I have heard this to be true of Ubuntu and some other programs.  So I guess part of using these platforms in the future will include having to somehow modify programs we develop to make them work, or stay with an older IDE or other platforms.  Advantages and disadvantages to both.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi.

I’m glad everything is solved now.

Thanks for reporting those problems with the Arduino IDE, because other readers can have the same issues and now we know the reason.

Sometimes it is better to upgrade just after some time the new version is released because new releases have higher probability to have bugs. Usually, I only upgrade my IDE after the new version has been released for some time.

I’ll mark this issue as resolved. If you have more questions, you just need to open a new question in our forum.

Thank you for following our courses and good luck with your projects.

Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.