-
Notifications
You must be signed in to change notification settings - Fork 182
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
HWP conversion fails on MacOS M1 #498
Comments
Maybe we should add to this release a note in the changelog that this is not yet support on arm macs. And this is yet another case where the error message is confusing because it looks like |
I will take a look at this issue. I can borrow the m1 macbook for testing soon. |
One assumption is that H2Orestart, the plugin we rely on for HWP conversions, somehow fails on ARM platforms. This is further reinforced by the fact that of the 3 HWP-related test files that we have under
only two of those fail ( There's one issue with this assumption though: H2Orestart is a Java plugin, meaning that it should work across architectures, bar some exceptions. These exceptions usually boil down to usage of JNI (see this SO answer), but that's something we can detect. If we do @OctopusET thanks a lot for taking a look at it. Tagging @ebandal as well, in case they are interested in this issue as well. |
Following some feedback, we have two options here: I'd rather go for option b) if c) is not possible. It should be relatively trivial to implement. |
I can use the M1 macbook after August 8 for dangerzone development. Before that I can only try some conversion in M1 macbook with h2orestart. |
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
The HWP / HWPX conversion feature does not work on the following platforms: * MacOS with Apple Silicon CPU * Native Qubes OS For this reason, we need to: 1. Disable it on the GUI side, by not allowing the user to select these files. 2. Throw an error on the isolation provider side, in case the user directly attempts to convert the file (either through CLI or via "Open With"). Refs #494 Refs #498
I just started work on M1 macbook yesterday. Question: I just drop the commit that is "HWP/HWPX disable on MacOS Apple Silicon", is there any way to re-enable the HWP/HWPX conversion feature on MacOS Appli Silicon? |
And with Dangerzone GUI, there's an issue with selecting the HWP/HWPX files. You can't select it. So, I tried with only CLI. |
Thanks for looking into this. We can do this but only for the next release since we just shipped this one. However, @apyrgio did experience this issue, so it may still happen particular files.
We decided to remove the ability to add these files in platforms where they were considered not compatible. Not a perfect solution, but it leads to avoiding getting errors later. |
@deeplow, Ah, I mean, is there any way to re-enable that feature other than dropping commits. |
I think it's no big deal. We can always do another commit that does the reverse. |
With my short analyses, it fails when it's checking converted file is exist or not. I think it's not H2ORestart's issue. I tested with several files including the our test files. |
I can't use my borrowed M1 Macbook everyday. It might take while for actual testing. |
It's strange because the conversion worked for me, but the issue said it didn't even work. So I restart my Macbook. I tried the HWP->PDF, HWPX->PDF conversion on cold booted macbook. And if you kill libreoffice, like with |
If you try with
|
@ebandal did a nice dig and probed the Alpine Linux devs: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15212. Turns out that the LibreOffice package for aarch64 does not support Java. Hopefully this will be resolved upstream. Once it does, we should remove our GUI restrictions for this platform. |
https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded They enabled the java support for the aarch64 |
I think rebuilding image would fix it. I will test it soon. |
Nice, thanks for staying on top of this. I'll take a look at your PR and associated issue and we'll fix this. |
The Alpine Linux team has enabled Java support for LibreOffice on ARM architecture: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded This commit is included in 7.5.5.2-r2, so the installed LibreOffice package should be 7.5.5.2-r2 or higher to fix this issue. However 3.18 doesn't have the 7.5.5.2-r2 package: https://pkgs.alpinelinux.org/package/v3.18/community/aarch64/libreoffice The Dangerzone image uses the alpine:latest image which is 3.18 as of writing this. For this reason, we switch to the edge repo of Alpine Linux, which includes this fix. Refs #498 Refs #540 Refs #542
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1. It does not fix conversion on Qubes OS (#494) Previously, HWP / HWPX conversion didn't work on MacOS M1 systems (#498) because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64). Gratefully, the Alpine team has enabled Java support on the aarch64 system [1], so we can enable it again for ARM architectures. Fixes #498 [1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
@OctopusET: Quick update now that we are about to cut the 0.5.0 release. We wanted to switch back to Ultimately, we decided that we don't want to risk any last minute breaking changes from the edge repo. This means that we will revert your fixes for now, and wait until November, for the new release of Alpine Linux, to properly include them. It's a bit of a tough decision, but we believe it's best to prioritize the stability of the software over new features. Thank you for your persistence on this feature, and rest assured that the next release will include it 🙂. |
I agree with you about stability concerns. Thank you for letting me know about this |
This reverts commit acd615e. The rationale is that we want to wait until the LibreOffice package that allows HWP conversion in Alpine Linux lands in `alpine:latest`. For more info, read #498 (comment)
This reverts commit 214ce97. The rationale is that we want to wait until the LibreOffice package that allows HWP conversion in Alpine Linux lands in `alpine:latest`. For more info, read #498 (comment)
This reverts commit acd615e. The rationale is that we want to wait until the LibreOffice package that allows HWP conversion in Alpine Linux lands in `alpine:latest`. For more info, read #498 (comment)
This reverts commit 214ce97. The rationale is that we want to wait until the LibreOffice package that allows HWP conversion in Alpine Linux lands in `alpine:latest`. For more info, read #498 (comment)
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1. It does not fix conversion on Qubes OS. freedomofpress#494 Previously, HWP / HWPX conversion didn't work on MacOS (Apple silicon CPU). freedomofpress#498 because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64). Gratefully, the Alpine team has enabled Java support on the aarch64 system [1], so we can enable it again for ARM architectures. And this patch is included in Alpine 3.19 This commit was included in freedomofpress#541 and reverted on freedomofpress#562 due to a stability issue. Fixes freedomofpress#498 [1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
Thank you very much pinging us about this and submitting a PR. We are just about to push out a security release, which should indeed include alpine 3.19. However, since it's a security-focused release and we had already hit feature-freeze, we will have to include your PR in the next one. |
This PR reverts the patch that disables HWP / HWPX conversion on MacOS M1. It does not fix conversion on Qubes OS (freedomofpress#494). Previously, HWP / HWPX conversion didn't work on MacOS (Apple silicon CPU) (freedomofpress#498) because libreoffice wasn't built with Java support on Alpine Linux for ARM (aarch64). Gratefully, the Alpine team has enabled Java support on the aarch64 system [1], so we can enable it again for ARM architectures. And this patch is included in Alpine 3.19 This commit was included in freedomofpress#541 and reverted on freedomofpress#562 due to a stability issue. Fixes freedomofpress#498 [1]: https://gitlab.alpinelinux.org/alpine/aports/-/commit/74d443f479df15fc57e6fde6ac02a36b24afdded
HWP conversion was recently added in #460 and was tested across various platforms (Windows, MacOS, Linux) through our CI. However, when running our tests on a MacOS M1 platform (which is not available through any of our CI runners), we get the following error:
(taken from the
dangerzone-cli
)If one tries to convert the file to PDF via Libreoffice:
they will get the following generic error:
Note that the exact same operation in an Intel MacOS device works.
The text was updated successfully, but these errors were encountered: