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

Error: obs-ndi: Operation not permitted @ apply2files - unable to update #182156

Closed
6 tasks done
srobadelic opened this issue Aug 11, 2024 · 1 comment
Closed
6 tasks done

Comments

@srobadelic
Copy link

Verification

Description of issue

During brew update and upgrade or with install --force, I am unable to upgrade obs-ndi. Followed all steps on the list above, looked elsewhere. I tried to create a flat file or symlink as a slug in case it just wanted a file to clean up with no luck.
@axiom ~ brew update;brew upgrade
==> Updating Homebrew...
Already up-to-date.
==> Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass --greedy to u
==> Upgrading 1 outdated package:
obs-ndi 4.13.1 -> 4.14.1
==> Upgrading obs-ndi
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/5f6c0a89a82484f8dd45cd2fe
Already downloaded: /Users//Library/Caches/Homebrew/downloads/410d87a7b5607fdcc54c18693591a2394fc482eea85785c1bac4d36059ba0e34--obs-ndi.rb
==> Downloading https://github.com/obs-ndi/obs-ndi/releases/download/4.14.1/obs-ndi-4.14.1-macos-u
Already downloaded: /Users//Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg
All dependencies satisfied.
Removing obs-ndi symlinks from in ~/Library/Application Support/obs-studio/plugins
==> Purging files for version 4.14.1 of Cask obs-ndi
Error: obs-ndi: Operation not permitted @ apply2files - /Users//Library/Application Support/obs-studio/plugins/obs-ndi.plugin
@axiom ~

This breaks all other pending upgrades from happening, so it basically makes homebrew useless for me. I would rather not backup and restore all of my formulae I have about 350 of them. Thanks.

Command that failed

brew install --no-quarantine --force --cask obs-ndi --verbose --debug

Output of command with --verbose --debug

