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

AppLovinMediationByteDanceAdapter produce "Permission denied error" during cocoapods step #291

Closed
Viabo opened this issue Jan 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Viabo
Copy link

Viabo commented Jan 29, 2024

MAX SDK Version

Unity 5.11.5

Device/Platform Info

iOS

Current Behavior

Configuration

  • OS: Mac OS Ventura 13.6.3
  • Hardware: Apple M2 Pro
  • XCode: 15.2
  • Cocoapods: 1.15.0
  • Ruby: 3.3.0

Cocoapods configuration:

source 'https://cdn.cocoapods.org/'
source 'https://github.com/CocoaPods/Specs'

platform :ios, '13.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.4'
  pod 'AppLovinMediationBidMachineAdapter', '2.4.0.1.0'
  pod 'AppLovinMediationByteDanceAdapter', '5.7.0.7.0'
  pod 'AppLovinMediationChartboostAdapter', '9.6.0.0'
  pod 'AppLovinMediationFacebookAdapter', '6.14.0.1'
  pod 'AppLovinMediationFyberAdapter', '8.2.5.0'
  pod 'AppLovinMediationGoogleAdapter', '10.14.0.1'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '10.14.0.0'
  pod 'AppLovinMediationHyprMXAdapter', '6.3.0.0'
  pod 'AppLovinMediationInMobiAdapter', '10.6.0.0'
  pod 'AppLovinMediationIronSourceAdapter', '7.6.0.0.0'
  pod 'AppLovinMediationMintegralAdapter', '7.5.3.0.0'
  pod 'AppLovinMediationMobileFuseAdapter', '1.6.5.0'
  pod 'AppLovinMediationUnityAdsAdapter', '4.9.2.1'
  pod 'AppLovinMediationVerveAdapter', '2.20.0.0'
  pod 'AppLovinMediationVungleAdapter', '7.2.0.0'
  pod 'AppLovinSDK', '11.11.4'
  pod 'AppsFlyerFramework', '6.5.4'
  pod 'FBSDKCoreKit', '~> 11.1.0'
  pod 'FBSDKCoreKit_Basics', '~> 11.1.0'
  pod 'FBSDKGamingServicesKit', '~> 11.1.0'
  pod 'FBSDKLoginKit', '~> 11.1.0'
  pod 'FBSDKShareKit', '~> 11.1.0'
  pod 'Firebase/Analytics', '10.11.0'
  pod 'Firebase/Core', '10.11.0'
  pod 'Firebase/Crashlytics', '10.11.0'
  pod 'Firebase/Messaging', '10.11.0'
  pod 'Firebase/RemoteConfig', '10.11.0'
  pod 'Google-Mobile-Ads-SDK', '~> 10.9'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static
use_frameworks!

Description

After running command pod install for the xcode project we receive the next log error:

[!] Error installing BURelyFoundation_Global

### Error

Errno::EACCES - Permission denied @ rb_sysopen - /Users/****/Library/Caches/CocoaPods/Pods/Release/BURelyFoundation_Global/0.1.0.16-4c9c9/Frameworks/SDK/BURelyFoundationGlobalFoundation/BURelyFoundationGlobalFoundation.xcframework/ios-arm64_armv7/Headers/NSArray+PAGUtilities.h
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2279:in `initialize'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2279:in `open'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2279:in `block in copy_file'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2278:in `open'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2278:in `copy_file'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2243:in `copy'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1048:in `block in copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2385:in `wrap_traverse'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:1045:in `copy_entry'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:990:in `block in cp_r'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2469:in `block in fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2478:in `block in fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `each'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2476:in `fu_each_src_dest0'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:2467:in `fu_each_src_dest'
/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/fileutils.rb:989:in `cp_r'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:343:in `block (2 levels) in copy_files'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `each'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:341:in `block in copy_files'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:128:in `lock'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:99:in `write_lock'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:332:in `copy_files'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:269:in `block (2 levels) in uncached_pod'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `each'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:265:in `block in uncached_pod'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:291:in `in_tmpdir'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:238:in `uncached_pod'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/downloader.rb:42:in `download'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_downloader.rb:69:in `download!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:117:in `download_source'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer/pod_source_installer.rb:67:in `install!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:621:in `install_source_of_pod'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:539:in `block (2 levels) in install_pod_sources'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:538:in `block in install_pod_sources'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `each'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:535:in `install_pod_sources'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:258:in `block in download_dependencies'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:257:in `download_dependencies'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/installer.rb:163:in `install!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.0/bin/pod:55:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.3.0/bin/pod:25:in `load'
/opt/homebrew/lib/ruby/gems/3.3.0/bin/pod:25:in `<main>'

After some investigation, we found out that this was caused by AppLovinMediationByteDanceAdapter, specifically by its dependency BURelyFoundation_Global.

What else we found?

  • This is not reproducible on Intel processors on Mac OS, only machines with M processors are affected
  • This is not caused by cocoapods type or version, tested on different versions of cocoapods with native support and under Rosseta

What else we did do to fix it?

  • Obvious move - we removed AppLovinMediationByteDanceAdapter from the build. Without ByteDance adapter everything works as expected, so this problem is directly linked to this adapter
  • Downgraded version of this adapter (to 3 different versions, even to 5.1.0.8.0), it doesn't help

Expected Behavior

Pod install command for resulted xcode project with AppLovinMediationByteDanceAdapter works as expected

How to Reproduce

Described in the expected behaviour section

Additional Info

No response

@Viabo Viabo added the bug Something isn't working label Jan 29, 2024
@thomasmso
Copy link
Member

AdColony is deprecated so you no longer need that adapter. The permission issue may be related to how you're running CocoaPods command, perhaps try sudo ...?

@Viabo
Copy link
Author

Viabo commented Jan 30, 2024

@thomasmso Cocoapods, by default, can't be run under sudo, this is a restriction of this tool, however there is a available arg --allow-root, but we can't use it because we are using https://github.com/googlesamples/unity-jar-resolver and we are unable to pass extra arguments to cocoapods. Thus, this is workaround for the issue, not a solution for it.

@maximilianbuck
Copy link
Contributor

@Viabo looks like this is a regression in cocoapods 1.15.0 based on the issue here: CocoaPods/CocoaPods#12225
Downgrading to 1.14.3 should work while they fix it.

@Viabo
Copy link
Author

Viabo commented Jan 30, 2024

@maximilianbuck Thank you for your help, it really worked and insane that this bug appeared again in the newer version of cocoa

@Viabo Viabo closed this as completed Jan 30, 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

3 participants