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

"Sort lines" fails with error #301

Open
randoogle opened this issue Aug 18, 2021 · 6 comments
Open

"Sort lines" fails with error #301

randoogle opened this issue Aug 18, 2021 · 6 comments

Comments

@randoogle
Copy link

I don't know how much the scripts are part of this project, but when I try to use "Sort lines" I get this error:

ERROR: EXCEPTION: RangeError: Internal error. Icu error. (14:26 - 14:27)

My journal logs say the following:

fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z INFO boop_gtk::ui::app] executing Sort lines
fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z INFO boop_gtk::script] request received, full_text: 10 bytes, selection: 10 bytes
fyi.zoey.Boop-GTK.desktop[53859]: [2021-08-18T19:23:15Z ERROR boop_gtk::ui::app] Exception: Execute(JSException { exception_str: "RangeError: Internal error. Icu error.", resource_name: Some("undefined"), source_line: Some(" .sort((a, b) => a.localeCompare(b))"), line_number: Some(14), columns: Some((26, 27)) })

I'm using the flatkpak on Fedora Silverblue 34

@zoeyfyi
Copy link
Owner

zoeyfyi commented Aug 18, 2021

Thanks for the report! I can replicate this, I will take a closer look when I have more time :)

@randoogle
Copy link
Author

Oh, I should also have mentioned that "Natural Sort lines" also returns this error.

@Arcitec
Copy link

Arcitec commented Jan 10, 2022

I can confirm, came here after seeing this error. Also starred the project because it's amazingly good. Thanks @zoeyfyi :D

@azzamsa
Copy link

azzamsa commented Mar 24, 2023

Have the same issue #397?
Any workaround for now? Currently, I just use my JavaScript directly from terminal with node.

@randoogle
Copy link
Author

I'm thinking that the internal node.js that Boop-GTK relies on doesn't include full-icu
See nodejs/node#12529

Since I'm in the US and mostly deal with English text, my current workaround is to copy the original Sort.js into my scripts folder and change the line that is using localCompare to this instead:
.sort((a, b) => a > b)
Well, I guess the other workaround is to use another app that can sort lines. I personally enjoy the way this app works, and I hope the original developer(s) hasn't given up on it 🤞. I definitely enjoy the interoperability of being able to share a boop script with a co-worker who is on a Mac or Windows, and generally have it work the same in their version of Boop.

@azzamsa
Copy link

azzamsa commented Sep 22, 2023

Have the same issue #397? Any workaround for now? Currently, I just use my JavaScript directly from terminal with node.

I have fully migrated to https://github.com/liferooter/textpieces

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

4 participants