<username>@axiom  ~  brew install --no-quarantine --force --cask obs-ndi --verbose --debug
==> Downloading https://formulae.brew.sh/api/cask.jws.json
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.3.14\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --remote-time --output /Users/<username>/Library/Caches/Homebrew/api/cask.jws.json --location --time-cond /Users/<username>/Library/Caches/Homebrew/api/cask.jws.json --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.14\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/cask.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
/usr/local/Homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading obs-ndi
==> Upgrading 1 outdated package:
/usr/local/Homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromPathLoader): loading /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb
obs-ndi 4.13.1 -> 4.14.1
==> Started upgrade process for Cask obs-ndi
==> Upgrading obs-ndi
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/5f6c0a89a82484f8dd45cd2fed8c9a218b2a1742/Casks/o/obs-ndi.rb
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.14\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://raw.githubusercontent.com/Homebrew/homebrew-cask/5f6c0a89a82484f8dd45cd2fed8c9a218b2a1742/Casks/o/obs-ndi.rb
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.14\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://raw.githubusercontent.com/Homebrew/homebrew-cask/5f6c0a89a82484f8dd45cd2fed8c9a218b2a1742/Casks/o/obs-ndi.rb
Already downloaded: /Users/<username>/Library/Caches/Homebrew/downloads/410d87a7b5607fdcc54c18693591a2394fc482eea85785c1bac4d36059ba0e34--obs-ndi.rb
==> Verifying checksum for '410d87a7b5607fdcc54c18693591a2394fc482eea85785c1bac4d36059ba0e34--obs-ndi.rb'
==> Downloading https://github.com/obs-ndi/obs-ndi/releases/download/4.14.1/obs-ndi-4.14.1-macos-universal.pkg
/usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.14\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://github.com/obs-ndi/obs-ndi/releases/download/4.14.1/obs-ndi-4.14.1-macos-universal.pkg
Already downloaded: /Users/<username>/Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg
==> Checking quarantine support
/usr/bin/env /usr/bin/xattr -h
/usr/bin/env /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -target x86_64-apple-macosx14 /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/<username>/Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg
/usr/bin/env /usr/bin/xattr -p com.apple.quarantine /Users/<username>/Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg
==> /Users/<username>/Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg is not quarantined
==> Verifying checksum for 'bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg'
/usr/local/Homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading libndi
/usr/bin/env hdiutil imageinfo -format /Users/<username>/Library/Caches/Homebrew/downloads/bd30e029a1893b7155a5a43e5c16e6d9d4007e45be5ce7552b5da5da5fea68ed--obs-ndi-4.14.1-macos-universal.pkg
All dependencies satisfied.
==> Uninstalling artifacts
==> 4 artifacts defined
#<Cask::ArtifactSet: {#<Cask::Artifact::PreflightBlock:0x000000012ddd5cb0 @cask=#<Cask obs-ndi /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb>, @dsl_args=[], @directives={:uninstall_preflight=>#<Proc:0x000000012ddd5d00 /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb:32>}>, #<Cask::Artifact::Uninstall:0x000000012ddd5968 @cask=#<Cask obs-ndi /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb>, @dsl_args=[{:pkgutil=>["'fr.palakis.obs-ndi'", "com.newtek.ndi.runtime", "fr.palakis.obs-ndi"]}], @directives={:pkgutil=>["'fr.palakis.obs-ndi'", "com.newtek.ndi.runtime", "fr.palakis.obs-ndi"], :signal=>[]}>, #<Cask::Artifact::Pkg:0x000000012d457e40 @cask=#<Cask obs-ndi /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb>, @dsl_args=["obs-ndi-4.13.1-macos-universal.pkg"], @path=#<Pathname:/usr/local/Caskroom/obs-ndi/4.13.1/obs-ndi-4.13.1-macos-universal.pkg>, @stanza_options={}>, #<Cask::Artifact::PostflightBlock:0x000000012ddd5df0 @cask=#<Cask obs-ndi /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb>, @dsl_args=[], @directives={:postflight=>#<Proc:0x000000012ddd5e40 /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb:22>}>}>
==> Uninstalling artifact of class Cask::Artifact::PreflightBlock
Removing obs-ndi symlinks from in ~/Library/Application Support/obs-studio/plugins
==> Purging files for version 4.14.1 of Cask obs-ndi
Error: obs-ndi: Operation not permitted @ apply2files - /Users/<username>/Library/Application Support/obs-studio/plugins/obs-ndi.plugin
/usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb:36:in `unlink'
/usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb:36:in `block (2 levels) in load'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in `instance_eval'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:47:in `abstract_phase'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/abstract_flight_block.rb:30:in `uninstall_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:489:in `block in uninstall_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/artifact_set.rb:10:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/artifact_set.rb:10:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:486:in `uninstall_artifacts'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:445:in `start_upgrade'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cask/upgrade.rb:197:in `upgrade_cask'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cask/upgrade.rb:115:in `block in upgrade_casks'
/usr/local/Homebrew/Library/Homebrew/cask/upgrade.rb:114:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/upgrade.rb:114:in `upgrade_casks'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:252:in `run'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `bind_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/call_validation.rb:270:in `validate_call'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11514/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
/usr/local/Homebrew/Library/Homebrew/brew.rb:96:in `<main>'
 <username>@axiom  ~

Output of brew doctor and brew config

<username>@axiom  ~  brew doctor
Your system is ready to brew.
 <username>@axiom  ~  brew config 
HOMEBREW_VERSION: 4.3.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: 39d51a45e89ddb4572494c845522509e3deeeb61
Last commit: 4 days ago
Core tap JSON: 11 Aug 14:56 UTC
Core cask tap JSON: 11 Aug 14:51 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.7PfzmFSyo4/org.xquartz:0
HOMEBREW_MAKE_JOBS: 16
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.4 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/bin/ruby
CPU: 16-core 64-bit kabylake
Clang: 15.0.0 build 1500
Git: 2.46.0 => /usr/local/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 14.6.1-x86_64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4

Output of brew tap

<username>@axiom  ~  brew tap
danielbayley/docket
homebrew/autoupdate
homebrew/bundle
homebrew/services
jeffreywildman/virt-manager
ubuntu/microk8s
@khipp
Copy link
Member

khipp commented Aug 15, 2024

@srobadelic It seems like the issue happened while removing the previous version 4.13.1. Try to remove the offending lines in /usr/local/Caskroom/obs-ndi/.metadata/4.13.1/20240301143045.548/Casks/obs-ndi.rb before running the upgrade. Delete the following block:

  uninstall_preflight do
    puts "Removing #{token} symlinks from in ~/Library/Application Support/obs-studio/plugins"
    target = Pathname.new("~/Library/Application Support/obs-studio/plugins").expand_path

    File.unlink("#{target}/obs-ndi.plugin", "#{target}/obs-ndi.plugin.dSYM")
  end

@khipp khipp closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants