Tls: oversized record received with length 29795 Error

When trying to user sudo snap install or if I try snap find.
I am running Ubuntu 17.04
I have removed snapd and then re-installed with no fix.
I am behind a corp proxy that does NOT require login.
I have verified the correct proxy in /etc/environment to be correct. I even tried a secondary proxy that had no change.

Has been going on for days.

What else am I missing?

$ sudo snap install rocketchat-server
error: cannot install "rocketchat-server": Get
       https://search.apps.ubuntu.com/api/v1/snaps/details/rocketchat-server?channel=stable&fields=anon_download_url%2Carchitecture%2Cchannel%2Cdownload_sha3_384%2Csummary%2Cdescription%2Cdeltas%2Cbinary_filesize%2Cdownload_url%2Cepoch%2Cicon_url%2Clast_updated%2Cpackage_name%2Cprices%2Cpublisher%2Cratings_average%2Crevision%2Cscreenshot_urls%2Csnap_id%2Csupport_url%2Ccontact%2Ctitle%2Ccontent%2Cversion%2Corigin%2Cdeveloper_id%2Cprivate%2Cconfinement%2Cchannel_maps_list:
       tls: oversized record received with length 29795

Thanks, Nick

Nice!

What happens if you access that URL outside of snapd? Actually, that one is rather cumbersome to copy-paste, so try this instead:

curl -s -H X-Ubuntu-Series:16 https://search.apps.ubuntu.com/api/v1/snaps/details/rocketchat-server

Doesn’t seem to do anything. It just goes back to linux prompt.
Also attempted with sudo but same thing.

Hmm… and this?

curl -s  https://postman-echo.com/status/200

Same as last time…nothing

Ah! OK, let’s try again:

curl -D- -s  https://postman-echo.com/status/200

Again, Nothing. Sounds like I broke something

That last one should be printing something. Hmm.

How about

printenv | grep -i ^http

It lists my http and https proxy URLs
These are both the PAC addresses. I have also attempted with the straight addresses with :8080

I’ve never seen PACs work in linux (but then again I’ve had the fortune of not having to worry about them in ages). Could you try again with the “direct” ones? Use the printenv to check your shell picked up the change before trying curl again.

So,
I updated /etc/enrivonment to :8080 and ran command again. - Showed PAC
I checked /etc/apt/apt.conf it has the :8080 URL
I ran export http_proxy and export https_proxy - grep command showed the :8080 as it should
Your curl command started to print like it should.

curl -D- -s  https://postman-echo.com/status/200
HTTP/1.1 200 Connection established

HTTP/1.1 200 OK
Access-Control-Allow-Credentials:
Access-Control-Allow-Headers:
Access-Control-Allow-Methods:
Access-Control-Allow-Origin:
Access-Control-Expose-Headers:
Content-Type: application/json; charset=utf-8
Date: Fri, 25 Aug 2017 17:51:53 GMT
ETag: W/"e-+3Pmmp/QERKiJq3DueGVYg"
Server: nginx/1.10.2
set-cookie: sails.sid=s%3AC2l_Ak3kNWhp6amQvmDJaEhA0L4tHdjp.QpeuLC3Vd2aPtCeQ8iMWu253Opxer5n0qxx%2Fnmivzs4; Path=/; HttpOnly
Vary: Accept-Encoding
Content-Length: 14
Connection: keep-alive

{"status":200}

But my sudo snap install rocketchat-server still get the same error.

OK! with the :8080 addresses in /etc/environment, systemctl restart snapd should let it pick up the change, and you should be in business!

That fixed it. Everything is back up and running to me.