Skip to content

TypeError: (destructured parameter) is undefined #22

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

Open
charwhee opened this issue Apr 14, 2025 · 1 comment
Open

TypeError: (destructured parameter) is undefined #22

charwhee opened this issue Apr 14, 2025 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@charwhee
Copy link

Trying to use on Firefox under Arch Linux with https://charachorder.io/ and am getting the above error. In troubleshooting here is what I got in the console:

The warning below that seems relevant is:
unreachable code after return statement

But I'm not sure, and I'm not sure if it's a problem with webserial or the website itself.

window.wsdebug = true
true
23:26:41.373 / NATIVE -- setNativeParams:
Object { state: "checking", platform: {…} }
webserial.background.js:1:20580
23:26:41.431 / NATIVE -> RX(obj): Waiting for incoming connections...
webserial.background.js:1:20580
23:26:41.431 / NATIVE -> RX(obj):
Object { id: "92a0310c-bb7b-4d5d-a38c-90d35530295f", data: {…} }
webserial.background.js:1:20580
23:26:41.433 / NATIVE -- onMessage: Connection successful: native v0.3.2 @ port 23290 webserial.background.js:1:20580
23:26:41.433 / NATIVE -- setNativeParams:
Object { state: "connected", version: "0.3.2", protocol: 2, wsPort: 23290, platform: {…} }
webserial.background.js:1:20580
23:26:41.433 / NATIVE <- TX(obj):
Object { action: "listPorts", id: "2c205d86-f516-4310-834f-0a8a6639ffb7" }
webserial.background.js:1:20580
23:26:41.453 / NATIVE -> RX(obj):
Object { id: "2c205d86-f516-4310-834f-0a8a6639ffb7", data: (33) […] }
webserial.background.js:1:20580
23:26:41.455 / NATIVE <- TX(obj):
Object { action: "authGrant", port: "/dev/ttyS15", id: "6c7fcaa3-7bd7-4dda-8496-4fd5c7144471" }
webserial.background.js:1:20580
23:26:41.456 / NATIVE -> RX(obj):
Object { id: "6c7fcaa3-7bd7-4dda-8496-4fd5c7144471", data: "26dbfcc9-0411-45e3-a000-fa86a2ea8b31" }
webserial.background.js:1:20580
23:26:41.457 / NATIVE <- TX(obj):
Object { action: "authGrant", port: "/dev/ttyACM0", id: "b97ba8f3-1371-49c7-84f6-71d5d172f279" }
webserial.background.js:1:20580
23:26:41.458 / NATIVE -> RX(obj):
Object { id: "b97ba8f3-1371-49c7-84f6-71d5d172f279", data: "f480be2e-5cb7-45fc-a663-851483384eb2" }
webserial.background.js:1:20580
unreachable code after return statement
webserial.ui.js:1:387554
23:26:42.140 / NATIVE <- TX(obj):
Object { action: "listPorts", id: "c9da9278-731b-433c-9f8b-f986cc1ba068" }
webserial.background.js:1:20580
23:26:42.150 / NATIVE -> RX(obj):
Object { id: "c9da9278-731b-433c-9f8b-f986cc1ba068", data: (33) […] }
webserial.background.js:1:20580
23:27:01.915 / NATIVE -> RX(obj): WS connection opened webserial.background.js:1:20580
23:27:01.925 / NATIVE -> RX(obj): WS thread running webserial.background.js:1:20580
23:27:01.936 / NATIVE -> RX(obj): WS connection closed webserial.background.js:1:20580
23:27:01.944 / NATIVE -> RX(obj): WS connection opened webserial.background.js:1:20580
23:43:45.763 / NATIVE -> RX(obj): WS connection closed

@kuba2k2
Copy link
Owner

kuba2k2 commented Apr 16, 2025

The page seems to call port.getInfo(), which might be an empty object. The page does not expect such a scenario.

It seems like port.getInfo() will only work on Windows OS.

@kuba2k2 kuba2k2 added bug Something isn't working good first issue Good for newcomers labels Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants