Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformIO thinks there is no internet connection #4526

Closed
1 task done
niklasarnitz opened this issue Jan 19, 2023 · 7 comments
Closed
1 task done

PlatformIO thinks there is no internet connection #4526

niklasarnitz opened this issue Jan 19, 2023 · 7 comments

Comments

@niklasarnitz
Copy link

niklasarnitz commented Jan 19, 2023

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system:

  • macOS Big Sur
  • Arch Linux with the latest updates
    PlatformIO Version (platformio --version):
    PlatformIO Core, version 6.1.4

Description of problem

PlatformIO thinks I don't have internet.

Steps to Reproduce

  1. Create a NodeMCU ESP8266 Arduino Project
  2. Upload the empty file

Actual Results

 *  Executing task: platformio run --target upload --environment nodemcuv2_ota 

Processing nodemcuv2_ota (platform: espressif8266 @^2.6.3; board: nodemcuv2; framework: arduino)
---------------------------------------------------------------------------------------------------
Library Manager: Installing lebuni/ZACwire for TSic @ 2.0.0
Error: You are not connected to the Internet.
PlatformIO needs the Internet connection to download dependent packages or to work with PlatformIO Account.

 *  The terminal process "platformio 'run', '--target', 'upload', '--environment', 'nodemcuv2_ota'" terminated with exit code: 1.

Expected Results

It gets the toolchain and successfully builds and uploads it.

If problems with PlatformIO Build System:

The content of platformio.ini:

[platformio]
lib_dir = lib
src_dir = src
extra_configs = platformio_extra.ini

[env]
lib_deps =
    lebuni/ZACwire for TSic @ 2.0.0
    schm1tz1/TSIC @ 1.1.2
    milesburton/DallasTemperature @ 3.11.0
    paulstoffregen/OneWire @ 2.3.7
    adafruit/Adafruit_VL53L0X @ 1.2.0
    olkal/HX711_ADC @ 1.2.12
    olikraus/U8g2 @ 2.34.5
    git+https://github.com/rancilio-pid/Arduino-PID-Library
    knolleary/PubSubClient @ 2.8.0
    me-no-dev/AsyncTCP @ 1.1.1
    bblanchon/ArduinoJson @ 6.19.4
    tobiasschuerg/ESP8266 Influxdb @ 3.9.0
    git+https://github.com/me-no-dev/ESPAsyncWebServer#f71e3d4
    git+https://github.com/tzapu/WiFiManager#71937d1

[env:nodemcuv2_usb]
platform = espressif8266 @^2.6.3
board = nodemcuv2
board_build.filesystem = littlefs
framework = arduino
monitor_speed = 115200
monitor_filters = esp8266_exception_decoder
debug_tool = esp-prog
debug_init_break = tbreak setup

[env:nodemcuv2_ota]
platform = espressif8266 @^2.6.3
board = nodemcuv2
board_build.filesystem = littlefs
framework = arduino
monitor_speed = 115200
monitor_port = socket://rancilio-silvia:23
upload_protocol = espota
upload_port = rancilio-silvia
upload_flags = --auth=otapass

[env:esp32_usb]
platform = espressif32 @^5
board = esp32dev
board_build.filesystem = littlefs
framework = arduino
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
debug_tool = esp-prog
debug_init_break = tbreak setup

[env:esp32_ota]
platform = espressif32 @^5
board = esp32dev
board_build.filesystem = littlefs
framework = arduino
monitor_speed = 115200
upload_protocol = espota
upload_port = silvia
upload_flags = --auth=otapass

Source file to reproduce issue:
See https://github.com/rancilio-pid/clevercoffee

Additional info

  • I'm using Google DNS Servers
  • I'm not using any Proxy
  • I'm not using any network level AdBlocker
@ivankravets
Copy link
Member

@niklasarnitz
Copy link
Author

niklasarnitz commented Jan 19, 2023

88.198.170.159 is not pingable.
When I ping registry.platformio.org, I don't get any response. But when I access it via a web browser, I get to the regular website.
But the GitHub IP and Domain are.

@niklasarnitz
Copy link
Author

Using socket.create_connection never yields a positive result for me.

@niklasarnitz
Copy link
Author

import socket

socket.setdefaulttimeout(2)

hosts = [
	"github.com",
	"185.199.110.153",  # Github.com
	"88.198.170.159",  # platformio.org
	"registry.platformio.org",
	"registry.nm1.platformio.org",
]

for host in hosts:
	print(host)
	s = socket.create_connection((host, 80))
	s.close()

Output:

github.com
Traceback (most recent call last):
  File "/Users/niklas/test.py", line 15, in <module>
    s = socket.create_connection((host, 80))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 845, in create_connection
    raise err
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 833, in create_connection
    sock.connect(sa)
TimeoutError: timed out

@niklasarnitz
Copy link
Author

Okay, via celullar it works.

It seems that my ISP is blocking the platformio.org IP...

@ivankravets
Copy link
Member

Could you contact your ISP? What is the reason that they blocked PlatformIO?

@niklasarnitz
Copy link
Author

As I said, It seems they blocked it.
Bc on my end there is nothing blocked.
I’ll contact them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants