An image of an Arduino device and other Electric components

Corrupt Arduino IDE Installation

Print Friendly and PDF

Posted: Saturday, January 11, 2025 at 08:57 AM | Categories: Internet of Things (IoT)

I'm a big fan of M5Stack products, I have a collection of their devices here but I never seem to do much with them. In one of the periodic newsletters I receive, I noticed a cool project for an M5Stack Core Ink device I wanted to try out. The project is the Keychain Skimmer Scanner project that helps you locate Credit Card Skimmers.

I quickly pulled out the right device and started working on getting the code compiled and deployed to the device. I immediately ran into a bunch of problems, and I really struggled to get it to work. I visited the Issues area of the code repository, and created an issue outlining my problem. It turns out that there were some minor issues with the code and instructions, but even after resolving them I still couldn't get the code to compile and the errors I got simply didn't make sense.

If you look at my issue at Code won't compile you can see the error messages I received from the compiler. In one of the examples, the compiler complained that a method referenced in the code did not exist. I took a look at that particular library's source and realized that the owner had refactored the code and moved some methods into a separate file or library.

Looking at my local configuration, I realized that I had some older versions of the libraries on my system. I quickly uninstalled Arduino Studio and deleted the libraries folder, rebooted, installed everything again, and gave it another shot. Sigh, it didn't work.

I put it aside for a while and started working last night on another M5Stack device project and encountered similar library incompatibilities. Realizing that I had bigger problems if none of my M5Stack projects would compile, I started digging into this in earnest.

I uninstalled and deleted everything again, but then started looking for any other detritus left on the system. I run Windows on my primary development system (I have a macOS system as well, but I don't use it as much) and I found some additional files that remained after the uninstall.

The first set of files was in c:\users\john\.arduinoIDE as shown in the following figure. Delete that folder.

Windows File Explorer showing the arduinoIDE folder

Next, I looked in the system's Application Data folder and found the following:

Windows File Explorer showing the app data folder

The easiest way to find the system's AppData folder is to open File Explorer, select the path input field, type %appdata% then press the Enter key. AppData is an environment variable that points to the system's roaming data folder.

There's two different Arduino IDE folders in that location: Arduino IDE and arduino-ide. Sigh. I'm not sure why there's two of them, but the arduino-ide folder contains settings, code cache, and other stuff as shown below.

Windows File Explorer showing the arduino-ide folder contents

This must have been the source of my issue. Once I whacked (deleted) all three folders and reinstalled every one of my existing issues went away.

Somehow my system's configuration got corrupted and wouldn't install updated versions of the libraries already installed.


Next Post: Eleventy Post Stats Plugin Broken

Previous Post: Eleventy Packages Page

If this content helps you in some way, please consider buying me a coffee.

Header image: Photo by Robin Glauser on Unsplash.