Hi all. I did some investigation and found the cause of the error was a change made to the ESP32 package index. I reported the problem to the ESP32 developers:
Hi @yony445. It is not necessary to go back to the previous version. You can solve the problem by uninstalling and reinstalling version 2.0.7 of the ESP32 boards platform.
Which version of Arduino IDE are you using (e.g., "2.0.1")? The version is shown on the window title bar and also in the Help > About dialog.
I ask for this information because I want to give you the appropriate instructions for the IDE version you are using.
Although the downgrade is one workaround, it is not necessary. You can simply uninstall and then reinstall 2.0.7 so that you will benefit from using the latest and greatest version of the ESP32 boards platform.
Here are the instructions for doing that:
Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
Scroll down through the list of boards platforms until you find the "esp32 by Espressif Systems" entry.
Hover the mouse pointer over the "INSTALLED" label on the "esp32 by Espressif Systems" entry. You will now see it change to an "UNINSTALL" button.
Click the "UNINSTALL" button.
A confirmation dialog will appear. Click the "YES" button.
Wait for the uninstallation to finish.
Select "2.0.7" from the dropdown version menu at the bottom of the "esp32 by Espressif Systems" entry.
Click the "INSTALL" button at the bottom of the "esp32 by Espressif Systems" entry.
Wait for the installation to finish.
Please let me know if you have any questions or problems while following those instructions.
Hi @simonsko. I'm going to ask you to post some additional information that might help us to identify the problem.
Please do this:
Close all Arduino IDE windows.
Start Arduino IDE.
(this restart was done to start from a blank console panel)
Select Tools > Board > Boards Manager from the Arduino IDE menus.
Attempt to update the "esp32 by Espressif Systems" boards platform.
After the process fails, click the Close button.
Click on the black console panel at the bottom of the Arduino IDE window.
Press Ctrl+A to select all the text.
Press Ctrl+C.
This will copy the selected text to the clipboard.
Open a forum reply here by clicking the Reply button.
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.
Press Ctrl+V.
This will paste the copied text into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Click the Reply button to post the output.
I'm hoping there will be some additional information in the Arduino IDE console that might help us to understand the cause of the error you experienced. There are a lot of possible causes of this generic "java.lang.NullPointerException" error.
java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:179)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionInstaller.remove(ContributionInstaller.java:275)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:170)
... 1 more
I have the same issue. Unable to uninstall esp32 from boards manager.
Should we remove install files manually?
java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onRemovePressed$3(ContributionManagerUI.java:213)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionInstaller.remove(ContributionInstaller.java:276)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onRemovePressed$3(ContributionManagerUI.java:210)
... 1 more
How to manually remove files?
I did try to remove package_esp32_index.json and cache directory from C:\Users\simon\AppData\Local\Arduino15
but when I run arduino IDE was resorted automatically. And of course same problem..
@simonsko and @crashsoft, which version of Arduino IDE are you using (e.g., "1.8.19")? The version is shown on the window title bar and also in the Help > About dialog.
Please also tell me which operating system you are using (e.g., "Windows").
I ask for this information because I just tried updating my ESP32 boards platform from 2.0.7 to 2.0.8 with Arduino IDE 1.8.19 on my Windows machine. I do see some warnings, but I didn't experience the error you reported and the update was succesful.