Error: Get snap under proxy configuration


#1

Everytime I try to download any package using snap I get errors like this:
error: cannot install “intellij”: Post
https://api.snapcraft.io/v2/snaps/refresh: proxyconnect tcp: tls:
oversized record received with length 20527

How can I fix that?


#2

what proxy are you using?


#3

googling that error leads me to believe you have set https_proxy=https://<something> when you might need it to be https_proxy=http://<something> instead.


#4

I’m using a company proxy that works for everything here but didn’t work for snap.
I put it as environment variable and in snap settings.


#5

I tried both, http and https.


#6

could you show me the output of

sudo cat /proc/`pidof snapd`/environ | tr '\0' '\n' 

please?


#7

LANG=pt_BR.UTF-8
LANGUAGE=pt_BR:pt:en
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
NOTIFY_SOCKET=/run/systemd/notify
LISTEN_PID=702
LISTEN_FDS=2
LISTEN_FDNAMES=snapd.socket:snapd.socket
WATCHDOG_PID=702
WATCHDOG_USEC=300000000
INVOCATION_ID=019d7e7ebc3a4fd785f8a779c13fb371
JOURNAL_STREAM=9:19180


#8

I made it.
I runned this command.
sudo snap set system proxy.http=http://127.0.0.1:3128
sudo snap set system proxy.https=http://127.0.0.1:3128
and installed the snaps in the same session of the root.


#9

When a use sudo for each command didn’t work.