Closed AiHaibara closed 1 year ago
@AliHaibara Sorry to say the that SDK is not compatible with Electron. Possibility that is could happen in the next 12 months, but no commitment.
@AliHaibara Sorry to say the that SDK is not compatible with Electron. Possibility that is could happen in the next 12 months, but no commitment. azure-iot-device-amqp 1.14.1 is running ok after build.
@AiHaibara To clarify, are you saying that you managed to get the SDK working with Electron when using a transport from azure-iot-device-amqp
? If so, that is great. However, we don't officially support Electron so we can't provide support on our end for that scenario.
@AiHaibara To clarify, are you saying that you managed to get the SDK working with Electron when using a transport from
azure-iot-device-amqp
? If so, that is great. However, we don't officially support Electron so we can't provide support on our end for that scenario.
yes, and we will consider to use amqp first, thanks.
Glad you have it working. I'm going to go ahead and close this issue since we don't support this scenario. Feel free to leave additional comments/questions to this issue as needed.
Context
Description of the issue
pnpm build electron for iotdevice, then running and get error TypeError: WS.createWebSocketStream
Code sample exhibiting the issue
Console log of the issue
TypeError: WS.createWebSocketStream is not a function\n at Object.streamBuilder (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/mqtt/lib/connect/ws.js:119:30)\n at MqttClient.wrapper [as streamBuilder] (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/mqtt/lib/connect/index.js:155:36)\n at MqttClient._setupStream (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:415:22)\n at new MqttClient (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/mqtt/lib/client.js:395:8)\n at Object.connect (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/mqtt/lib/connect/index.js:157:18)\n at MqttBase._connectClient (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/azure-iot-mqtt-base/dist/mqtt_base.js:393:46)\n at constructor._onEnter (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/azure-iot-mqtt-base/dist/mqtt_base.js:171:30)\n at constructor.transition (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/machina/lib/machina.js:653:28)\n at constructor.transition (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/machina/lib/machina.js:466:63)\n at constructor.connect (/Applications/xxx.app/Contents/Resources/app.asar/node_modules/azure-iot-mqtt-base/dist/mqtt_base.js:155:54)