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

Can't access user dirs in some 8.4.0s, "operation not permitted" error, esp when switching between builds/installs #255

Open
4 tasks
apjanke opened this issue Feb 3, 2024 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apjanke
Copy link
Contributor

apjanke commented Feb 3, 2024

Description

In the 8.4.0 beta1 build on Apple Silicon, I can't access some directories under my $HOME dir. Probably recent macOS sandboxing or security stuff related to apps. Works fine in the regular Homebrew octave on this same machine.

Command window output at startup:

warning: load_path: /Users/janke/Documents/octave: Operation not permitted
warning: called from
    /Users/janke/.octaverc at line 15 column 3

warning: load_path: /Users/janke/Documents/octave: Operation not permitted
warning: called from
    /Users/janke/.octaverc at line 15 column 3

>> warning: load_path: /Users/janke/Documents/octave: Operation not permitted

>> pwd
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
ans = /Users/janke
>> addpath ~/Documents/Octave
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
warning: load_path: /Users/janke/Documents/Octave: Operation not permitted
warning: load_path: /Users/janke/Documents/Octave: Operation not permitted
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
>> cd ~/tmp
warning: load_path: /Users/janke/Documents/Octave: Operation not permitted
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
warning: load_path: /Users/janke/Documents/Octave: Operation not permitted
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
>> ls
warning: load_path: /Users/janke/Documents/Octave: Operation not permitted
warning: load_path: /Users/janke/Documents/octave: Operation not permitted
octave-840-regression   repro_hdiutil_error
>>

In a previous run, I also got errors for ~/tmp and ~/temp/octave-840-regression when trying to read them or add them to the path. But with this run it worked okay for those.

TODO

  • Build an Octave.app 8.3.0.
  • Install octapp 8.3.0 under brew.
  • Try on Intel too (like angharad).
  • Try on older macOS like 12 or 13, on AS and Intel.
@apjanke apjanke self-assigned this Feb 3, 2024
@apjanke apjanke added the bug Something isn't working label Feb 3, 2024
@apjanke apjanke added this to the 8.4.0 milestone Feb 3, 2024
@apjanke
Copy link
Contributor Author

apjanke commented Feb 10, 2024

Wow: today in Octave.app 8.4.0 alpha4 on eilonwy (M1, macOS 14.3.1), I got in to a situation where I couldn't even exit Octave for a bit. IIRC, this was after I had recently run the brewed octave --gui, did a ~/Documents/octave-stuff and got a prompt window to grant it permission, said yes, and after that had access to it.

warning: mkdir: directory exists
>> addpath ~/Documents/octave-stuff/repro-doctest/
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
>> cd ~/Documents/octave-stuff
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
warning: load_path: .: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
error: unable to find current directory
>> exit
warning: load_path: .: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
error: unable to find current directory
>> exit
warning: load_path: .: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
error: unable to find current directory
>> exit
warning: load_path: .: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
error: unable to find current directory
>> error: unable to find current directory
>> cd ~
warning: load_path: .: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
warning: load_path: /Users/janke/Documents/octave-stuff/repro-doctest: Operation not permitted
>>

Then:

  • Re-ran brewed octave, cd ~/Documents; cd octave-stuff; no errors or permission prompts.
  • Repeated that a few times, no errors or prompts.
  • Ran Octave.app 8.4.0; cd ~/Documents; got error: "warning: load_path: .: Operation not permitted"
  • Repeated that a few times, same errors each time.
  • Switched back and forth a couple times; same behavior: brewed octave never gets errors, Octave.app always does

I wonder if there's some collision with an app identifier somewhere because they're using the same name or app id, and now that app id is associated with the brewed octave installation, and the app isn't seen as "owning" or being that id or whatever.

  • Ran Octave.app 6.2.0, did cd ~/Documents. Got an access prompt (below). Did "Allow". It worked; got into the dir with no errors. Ran it again, no prompt or errors.
image
  • Ran Octave.app 8.4.0 alpha4; got errors again, no prompt.
  • Ran brewed octave 8.4; worked, no errors or prompt.

Installing a brewed octave-app 6.2 to see if I what happens with collisions there. Did brew install octave-octapp@6.2.0. Waiting for the build.

Rats, the octave-octapp@6.2.0 build failed.

libinterp/corefcn/amd.cc:152:3: error: use of undeclared identifier 'SuiteSparse_config'
  SUITESPARSE_ASSIGN_FPTR (malloc_func, amd_malloc, malloc);
  ^
./liboctave/util/oct-sparse.h:96:63: note: expanded from macro 'SUITESPARSE_ASSIGN_FPTR'
#    define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign)
                                                              ^
libinterp/corefcn/amd.cc:153:3: error: use of undeclared identifier 'SuiteSparse_config'
  SUITESPARSE_ASSIGN_FPTR (free_func, amd_free, free);
  ^

Grabbing Octapp 8.4.0 beta1 from the releases page and trying that for comparison. Should try an 8.3.0 too, to see if the version number in the app name or identifier or whatever makes a difference.

@apjanke apjanke changed the title Can't access user dirs in 8.4.0 Can't access user dirs in 8.4.0 sometimes, esp when switching between builds/installs Feb 10, 2024
@apjanke
Copy link
Contributor Author

apjanke commented Feb 10, 2024

Trying alternate versions, on eilonwy

  • Installed octapp 8.4.0 beta1 from DMG download.
  • Launched that first, and trying cd ~/Documents.
    • No prompt, got the "Operation not permitted" errors.
  • Installed octapp 8.4.0 via brew.
    • /opt/homebrew/Cellar/octave-octapp@8.4.0/8.4.0/bin/octave --gui
    • No prompt, no errors when cd-ing to under ~/Documents.
  • Installed octapp 8.3.0 via brew.
    • No prompt, no errors when cd-ing to under ~/Documents.

Let's try some other directories:

  • Octapp 8.4.0 alpha4 and beta1 apps, both
    • cd ~/Downloads, cd ~/Desktop, cd ~/Documents - no prompt, "operation not permitted" errors.
  • brewed octapp 8.3.0
    • no prompt or errors on any of those
  • brewed octave 8.4.0
    • no prompt or errors on any of those

@apjanke apjanke changed the title Can't access user dirs in 8.4.0 sometimes, esp when switching between builds/installs Can't access user dirs in some 8.4.0s, "operation not permitted" error, esp when switching between builds/installs Feb 10, 2024
@apjanke
Copy link
Contributor Author

apjanke commented May 6, 2024

Changing the milestone for this from 8.4.0 to The Future, since I don't think there's much I can do about it at the moment, and I don't want to block upcoming releases on it.

@apjanke apjanke modified the milestones: 8.4.0, The Future May 6, 2024
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
None yet
Development

No branches or pull requests

1 participant