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: Add missing icu-data-full for TextDecoder support in NodeJS #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SISheogorath
Copy link

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

This adds icu-data-full since some image uploads fail with an decoding error due to a broken call to the TextDecoder in NodeJS that expects legacy charset converters to be in place. in particular it wants to use windows-1252 as seen in the upstream GitHub issue.

The upstream images are not affected, since they use static builds of NodeJS.

Benefits of this PR and context:

It fixes a bug, that was reported upstream, due do the way this image is build. It doesn't appear in upstream builds. We hope this reduces the number of bug reports for this issue.

How Has This Been Tested?

I build both versions of the image, with and without the issue. The issue was reproducible by copying multiple cells from LibreOffice Calc into HedgeDoc, resulting in an image upload.

When the package wasn't installed, it would fail due to the unsupported windows-1252 encoding.

After installing the package, it works as expected.

Source / References:

hedgedoc/hedgedoc#5982
https://matrix.to/#/!oaRMJImPLfUnnXzwnN:shivering-isles.com/$bM9FdN50dj7YHXNJYhApnPYNyta7rxoKQeeqJLCQgmI?via=matrix.org&via=envs.net&via=mozilla.org

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/hedgedoc/1.10.2-pkg-a9b91f74-dev-b480f745ff1da19bb5b4054e0a707aa7b897de27-pr-45/index.html
https://ci-tests.linuxserver.io/lspipepr/hedgedoc/1.10.2-pkg-a9b91f74-dev-b480f745ff1da19bb5b4054e0a707aa7b897de27-pr-45/shellcheck-result.xml

Tag Passed
amd64-1.10.2-pkg-a9b91f74-dev-b480f745ff1da19bb5b4054e0a707aa7b897de27-pr-45
arm64v8-1.10.2-pkg-a9b91f74-dev-b480f745ff1da19bb5b4054e0a707aa7b897de27-pr-45

Copy link

@SIMULATAN SIMULATAN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm adding the package fixes asset uploading.
For the time being, using sh -c as the entrypoint and apk add icu-data-full && /init as the command functions as a workaround. In Kubernetes, command and args respectively work analogous.

@aptalca
Copy link
Member

aptalca commented Mar 4, 2025

Better workaround: https://github.com/linuxserver/docker-mods/tree/universal-package-install

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

Successfully merging this pull request may close these issues.

4 participants