Closed samuelplexcelon closed 1 year ago
It's hard to tell anything from that output unfortunately. You could try enabling CRT logging (https://github.com/awslabs/aws-crt-nodejs/blob/main/lib/native/io.ts#L86) and/or you could make a debug build of the CRT to get a better stack trace (install from source and override debug to be true: https://github.com/awslabs/aws-crt-nodejs/blob/main/scripts/build.js#L117). Feel free to attach the results to this thread in case they provide better information.
I appreciate the feedback! I'll enable logs and debug and see what I come up with.
Also, for what it's worth, we have a low-level shadow client here: https://github.com/aws/aws-iot-device-sdk-js-v2/blob/main/lib/iotshadow/iotshadowclient.ts
You also might see better results with the mqtt5 client (https://www.github.com/awslabs/aws-crt-nodejs/blob/main/MQTT5-UserGuide.md) but I don't want to send you on a wild goose chase and even if you do, we still need to fix the problem in the 311 client.
I've come across a seemingly separate bug(?) that I'll open another issue for. I haven't been able to replicate this.
While using the MQTT client, every once in a while the server crashes with an error I have not been able to catch in JavaScript, but seems to be thrown in the C lib (
aws-crt
v1.15.5).I have not been able to replicate this on purpose, but it seemingly happens some hours after the server starts up.
The server is an EC2 instance running Amazon Linux 2.
I'm not sure if I'm doing something wrong here, or if this is an issue other have come across.
I've made a basic wrapper class for the clients (a stripped down version of the client in
aws-iot-device-sdk-js-v2
)Which is called in websocket-server.js
And this is what is written to the log file: