Open Glavin001 opened 2 years ago
You can change this value in settings. See screenshot below
This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.
Any updates or plans for this?
Hi @ivankravets
The #4431 may be slightly different from this, but may be hopefully resolved by the resolution for this issue.
For the clarification, what I did was
And as I stated, I can use the PIO/code-server to develop for esp8266 Arduino successfully. That's great and thank you for that. This seems the core part of PIO is working.
What's missing is the PIO Home pages. I changed the HTTP_HOST to 0.0.0.0 also, but the PIO home page is not coming.
I always appreciate the work of you and your team. Thanks.
I just hit this as well, and I expect others will now that Codespaces is generally available in the free tier of GitHub.
I just hit this as well, and I expect others will now that Codespaces is generally available in the free tier of GitHub.
As GitHub have been prompting me to try Codespaces/VSC and I normally use PIO locally on a separate linux box, I have just come across the this issue too. Changing host in setting times out rather than refused when using 127. on a PC within a Chrome Browser. Any suggestions?
Also came across this issue trying to use PlatformIO on Github CodeSpaces... any fixes planned for this?
Any fixes planned for this?
Any solutions for this?
python -m platformio -c vscode home --port 45334 --host 127.0.0.1 --session-id xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --shutdown-timeout 3600 --no-open
127.0.0.1
of the server, but the VSCode on our client is trying to connect to the client's 127.0.0.1
and there-in lies the problemThanks!
After changing this to the process's machine's IP address, and restarting the machine, it now runs as python -m platformio -c vscode home --port 45334 --host 172.1.1.1 --session-id xxxxxxxxxxxxxxxxxxxxxxxxxx --shutdown-timeout 3600 --no-open
And now, clicking on PlatformIO's PIO Home
> Open
gives me a blank page instead of the error.
From my client, I was able to connect to the IP and port and confirm it runs a HTTP server.
So, on my terminal, I ran pio home
, and this opened up a new browser tab in my client which now shows the usual PIO Home page.
Question now is, can PIO also upload to my client's COM5:
much like how ESPHome https://web.esphome.io/ is able to flash a chip via browser (Chrome)?
Here are my conclusions:
pio home
runs a process like this python /home/dv1/.platformio/penv/bin/pio home
and the port is automatically captured by code-server on the server and forwarded to the client, that is the reason why I was able to load the usual PIO Home page in my client's browsercode-server
to also automatically forward the port after PIO starts the python -m platformio -c vscode home --port 45334 --host 172.1.1.1 --session-id xxxxxxxxxxxxxxxxxxxxxxxxxx --shutdown-timeout 3600 --no-open
processcode-server
via Chrome is likely possible
Problem
When opening PlatformIO Home:
VSCode extension appears to load from
127.0.0.1
instead of the GitHub Codespaces URL.Solution
Check for
CODESPACES=true
andCODESPACE_NAME
environment variables.Applicable Code
I think this comes from:
iframe src
: https://github.com/platformio/platformio-vscode-ide/blob/69bfc19bae633213c6d5455b47cb22efb2dcfed4/src/home.js#L158-L162getFrontendUrl
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L46-L58constructServerUrl
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L33-L43_HTTP_HOST
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L29I'll try to fork and contribute when I can. Any advice would be greatly appreciated!