Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure IoT Hub SDK Connection Issue with Deno #1225

Closed
Skeletor11 opened this issue Nov 21, 2024 · 0 comments
Closed

Azure IoT Hub SDK Connection Issue with Deno #1225

Skeletor11 opened this issue Nov 21, 2024 · 0 comments
Labels

Comments

@Skeletor11
Copy link

Context

  • OS and version used: Windows 11
  • Node.js version: 22.11.0, Deno v2.0.6
  • npm version: 10.9.0
  • list of installed packages: N/A
    Version: Deno 2.0.6

I am trying to connect to the Azure IoT Hub SDK (https://www.npmjs.com/package/azure-iot-device-http) using Deno v2.0.6 and am receiving the error below. Sample code can be found here:

https://github.com/fathym-deno/community-development/blob/main/tests/iot/csvToIot.ts

The line in question is #28
const client: Client = clientFromConnectionString(deviceConnectionString);

When running in debug mode, the line never gets hit before throwing the error, leading me to believe that is has something to do with the module being pulled in on load. Full stack trace below:

Uncaught TypeError TypeError: Cannot convert undefined or null to object
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typed-array-byte-offset\1.0.2\index.js:32:18)
at forEachArray (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\for-each\0.3.3\index.js:12:17)
at forEach (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\for-each\0.3.3\index.js:54:9)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typed-array-byte-offset\1.0.2\index.js:22:2)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typed-array-byte-offset\1.0.2\index.js:80:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\IsTypedArrayOutOfBounds.js:11:28)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\IsTypedArrayOutOfBounds.js:56:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\TypedArrayCreateFromConstructor.js:8:31)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\TypedArrayCreateFromConstructor.js:54:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\TypedArraySpeciesCreate.js:11:39)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\es-abstract\1.23.3\2024\TypedArraySpeciesCreate.js:39:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typedarray.prototype.slice\1.0.3\implementation.js:16:31)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typedarray.prototype.slice\1.0.3\implementation.js:94:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typedarray.prototype.slice\1.0.3\index.js:6:22)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\typedarray.prototype.slice\1.0.3\index.js:20:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\traverse\0.6.10\index.js:4:15)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\traverse\0.6.10\index.js:393:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\twin.js:8:18)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\twin.js:207:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\internal_client.js:15:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\internal_client.js:396:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\device_client.js:10:27)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\dist\device_client.js:319:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\device.js:47:11)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device\1.18.3\device.js:64:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device-http\1.14.3\index.js:6:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device-http\1.14.3\index.js:23:4)
at Module._compile (<node_internals>/module:736:34)
at Module._extensions..js (<node_internals>/module:757:11)
at Module.load (<node_internals>/module:655:32)
at Module._load (<node_internals>/module:523:13)
at Module.require (<node_internals>/module:674:19)
at require (<node_internals>/module:801:16)
at (c:\Users\kevin\AppData\Local\deno\npm\registry.npmjs.org\azure-iot-device-http\1.14.3\index.js:3:13)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant