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

"Could not copy help collection to temporary file" on launch in 4.4.1 u2 beta 1 #188

Closed
apjanke opened this issue Feb 13, 2020 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apjanke
Copy link
Contributor

apjanke commented Feb 13, 2020

When opening Octave.app 4.4.1 u2 beta 1, I and Sebastian get an error message:

Could not copy help collection to temporary file. Search capabilities may be affected. Cannot unregister index tables in file /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app@4.4.1/4.4.1/share/octave/4.4.1/doc/octave-interpreter.qhc.

Screen Shot 2020-02-13 at 2 26 59 AM

@apjanke apjanke self-assigned this Feb 13, 2020
@apjanke apjanke added the bug Something isn't working label Feb 13, 2020
@apjanke apjanke added this to the 4.4.1-u2 milestone Feb 13, 2020
@apjanke
Copy link
Contributor Author

apjanke commented Feb 13, 2020

Looks like Qt's help system is trying to write files directly in the program installation location instead of in a system or user temporary directory. If I do this in /Applications/Octave-4.4.1.app:

$ find . -name '*.qhc' | xargs chmod u+w
$ find . -type d -exec chmod u+w "{}" \;

then the error dialog goes away. (Both are necessary; I tried each on their own and the error dialog persisted.)

TODO: Try this against Qt 5.12.7 and 5.14.
TODO: Report this upstream to Qt if it persists in either of those Qt versions.
TODO: If it persists, work around it by opening up write permissions in the app bundle.

@apjanke
Copy link
Contributor Author

apjanke commented Feb 13, 2020

Still happens with Qt 5.12.7.

@apjanke
Copy link
Contributor Author

apjanke commented Feb 13, 2020

Okay, I added this bullshit to octave_app_bundler:

  # Lock down the app M-files and brewed libs to prevent accidental user editing
  chmod -R a-w "$app_build_usr/Cellar"
  # But Qt needs to write to the .qhc files and local dirs when using the help
  # viewer (wtf, Qt?)
  find "$app_build_usr/Cellar/$octave_formula" -name '*.qhc' | xargs chmod u+w
  find "$app_build_usr/Cellar/$octave_formula" -type d -exec chmod u+w "{}" \;

That seemed to work; the error message is gone.

Gonna report this upstream to Qt. This ain't right.

@apjanke
Copy link
Contributor Author

apjanke commented Feb 13, 2020

Reported upstream to Qt: https://bugreports.qt.io/browse/QTBUG-82126

Closing this out, as the workaround seems to be working, and there's nothing else to do for now.

@apjanke apjanke closed this as completed Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant