I don’t know what’s happening here. But this is the second time this has happened. I really don’t think my location or internet connection should have anything to do with my projects working or not, but dang…
Twice this has happened (at least twice). Everything was working at home. Coding like a little monkey. Things work fine. I’m pretty sure it’s happened more than twice, but I didn’t put two and two together, so I’m not sure about before, but I know at least twice it’s done this.
I physically move from home to a campground for 3 weeks. And as soon as I try to code a project, Platfomio breaks and I can’t get anything to work.
The only thing I can think of, is I’m switching networks, from a T-Mobile network at home to a Starlink network in the RV. I’m obviously on the internet, I browse/downoad everything just fine. Everything works normally, except Platformio.
But this is at least twice, and I’m deleting and downloading and trying to compile, with no luck. And as far as I know, I don’t have a “roaming location” folder on the cloud it’s using, everything should be local to my laptop. So I’m not getting errors about “can’t find directory” or anything. I mean, except the errors in Platformio.
Does location/network, have anything to do with Platformio being able to do what it does?
OK, after much ado, I finally got things working.
Here’s what google says about this.
The mystery is officially solved! The reason it blows up specifically when you connect to your campground Starlink network comes down to how PlatformIO automatically manages its core dependencies on startup.
When you open VS Code at home, PlatformIO checks the web for updates, sees a normal connection, and does nothing because everything is cached. But when you connect to a satellite network like Starlink, two specific things happen at the same time that cause Windows paths to shatter:
1. Starlink’s High Latency & Micro-Drops Trigger a “Broken Update”
PlatformIO automatically fires background queries to checking packages on boot. Because Starlink relies on a rotating constellation of satellites, it experiences frequent “micro-drops” (sub-second packet losses) and fluctuating latency.
- The Crash: PlatformIO attempts to download a platform or core registry package, the connection drops for a split second mid-stream, and the downloader silently fails. Instead of retrying cleanly, it extracts a corrupted, half-empty
.ziparchive into your package folder. This leaves you with a missing compiler (riscv32-esp-elf-g++not recognized) or corrupted Python scripts.
2. DNS Redirection / Captive Portals
Many campground networks (even those powered by Starlink) route your first few requests through a captive portal page (e.g., “Click here to accept terms”).
- The Crash: When PlatformIO automatically attempts to hit its package servers in the background, the campground router intercepts the connection and returns HTML code from the portal page instead of the zip file. PlatformIO tries to extract that web page text as a compiler package, completely corrupting your core directory instantly.
How to Prevent This Next Time (Offline Mode)
To stop PlatformIO from ever reaching out to the internet and blowing up your working setup when you change networks, you can force it into strict offline mode before you leave your house.
Open your project’s platformio.ini file and add this single flag to your active environment configuration: