Platform io not working in offline mode

https://github.com/platformio/platformio-vscode-ide/issues/new?title=Start PIO Home Server&body=%23 Description of problem

Leave a comment…

BEFORE SUBMITTING, PLEASE SEARCH FOR DUPLICATES IN

%23 Configuration

VSCode: 1.52.1
PIO IDE: v2.2.1
System: Windows_NT, 10.0.18363, x64

%23 Exception

Error: Error: You are not connected to the Internet.
PlatformIO needs the Internet connection to download dependent packages or to work with PlatformIO Account.

  at c:\Users\vtrom\.vscode\extensions\platformio.platformio-ide-2.2.1\node_modules\platformio-node-helpers\dist\index.js:1:5625
  at ChildProcess.c (c:\Users\vtrom\.vscode\extensions\platformio.platformio-ide-2.2.1\node_modules\platformio-node-helpers\dist\index.js:1:879169)
  at ChildProcess.emit (events.js:223:5)
  at ChildProcess.cp.emit (c:\Users\vtrom\.vscode\extensions\platformio.platformio-ide-2.2.1\node_modules\cross-spawn\lib\enoent.js:34:29)
  at maybeClose (internal/child_process.js:1021:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
  &labels=auto

I have used the pio upgrade --dev command to upgrade the PlatformIO but it is still not working when there is no internet

Well, is any of the two true? When does this appear? When you build a project and you don’t already have the local toolchains and other packages for it that are required? Or have you logged into your into your PIO account in the GUI?

@maxgerhardt Can you please guide me how to add local toolchains I guess the required packages have been downloaded but I am not sure about the toolchains can you please guide me for the same

Toolchains are a form of packages. If you were able to build and upload the project once (while being online), all the necessary tools should be installed in C:\Users\<user>\.platformio\packages.

Is an important question here.

It appears when I am offline when not connected to the internet.

Toolchains are a form of packages. If you were able to build and upload the project once (while being online), all the necessary tools should be installed in C:\Users\<user>\.platformio\packages

I have compiled and uploaded the code once so all the packages are installed I guess, but I am not logged in to platformIO

I just logged in to my platformIO account and its working fine now are there dependency on whether I am logged in to the account or not?

Immediately when you open VSCode or when you press build on a project or when? Can you show a screenshot?

This is quite the opposite of what I would have expected; If you log in and then disconnect from the internet, there should be an error like that.

This is quite the opposite of what I would have expected; If you log in and then disconnect from the internet, there should be an error like that.

No, it’s working fine when I logged in without any error

Immediately when you open VSCode or when you press build on a project or when? Can you show a screenshot?

Right now screenshot is not possible but this happened when I opened the VSCode and then hit the build button.

@maxgerhardt I don’t know how but I have logged out of my platformIO account and still I am able to compile offline. I don’t know how but everything is working fine now.