-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Command
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/bin/pod install --project-directory=ios
Report
-
What did you do?
bundle install && bundle exec pod install --project-directory=ios -
What did you expect to happen?
success install pods -
What happened instead?
sometimes failed install pods. sometimes succeed.
Stack
CocoaPods : 1.16.2
Ruby : ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin24]
RubyGems : 3.7.2
Host : macOS 15.7.2 (24G325)
Xcode : 26.1 (17B55)
Git : git version 2.50.1 (Apple Git-155)
Ruby lib dir : /Users/y/.rbenv/versions/3.2.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Plugins
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
Podfile
# 禁用 React Native 新架构
ENV['RCT_NEW_ARCH_ENABLED'] = '0'
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'UrsalinkNFC' do
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
endError
ArgumentError - pathname contains null byte
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:452:in `initialize'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:452:in `realdirpath'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:452:in `group_for_path_in_group'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/project.rb:273:in `add_file_reference'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:228:in `block (2 levels) in add_file_accessors_paths_to_pods_group'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:227:in `map'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:227:in `block in add_file_accessors_paths_to_pods_group'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:217:in `each'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:217:in `flat_map'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:217:in `add_file_accessors_paths_to_pods_group'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:99:in `block in add_source_files_references'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:149:in `message'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:98:in `add_source_files_references'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:49:in `install!'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:102:in `block in install_file_references'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:149:in `message'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:100:in `install_file_references'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:17:in `generate!'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:320:in `block in create_and_save_projects'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:183:in `integrate'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:170:in `install!'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in `run'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/bin/pod:25:in `load'
/Users/y/git/app-monorepo/apps/mobile/vendor/bundle/ruby/3.2.0/bin/pod:25:in `<top (required)>'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:59:in `load'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:59:in `kernel_load'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:456:in `exec'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:538:in `dispatch'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:35:in `dispatch'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/cli.rb:29:in `start'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bundler-2.7.2/exe/bundle:28:in `block in <top (required)>'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/bundler/friendly_errors.rb:118:in `with_friendly_errors'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bundler-2.7.2/exe/bundle:20:in `<top (required)>'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems.rb:319:in `load'
/Users/y/.rbenv/versions/3.2.0/lib/ruby/site_ruby/3.2.0/rubygems.rb:319:in `activate_and_load_bin_path'
/Users/y/.rbenv/versions/3.2.0/bin/bundle:25:in `<main>'
I add some codes at ./vendor/bundle/ruby/3.2.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator
def add_file_accessors_paths_to_pods_group(file_accessor_key, group_key = nil, reflect_file_system_structure = false)
file_accessors.flat_map do |file_accessor|
paths = file_accessor.send(file_accessor_key)
paths = allowable_project_paths(paths)
next [] if paths.empty?
pod_name = file_accessor.spec.name
preserve_pod_file_structure_flag = (sandbox.local?(pod_name) || preserve_pod_file_structure) && reflect_file_system_structure
base_path = preserve_pod_file_structure_flag ? common_path(paths) : nil
actual_group_key = preserve_pod_file_structure_flag ? nil : group_key
group = pods_project.group_for_spec(pod_name, actual_group_key)
paths.map do |path|
begin
pods_project.add_file_reference(path, group, preserve_pod_file_structure_flag, base_path)
rescue => e
puts "❌ Pod '#{pod_name}' path: #{path.inspect}, base_path: #{base_path.inspect}, group: #{group.inspect}"
puts " Error: #{e.class}: #{e.message}"
raise e
end
pods_project.add_file_reference(path, group, preserve_pod_file_structure_flag, base_path)
end
end
endand sometimes it outputs like
❌ Pod 'React-utils' path: #<Pathname:/Users/y/git/app-monorepo/apps/mobile/node_modules/react-native/ReactCommon/react/utils/OnScopeExit.h>, base_path: #<Pathname:/Users/y/git/app-monorepo/apps/mobile/node_modules/react-native/ReactCommon/react/utils>, group: <PBXGroup name=`React-utils` path=`../../node_modules/react-native/ReactCommon/react/utils` UUID=`46EB2E00000590`>
Error: ArgumentError: pathname contains null byte
this is our Gemfile.lock which used by bundle command
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.8)
abbrev (0.1.2)
activesupport (7.0.8.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1182.0)
aws-sdk-core (3.237.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
bigdecimal
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.117.0)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.203.1)
aws-sdk-core (~> 3, >= 3.234.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.3.0)
bigdecimal (3.3.1)
claide (1.1.0)
cocoapods (1.16.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.16.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.27.0, < 2.0)
cocoapods-core (1.16.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.3.3)
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.8)
faraday (>= 0.8.0)
http-cookie (>= 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.1)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.1)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.228.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
ffi (1.17.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.8.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.5.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.9.0)
mutex_m
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.16.0)
jwt (2.10.2)
base64
logger (1.7.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.25.1)
molinillo (0.8.0)
multi_json (1.17.0)
multipart-post (2.4.1)
mutex_m (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
naturally (2.3.0)
netrc (0.11.0)
nkf (0.2.0)
optparse (0.8.0)
os (1.1.4)
plist (3.7.2)
public_suffix (4.0.7)
rake (13.3.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.4.4)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
security (0.1.5)
signet (0.21.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 4.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.1)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
abbrev
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (= 1.16.2)
concurrent-ruby (< 1.3.4)
fastlane (= 2.228.0)
nkf
RUBY VERSION
ruby 3.3.10
BUNDLED WITH
2.7.2
Our project using pnpm as packageManager. The bundle exec pod install command and pod install command fails sometimes.
Metadata
Metadata
Assignees
Labels
No labels