Open MAkcanca opened 3 years ago
@MAkcanca How did you solve this at the end?
@dunyakirkali They forgot about this issue, probably not in their scope. I ended up not using nerves, currently trying to reach out to some Japanese folks about this. If you do solve this however, please ping me here.
I just had this or an issue with the same symptoms. It was due to not specifying a timeout option and so the call was never returning or timing out.
Tortoise.publish("testdev01", "sensor/test", "hello", dos: 0, timeout: 500)
Returns after 500mS with a clause matching error due to {:error, :timeout}
not being handled. But that's progress compared to hanging.
I'm trying to write an example project for Aws IoT core MQTT connection with Tortoise, but whenever I try to publish a message, application hangs. It's running on Rpi0 I'm fairly new to Elixir and can't say that this is the right approach, but the lack of example projects does not make things easier to learn either. Here is what I do to send a message
When I insert some "debug console log's" between the functions, I can see that it runs until publish, then it hangs. I believe this happened before in https://github.com/gausby/tortoise/issues/62 https://github.com/gausby/tortoise/issues/95 Nobody tackled this problem for 2 years? I'm using Nerves, Elixir 1.11.2-otp-23, erlang 23.1.4 Any help appreciated, thanks!
Update: When I remove the depth option, error is thrown.
Fatal - Handshake Failure\n {bad_cert,max_path_length_reached}'}}
Update 2: I switched the certifi with Amazon Root CA1 I found from here but it gives Unknown CA error now. I guess I need the full chain to verify it? I appended an intermediate cert from https://good.sca1a.amazontrust.com/ here to the same pem file but the result is the same, unknown CA.