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

fix: treat "ascii" buffer encoding as "utf-8" #7395

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Conversation

AlCalzone
Copy link
Member

Fixes the issue reported in zwave-js/zwave-js-ui#3994

@AlCalzone
Copy link
Member Author

@zwave-js-bot automerge

zwave-js-bot
zwave-js-bot previously approved these changes Nov 12, 2024
@zwave-js-bot zwave-js-bot enabled auto-merge (squash) November 12, 2024 19:08
@zwave-js-bot zwave-js-bot merged commit be5e7ed into master Nov 12, 2024
25 checks passed
@zwave-js-bot zwave-js-bot deleted the fix-ascii-encoding branch November 12, 2024 19:22
AlCalzone added a commit that referenced this pull request Nov 12, 2024
### Bugfixes
* Fixed an issue where encoding a buffer as an ASCII string would throw an error on Node.js builds without full ICU (#7395)
@donlewis48
Copy link

Ubuntu Linux - zwave-js-ui-linux 9.27.2 fails to start same as version 9.27.0.
Had to revert to 9.26.0
Any ideas?
syslog:
2024-11-13T20:46:34.203354-05:00 shuttle systemd[1]: zwave-js-ui.service: Failed with result 'exit-code'.
Thanks.

@AlCalzone
Copy link
Member Author

Please make a driver log, loglevel debug and attach it here as a file (drag & drop into the text field).

@donlewis48
Copy link

Hi,

Regarding 9.27.2.

Linux shuttle 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

My log levels are set as you have specified.

I have tried to start zwave-js-ui-linux multiple times. Unfortunately, the log never receives any new messages.

The program just exits.

The last message is shutting down the previous version.

From syslog:

2024-11-14T09:18:28.593191-05:00 shuttle systemd[1]: Started zwave-js-ui.service - Zwave-js-ui.
2024-11-14T09:18:29.377737-05:00 shuttle zwave-js-ui-linux[247776]: node:internal/modules/cjs/loader:1505
2024-11-14T09:18:29.377886-05:00 shuttle zwave-js-ui-linux[247776]: throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
2024-11-14T09:18:29.378127-05:00 shuttle zwave-js-ui-linux[247776]: ^
2024-11-14T09:18:29.378173-05:00 shuttle zwave-js-ui-linux[247776]: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
2024-11-14T09:18:29.378203-05:00 shuttle zwave-js-ui-linux[247776]: at new NodeError (node:internal/errors:405:5)
2024-11-14T09:18:29.378232-05:00 shuttle zwave-js-ui-linux[247776]: at createRequire (node:internal/modules/cjs/loader:1505:11)
2024-11-14T09:18:29.378260-05:00 shuttle zwave-js-ui-linux[247776]: at Object. (/snapshot/build/index.js:390116:53)
2024-11-14T09:18:29.378298-05:00 shuttle zwave-js-ui-linux[247776]: at Module._compile (pkg/prelude/bootstrap.js:1930:22)
2024-11-14T09:18:29.378331-05:00 shuttle zwave-js-ui-linux[247776]: at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
2024-11-14T09:18:29.378363-05:00 shuttle zwave-js-ui-linux[247776]: at Module.load (node:internal/modules/cjs/loader:1203:32)
2024-11-14T09:18:29.378390-05:00 shuttle zwave-js-ui-linux[247776]: at Module._load (node:internal/modules/cjs/loader:1019:12)
2024-11-14T09:18:29.378417-05:00 shuttle zwave-js-ui-linux[247776]: at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
2024-11-14T09:18:29.378444-05:00 shuttle zwave-js-ui-linux[247776]: at node:internal/main/run_main_module:28:49 {
2024-11-14T09:18:29.378471-05:00 shuttle zwave-js-ui-linux[247776]: code: 'ERR_INVALID_ARG_VALUE'
2024-11-14T09:18:29.378499-05:00 shuttle zwave-js-ui-linux[247776]: }
2024-11-14T09:18:29.378527-05:00 shuttle zwave-js-ui-linux[247776]: Node.js v18.20.4
2024-11-14T09:18:29.400023-05:00 shuttle systemd[1]: zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
2024-11-14T09:18:29.400150-05:00 shuttle systemd[1]: zwave-js-ui.service: Failed with result 'exit-code'.
2024-11-14T09:18:29.703435-05:00 shuttle systemd[1]: zwave-js-ui.service: Scheduled restart job, restart counter is at 1.
2024-11-14T09:18:29.713985-05:00 shuttle systemd[1]: Started zwave-js-ui.service - Zwave-js-ui.
2024-11-14T09:18:30.508783-05:00 shuttle zwave-js-ui-linux[247784]: node:internal/modules/cjs/loader:1505
2024-11-14T09:18:30.508901-05:00 shuttle zwave-js-ui-linux[247784]: throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
2024-11-14T09:18:30.508955-05:00 shuttle zwave-js-ui-linux[247784]: ^
2024-11-14T09:18:30.508991-05:00 shuttle zwave-js-ui-linux[247784]: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
2024-11-14T09:18:30.509022-05:00 shuttle zwave-js-ui-linux[247784]: at new NodeError (node:internal/errors:405:5)
2024-11-14T09:18:30.509196-05:00 shuttle zwave-js-ui-linux[247784]: at createRequire (node:internal/modules/cjs/loader:1505:11)
2024-11-14T09:18:30.509244-05:00 shuttle zwave-js-ui-linux[247784]: at Object. (/snapshot/build/index.js:390116:53)
2024-11-14T09:18:30.509272-05:00 shuttle zwave-js-ui-linux[247784]: at Module._compile (pkg/prelude/bootstrap.js:1930:22)
2024-11-14T09:18:30.509299-05:00 shuttle zwave-js-ui-linux[247784]: at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
2024-11-14T09:18:30.509331-05:00 shuttle zwave-js-ui-linux[247784]: at Module.load (node:internal/modules/cjs/loader:1203:32)
2024-11-14T09:18:30.509358-05:00 shuttle zwave-js-ui-linux[247784]: at Module._load (node:internal/modules/cjs/loader:1019:12)
2024-11-14T09:18:30.509385-05:00 shuttle zwave-js-ui-linux[247784]: at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
2024-11-14T09:18:30.509413-05:00 shuttle zwave-js-ui-linux[247784]: at node:internal/main/run_main_module:28:49 {
2024-11-14T09:18:30.509440-05:00 shuttle zwave-js-ui-linux[247784]: code: 'ERR_INVALID_ARG_VALUE'
2024-11-14T09:18:30.509468-05:00 shuttle zwave-js-ui-linux[247784]: }
2024-11-14T09:18:30.509496-05:00 shuttle zwave-js-ui-linux[247784]: Node.js v18.20.4
2024-11-14T09:18:30.531143-05:00 shuttle systemd[1]: zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
2024-11-14T09:18:30.531504-05:00 shuttle systemd[1]: zwave-js-ui.service: Failed with result 'exit-code'.
2024-11-14T09:18:30.702965-05:00 shuttle systemd[1]: zwave-js-ui.service: Scheduled restart job, restart counter is at 2.
2024-11-14T09:18:30.716452-05:00 shuttle systemd[1]: Started zwave-js-ui.service - Zwave-js-ui.
2024-11-14T09:18:31.520325-05:00 shuttle zwave-js-ui-linux[247791]: node:internal/modules/cjs/loader:1505
2024-11-14T09:18:31.520428-05:00 shuttle zwave-js-ui-linux[247791]: throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
2024-11-14T09:18:31.520461-05:00 shuttle zwave-js-ui-linux[247791]: ^
2024-11-14T09:18:31.520490-05:00 shuttle zwave-js-ui-linux[247791]: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
2024-11-14T09:18:31.520519-05:00 shuttle zwave-js-ui-linux[247791]: at new NodeError (node:internal/errors:405:5)
2024-11-14T09:18:31.520546-05:00 shuttle zwave-js-ui-linux[247791]: at createRequire (node:internal/modules/cjs/loader:1505:11)
2024-11-14T09:18:31.520574-05:00 shuttle zwave-js-ui-linux[247791]: at Object. (/snapshot/build/index.js:390116:53)
2024-11-14T09:18:31.520602-05:00 shuttle zwave-js-ui-linux[247791]: at Module._compile (pkg/prelude/bootstrap.js:1930:22)
2024-11-14T09:18:31.520630-05:00 shuttle zwave-js-ui-linux[247791]: at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
2024-11-14T09:18:31.520657-05:00 shuttle zwave-js-ui-linux[247791]: at Module.load (node:internal/modules/cjs/loader:1203:32)
2024-11-14T09:18:31.520684-05:00 shuttle zwave-js-ui-linux[247791]: at Module._load (node:internal/modules/cjs/loader:1019:12)
2024-11-14T09:18:31.520712-05:00 shuttle zwave-js-ui-linux[247791]: at Function.runMain (pkg/prelude/bootstrap.js:1983:12)
2024-11-14T09:18:31.520739-05:00 shuttle zwave-js-ui-linux[247791]: at node:internal/main/run_main_module:28:49 {
2024-11-14T09:18:31.520766-05:00 shuttle zwave-js-ui-linux[247791]: code: 'ERR_INVALID_ARG_VALUE'
2024-11-14T09:18:31.520794-05:00 shuttle zwave-js-ui-linux[247791]: }
2024-11-14T09:18:31.520821-05:00 shuttle zwave-js-ui-linux[247791]: Node.js v18.20.4
2024-11-14T09:18:31.543014-05:00 shuttle systemd[1]: zwave-js-ui.service: Main process exited, code=exited, status=1/FAILURE
2024-11-14T09:18:31.543132-05:00 shuttle systemd[1]: zwave-js-ui.service: Failed with result 'exit-code'.
2024-11-14T09:18:31.702750-05:00 shuttle systemd[1]: zwave-js-ui.service: Scheduled restart job, restart counter is at 3.
2024-11-14T09:18:31.713054-05:00 shuttle systemd[1]: Started zwave-js-ui.service - Zwave-js-ui.
2024-11-14T09:18:32.508236-05:00 shuttle zwave-js-ui-linux[247798]: node:internal/modules/cjs/loader:1505
2024-11-14T09:18:32.508328-05:00 shuttle zwave-js-ui-linux[247798]: throw new ERR_INVALID_ARG_VALUE('filename', filename, createRequireError);
2024-11-14T09:18:32.508547-05:00 shuttle zwave-js-ui-linux[247798]: ^
2024-11-14T09:18:32.508645-05:00 shuttle zwave-js-ui-linux[247798]: TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
.....

This just repeats several times.

Don

@AlCalzone
Copy link
Member Author

Are you sure that's actually 9.27.2?
I could not reproduce that issue after my attempted fix in 9.27.1.

@donlewis48
Copy link

Hi,

Yes. Have not been able to utilize 9.27.0 or 9.27.2 (did not try 9.27.1)

ls -l results:
-rwxr-xr-x 1 root root 102604715 Nov 12 14:06 zwave-js-ui-linux

Screenshot 2024-11-14 at 1 21 54 PM

Have never had an issue with any earlier releases.

Not sure what else I can tell you.

Don

@donlewis48
Copy link

Al,

I have gotten to the bottom of MY problem.

My desktop system is an Apple MacBook Pro (Apple Silicon).

I always download the zip files to this Mac system, unzip them on the Mac, and then scp the executable file to my multiple Linux servers (ubuntu). I don't send the Store folder, only the executable.

After our last conversation above, I decided to scp the zwave-ui-v9.27.2-linux.zip file to my test Ubuntu server. Once there, I used Linux unzip to get the executable file.

I am now running 9.27.2 on my test system without error.

Can not explain why that procedure worked? Not sure what could be wrong with unzipping a file on the Mac. Have always done it there and then scp the files to my production systems (I have 3).

I will let you know if I encounter any problems with my Home Automation production systems and the 9.27.2 version..

Sorry for the fire drill.

Thank you for your quick responses to this matter.

Don

@donlewis48
Copy link

Al,

I have updated my production severs to zwave-js-ui-linux 9.27.2.

All are working properly.

Have not figured out what caused the issue to start with. Files seem to compare properly!

Don

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

Successfully merging this pull request may close these issues.

3 participants