espressif / esp-google-iot

Google Cloud IoT SDK as an ESP-IDF Component
Apache License 2.0
143 stars 44 forks source link

ERROR !!! FAILED TO CONNECT REASON 17 and 33 (CA-89) #17

Closed Gohith closed 3 years ago

Gohith commented 4 years ago

After running the example code smart outlet. I am facing issue and got Connection open failed event. Reason was both 33(bad username or password)and 17 (peer connection reset error).

I had checked the 'jwt' variable which had password by placing it in online tool (jwt.io), there the tool displays signature error (base64 encode error).

Anyone having knowledge on this can help me to jump out of this?

hairpin666 commented 3 years ago

Having the same issue, getting the ERROR! Connection has failed reason 17 message.

Gohith commented 3 years ago

Hey, This could be error on encoding and I resolved by using external encoder. Hope you get this.

hairpin666 commented 3 years ago

Hi, My problem was caused by a path which was too long. Moving the project folder down helped and I was able to build again.

tecnnic commented 3 years ago

I'm having the same problem, how did you solve it?

Gohith commented 3 years ago

Hey @tecnnic, I solved this error by considering third party encoder for certificates. Some how I am not able to get expected result from given esp-google_iot library. So, I turned towards third-party.

apeiris commented 3 years ago

I had this issue(reason 17) when my ESP32 was given 5GHz ssid, ESP32 work only on 2.4GHz band. Switch to 2.4Ghz SSID if you are on 5GHz