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

Send D2C Message Errors #577

Open
dansiviter opened this issue Nov 20, 2024 · 1 comment
Open

Send D2C Message Errors #577

dansiviter opened this issue Nov 20, 2024 · 1 comment

Comments

@dansiviter
Copy link

Version: 2.17.1
VSCode Version: 1.95.3

Description:
Using 'Send D2C Messages' screen to a device. When click send everything in the 'Send D2C Message' is non-functional. Clicking 'Cancel' does nothing'

Image

Extension Host Stacktrace:

2024-11-20 11:29:21.900 [error] TypeError: Cannot read properties of undefined (reading 'length')
	at Simulator.<anonymous> (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4598380)
	at Generator.next (<anonymous>)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4595735
	at new Promise (<anonymous>)
	at __awaiter (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4595283)
	at Simulator.telemetry (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4597851)
	at LocalServer.<anonymous> (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4609898)
	at Generator.next (<anonymous>)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4606335
	at new Promise (<anonymous>)
	at __awaiter (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4605883)
	at LocalServer.telemetry (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4609783)
	at LocalServer.<anonymous> (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4608558)
	at Generator.next (<anonymous>)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4606335
	at new Promise (<anonymous>)
	at __awaiter (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4605883)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4608498
	at Layer.handle [as handle_request] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3062871)
	at next (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3064753)
	at Route.dispatch (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3064782)
	at Layer.handle [as handle_request] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3062871)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3058432
	at Function.process_params (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059888)
	at next (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3058331)
	at Function.handle (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059736)
	at router (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3055032)
	at Layer.handle [as handle_request] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3062871)
	at trim_prefix (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059122)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059151
	at Function.process_params (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059888)
	at next (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3058331)
	at urlencodedParser (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2833396)
	at Layer.handle [as handle_request] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3062871)
	at trim_prefix (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059122)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059151
	at Function.process_params (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3059888)
	at next (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3058331)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2826067
	at AsyncResource.runInAsyncScope (node:async_hooks:206:9)
	at invokeCallback (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4035139)
	at done (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4035168)
	at IncomingMessage.onEnd (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4035796)
	at IncomingMessage.emit (node:events:519:28)
	at endReadableNT (node:internal/streams/readable:1696:12)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
2024-11-20 11:29:21.915 [error] ReferenceError: Invalid transport configuration
        at MqttBase.connect (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2535580)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2407579
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2421764
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2494747
	at getAgentPlatformString (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2393001)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2494728
	at noErrorCallbackToPromise (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2383115)
	at getUserAgentString (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2494669)
	at Mqtt._ensureAgentString (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2421715)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2407486
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2495304
	at callbackToPromise (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2382006)
	at X509AuthenticationProvider.getDeviceCredentials (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2495290)
	at constructor._onEnter (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2407339)
	at constructor.transition (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3783954)
	at _.each.Fsm.<computed> [as transition] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3779292)
	at constructor.connect (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2405692)
	at constructor.handle (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3782662)
	at _.each.Fsm.<computed> [as handle] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3779292)
	at constructor.sendEvent (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2405789)
	at constructor.handle (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3782662)
	at _.each.Fsm.<computed> [as handle] (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:3779292)
	at Mqtt.sendEvent (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2411713)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2466663
	at retryOperation (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2387473)
	at RetryOperation.retry (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2388511)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2466627
	at callbackToPromise (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2382006)
	at Client.sendEvent (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:2466518)
	at Simulator.<anonymous> (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4603099)
	at Generator.next (<anonymous>)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4595735
	at new Promise (<anonymous>)
	at __awaiter (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4595283)
	at Simulator.sendD2CMessageCore (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4602807)
	at c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4604453
	at Array.map (<anonymous>)
	at Simulator.<anonymous> (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4604359)
	at Generator.next (<anonymous>)
	at fulfilled (c:\Users\foo\.vscode\extensions\vsciot-vscode.azure-iot-toolkit-2.17.1\dist\extension.js:2:4595374)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Send D2C Messages Ouput:

[11:29:20 AM] Start sending messages from 1 device(s) to IoT Hub.
[11:29:29 AM] All device(s) finished sending in 9.095 second(s).
[11:35:45 AM] 0 succeeded, and 0 failed.

Copied from microsoft/vscode-azure-iot-tools#61

@dansiviter
Copy link
Author

From a quick look at src/simulator.ts I suspect this is because it was a x509 auth rather than SAS and the code can't handle that.

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

No branches or pull requests

1 participant