Bug 158038 - General input/output error when trying to open PDF in macOS appstore version
Summary: General input/output error when trying to open PDF in macOS appstore version
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.7.1 release
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.5.9
Keywords:
Depends on:
Blocks: Mac-AppStore, MacOS-Vanilla
  Show dependency treegraph
 
Reported: 2023-11-02 09:28 UTC by Christian Lohmaier
Modified: 2023-11-29 23:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lohmaier 2023-11-02 09:28:41 UTC
Trying to open a PDF file in LibreOffice obtained from the macOS appstore results in a General input/output error, no matter what method is used (File|Open or Insert Text from File, dragging from finder)

Cause: pdf import is realized using a helper utility (xpdfimport, from poppler) that resides alongside the soffice executable in the Contents/MacOS folder

Those additional utilities/helpers were signed with the same entitlements like the main program, and that's an error. Helper utilities must be signed with only the sandbox and inherit entitlements in order to run in the same sandbox context.

https://developer.apple.com/documentation/xcode/embedding-a-helper-tool-in-a-sandboxed-app
"Adding other entitlements to the tool can cause problems. If the tool immediately crashes with a code signing error when your app runs the tool, check that the tool is signed with just these two entitlements: com.apple.security.app-sandbox and com.apple.security.inherit."
Comment 1 Commit Notification 2023-11-02 09:34:23 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a2f298adf5b6aae54bd9c20a7fbfd007dd356617

tdf#158038 fix opening pdf files in appstore ver (sandbox issue w/ helper tool)

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2023-11-02 15:32:20 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/ef26985c45aa1ce9d205fbe5afba6717450b3961

tdf#158038 fix opening pdf files in appstore ver (sandbox issue w/ helper tool)

It will be available in 7.6.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2023-11-03 16:52:55 UTC
Christian Lohmaier committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/99ce6ffc2a9a672bc3df32419e5e6d7b09e5ea08

tdf#158038 fix opening pdf files in appstore ver (sandbox issue w/ helper tool)

It will be available in 7.5.9.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.