fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps

Home Page:https://fastlane.tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rect-Native iOS on M1 Mac: redefinition of module 'YogaKit'

olcayertas opened this issue · comments

Issue Description

When I try to use gym or pilot for iOS for my React Native project it fails with below error:

❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
             ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  error: emit-module command failed with exit code 1 (use -v to see invocation)
❌  error: emit-module command failed with exit code 1 (use -v to see invocation)
▸ Compiling YGLayoutExtensions.swift
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
❌  /Users/olcayertas/WebstormProjects/mobile/ios/Pods/Headers/Public/YogaKit/YogaKit.modulemap:1:8: redefinition of module 'YogaKit'
module YogaKit {
       ^
▸ Building library libAppAuth.a
▸ Compiling NSURLSession+GULPromises.m

⚠️  /Users/olcayertas/Library/Developer/Xcode/DerivedData/AlaricMDMobile-emcqppkrbvrtmvayosxvjwifiuth/Build/Intermediates.noindex/ArchiveIntermediates/AlaricMDMobile/IntermediateBuildFilesPath/Pods.build/Debug-iphonesimulator/GoogleUtilities.build/Objects-normal/x86_64/NSURLSession+GULPromises.dia:1:1: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target 'GoogleUtilities' from project 'Pods')
       ^
▸ Compiling GoogleUtilities-dummy.m
▸ Compiling GULUserDefaults.m
▸ Compiling GULURLSessionDataResponse.m
▸ Compiling GULSwizzler.m
▸ Compiling GULSecureCoding.m
▸ Compiling GULSceneDelegateSwizzler.m
▸ Compiling GULReachabilityChecker.m
** ARCHIVE FAILED **

The following build commands failed:
	CompileSwift normal x86_64 /Users/olcayertas/WebstormProjects/mobile/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift (in target 'YogaKit' from project 'Pods')
	EmitSwiftModule normal x86_64 (in target 'YogaKit' from project 'Pods')
	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'YogaKit' from project 'Pods')
	CompileSwift normal arm64 /Users/olcayertas/WebstormProjects/mobile/ios/Pods/YogaKit/YogaKit/Source/YGLayoutExtensions.swift (in target 'YogaKit' from project 'Pods')
	EmitSwiftModule normal arm64 (in target 'YogaKit' from project 'Pods')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'YogaKit' from project 'Pods')
(6 failures)
[14:38:55]: Exit status: 65

I am able get a build with Xcode 13.4 but Xcode 13.3.1 also fails.

Command executed

Both of these commands fails with simmilar errors:

  • fastlane test
  • fastlane sim

##### Complete output when running fastlane, including the stack trace and command used
<details><summary>🚫 fastlane environment 🚫</summary>

### Stack

| Key                         | Value                                            |
| --------------------------- | ------------------------------------------------ |
| OS                          | 12.4                                             |
| Ruby                        | 3.1.2                                            |
| Bundler?                    | false                                            |
| Git                         | git version 2.32.1 (Apple Git-133)               |
| Installation Source         | /opt/homebrew/lib/ruby/gems/3.1.0/bin/fastlane   |
| Host                        | macOS 12.4 (21F79)                               |
| Ruby Lib Dir                | /opt/homebrew/Cellar/ruby/3.1.2/lib              |
| OpenSSL Version             | OpenSSL 1.1.1n  15 Mar 2022                      |
| Is contained                | false                                            |
| Is homebrew                 | false                                            |
| Is installed via Fabric.app | false                                            |
| Xcode Path                  | /Applications/Xcode-13.4.app/Contents/Developer/ |
| Xcode Version               | 13.4                                             |
| Swift Version               | 5.6.1                                            |


### System Locale

| Error                       |
| --------------------------- |
| No Locale with UTF8 found 🚫 |


### fastlane files:

<details><summary>`./fastlane/Fastfile`</summary>

```ruby
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

ENV["LC_ALL"] = "en_US.UTF-8"
ENV["LANG"] = "en_US.UTF-8"
scheme = "MyApp"
workspace = "MyApp.xcworkspace"
xcodeproj = "MyApp.xcodeproj"
xcargs = "-allowProvisioningUpdates"
commit = last_git_commit
hash = commit[:commit_hash]
short_hash = commit[:abbreviated_commit_hash]
output_name = "#{scheme}_build-#{short_hash}"
zip_name = "10n_iOS_#{short_hash}_simulator"
version = get_version_number(xcodeproj: xcodeproj)
build = get_build_number(xcodeproj: xcodeproj)

default_platform(:ios)

=begin
before_all do |lane, options|
    # Ensure that your git status is not dirty
    #ensure_git_status_clean
end

after_all do |lane, options|
    # Increment the build number (not the version number)
    # Providing the xcodeproj is optional
    increment_build_number(xcodeproj: xcodeproj)
    # Add a git tag for this build.
    # tag, grouping, prefix, postfix, build_number, message, commit, force, sign
    # <grouping>/<lane>/<prefix><build_number><postfix>
    add_git_tag(grouping: "fastlane")
    # Commit the version bump
    commit_version_bump(xcodeproj: xcodeproj)
    # Push the new commit and tag back to your git remote
    push_to_git_remote
    # Deletes files created as result of running gym, cert, sigh or download_dsyms
    clean_build_artifacts
end
=end

platform :ios do
  
  lane :update_commit_hash do
    sh("echo \"export default '#{short_hash}';\" > ../../commit-sha.ts")
  end
  
  lane :revert_commit_hash do
    sh("echo \"export default 'local';\" > ../../commit-sha.ts")
  end
  
  desc "Push a new beta build to TestFlight"
  lane :test do
    update_commit_hash
    increment_build_number(xcodeproj: xcodeproj)
    build_app(scheme: scheme, export_xcargs: xcargs)
    pilot(
      skip_submission: true,
      distribute_external: true,
      notify_external_testers: true,
      skip_waiting_for_build_processing: true,
      groups: ['External'],
      changelog: "New beta build (#{short_hash})",
      #This file will be available at pipeline
      api_key_path: "fastlane/connect.json"
    )
    revert_commit_hash
  end
  
  lane :sim do
    update_commit_hash
    archive_path = gym(
      scheme: scheme,
      skip_package_ipa: true,
      destination: "generic/platform=iOS Simulator",
      configuration: "Debug",
      archive_path: "#{scheme}",
    )
    sh "mv #{archive_path}/Products/Applications/#{scheme}.app #{archive_path}/Products/Applications/#{output_name}.app"
    zip(
      path: "#{archive_path}/Products/Applications/#{output_name}.app",
      output_path: "./10n_iOS_#{version}-#{build}_#{short_hash}.zip"
    )
    UI.message("App path: #{archive_path}/Products/Applications/#{output_name}.app")
    revert_commit_hash
  end
end

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.206.2 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-increment_version_name 0.0.10 ✅ Up-To-Date
fastlane-plugin-increment_version_code 0.4.3 ✅ Up-To-Date
fastlane-plugin-load_json 0.0.1 ✅ Up-To-Date
fastlane-plugin-versioning 0.5.0 ✅ Up-To-Date
Loaded gems
Gem Version
error_highlight 0.3.0
did_you_mean 1.6.1
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.6.0
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
faraday-cookie_jar 0.0.7
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
simctl 1.6.8
set 1.0.2
rexml 3.2.5
nanaimo 0.3.0
colored2 3.1.2
claide 1.1.0
CFPropertyList 3.0.5
atomos 0.1.3
xcodeproj 1.21.0
unicode-display_width 1.8.0
public_suffix 4.0.7
excon 0.92.3
ruby2_keywords 0.0.5
faraday-retry 1.0.3
faraday-rack 1.0.0
faraday-patron 1.0.0
faraday-net_http_persistent 1.2.0
faraday-net_http 1.0.1
faraday-multipart 1.0.3
faraday-httpclient 1.0.1
faraday-excon 1.1.0
faraday-em_synchrony 1.0.0
faraday-em_http 1.0.0
faraday 1.10.0
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.5
faraday_middleware 1.2.0
fastimage 2.2.6
json 2.6.2
rubyzip 2.3.2
bundler 2.3.15
jwt 2.3.0
webrick 1.7.0
httpclient 2.8.3
multi_json 1.15.0
signet 0.16.1
os 1.1.4
memoist 0.16.2
googleauth 1.1.3
mini_mime 1.1.2
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.2.0
google-apis-core 0.5.0
google-apis-playcustomapp_v1 0.7.0
google-apis-androidpublisher_v3 0.21.0
rake 13.0.6
digest-crc 0.6.4
google-apis-storage_v1 0.14.0
google-apis-iamcredentials_v1 0.10.0
google-cloud-errors 1.2.0
google-cloud-env 1.6.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.2
emoji_regex 3.2.3
aws-eventstream 1.2.0
aws-sigv4 1.5.0
aws-partitions 1.595.0
jmespath 1.6.1
aws-sdk-core 3.131.1
aws-sdk-kms 1.57.0
aws-sdk-s3 1.114.0
forwardable 1.3.2
logger 1.5.0
pathname 0.2.0
shellwords 0.1.0
cgi 0.3.1
date 3.2.2
timeout 0.2.0
stringio 3.0.1
securerandom 0.1.1
uri 0.11.0
openssl 3.0.0
digest 3.1.0
io-nonblock 0.1.0
ipaddr 1.2.4
io-wait 0.2.1
zlib 2.1.1
resolv 0.2.1
time 0.2.0
open-uri 0.2.0
mutex_m 0.1.1
net-protocol 0.1.2
net-http 0.2.0
ostruct 0.5.2
english 0.7.1
erb 2.2.3
strscan 3.0.1
abbrev 0.1.0
io-console 0.5.11
tempfile 0.1.2
delegate 0.2.0
fileutils 1.6.0
tmpdir 0.1.2
base64 0.1.1
singleton 0.1.1
open3 0.1.1
nkf 0.1.1
prettyprint 0.1.1
pp 0.3.0
find 0.1.1
yaml 0.2.0
psych 4.0.3
fastlane-plugin-increment_version_name 0.0.10
fastlane-plugin-increment_version_code 0.4.3
fastlane-plugin-load_json 0.0.1
fastlane-plugin-versioning 0.5.0

generated on: 2022-06-03

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 12.4
Ruby 3.1.2
Bundler? false
Git git version 2.32.1 (Apple Git-133)
Installation Source /opt/homebrew/lib/ruby/gems/3.1.0/bin/fastlane
Host macOS 12.4 (21F79)
Ruby Lib Dir /opt/homebrew/Cellar/ruby/3.1.2/lib
OpenSSL Version OpenSSL 1.1.1n 15 Mar 2022
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode-13.4.app/Contents/Developer/
Xcode Version 13.4
Swift Version 5.6.1

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

ENV["LC_ALL"] = "en_US.UTF-8"
ENV["LANG"] = "en_US.UTF-8"
scheme = "AlaricMDMobile"
workspace = "AlaricMDMobile.xcworkspace"
xcodeproj = "AlaricMDMobile.xcodeproj"
xcargs = "-allowProvisioningUpdates"
commit = last_git_commit
hash = commit[:commit_hash]
short_hash = commit[:abbreviated_commit_hash]
output_name = "#{scheme}_build-#{short_hash}"
zip_name = "10n_iOS_#{short_hash}_simulator"
version = get_version_number(xcodeproj: xcodeproj)
build = get_build_number(xcodeproj: xcodeproj)

default_platform(:ios)

=begin
before_all do |lane, options|
    # Ensure that your git status is not dirty
    #ensure_git_status_clean
end

after_all do |lane, options|
    # Increment the build number (not the version number)
    # Providing the xcodeproj is optional
    increment_build_number(xcodeproj: xcodeproj)
    # Add a git tag for this build.
    # tag, grouping, prefix, postfix, build_number, message, commit, force, sign
    # <grouping>/<lane>/<prefix><build_number><postfix>
    add_git_tag(grouping: "fastlane")
    # Commit the version bump
    commit_version_bump(xcodeproj: xcodeproj)
    # Push the new commit and tag back to your git remote
    push_to_git_remote
    # Deletes files created as result of running gym, cert, sigh or download_dsyms
    clean_build_artifacts
end
=end

platform :ios do
  
  lane :update_commit_hash do
    sh("echo \"export default '#{short_hash}';\" > ../../commit-sha.ts")
  end
  
  lane :revert_commit_hash do
    sh("echo \"export default 'local';\" > ../../commit-sha.ts")
  end
  
  desc "Push a new beta build to TestFlight"
  lane :test do
    update_commit_hash
    increment_build_number(xcodeproj: xcodeproj)
    build_app(scheme: scheme, export_xcargs: xcargs)
    pilot(
      skip_submission: true,
      distribute_external: true,
      notify_external_testers: true,
      skip_waiting_for_build_processing: true,
      groups: ['External'],
      changelog: "New beta build (#{short_hash})",
      #This file will be available at pipeline
      api_key_path: "fastlane/connect.json"
    )
    revert_commit_hash
  end
  
  lane :sim do
    update_commit_hash
    archive_path = gym(
      scheme: scheme,
      skip_package_ipa: true,
      destination: "generic/platform=iOS Simulator",
      configuration: "Debug",
      archive_path: "#{scheme}",
    )
    sh "mv #{archive_path}/Products/Applications/#{scheme}.app #{archive_path}/Products/Applications/#{output_name}.app"
    zip(
      path: "#{archive_path}/Products/Applications/#{output_name}.app",
      output_path: "./10n_iOS_#{version}-#{build}_#{short_hash}.zip"
    )
    UI.message("App path: #{archive_path}/Products/Applications/#{output_name}.app")
    revert_commit_hash
  end
end

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.206.2 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-increment_version_name 0.0.10 ✅ Up-To-Date
fastlane-plugin-increment_version_code 0.4.3 ✅ Up-To-Date
fastlane-plugin-load_json 0.0.1 ✅ Up-To-Date
fastlane-plugin-versioning 0.5.0 ✅ Up-To-Date
Loaded gems
Gem Version
error_highlight 0.3.0
did_you_mean 1.6.1
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.6.0
addressable 2.8.0
multipart-post 2.0.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
faraday-cookie_jar 0.0.7
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
simctl 1.6.8
set 1.0.2
rexml 3.2.5
nanaimo 0.3.0
colored2 3.1.2
claide 1.1.0
CFPropertyList 3.0.5
atomos 0.1.3
xcodeproj 1.21.0
unicode-display_width 1.8.0
public_suffix 4.0.7
excon 0.92.3
ruby2_keywords 0.0.5
faraday-retry 1.0.3
faraday-rack 1.0.0
faraday-patron 1.0.0
faraday-net_http_persistent 1.2.0
faraday-net_http 1.0.1
faraday-multipart 1.0.3
faraday-httpclient 1.0.1
faraday-excon 1.1.0
faraday-em_synchrony 1.0.0
faraday-em_http 1.0.0
faraday 1.10.0
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.5
faraday_middleware 1.2.0
fastimage 2.2.6
json 2.6.2
rubyzip 2.3.2
bundler 2.3.15
jwt 2.3.0
webrick 1.7.0
httpclient 2.8.3
multi_json 1.15.0
signet 0.16.1
os 1.1.4
memoist 0.16.2
googleauth 1.1.3
mini_mime 1.1.2
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.2.0
google-apis-core 0.5.0
google-apis-playcustomapp_v1 0.7.0
google-apis-androidpublisher_v3 0.21.0
rake 13.0.6
digest-crc 0.6.4
google-apis-storage_v1 0.14.0
google-apis-iamcredentials_v1 0.10.0
google-cloud-errors 1.2.0
google-cloud-env 1.6.0
google-cloud-core 1.6.0
google-cloud-storage 1.36.2
emoji_regex 3.2.3
aws-eventstream 1.2.0
aws-sigv4 1.5.0
aws-partitions 1.595.0
jmespath 1.6.1
aws-sdk-core 3.131.1
aws-sdk-kms 1.57.0
aws-sdk-s3 1.114.0
forwardable 1.3.2
logger 1.5.0
pathname 0.2.0
shellwords 0.1.0
cgi 0.3.1
date 3.2.2
timeout 0.2.0
stringio 3.0.1
securerandom 0.1.1
uri 0.11.0
openssl 3.0.0
digest 3.1.0
io-nonblock 0.1.0
ipaddr 1.2.4
io-wait 0.2.1
zlib 2.1.1
resolv 0.2.1
time 0.2.0
open-uri 0.2.0
mutex_m 0.1.1
net-protocol 0.1.2
net-http 0.2.0
ostruct 0.5.2
english 0.7.1
erb 2.2.3
strscan 3.0.1
abbrev 0.1.0
io-console 0.5.11
tempfile 0.1.2
delegate 0.2.0
fileutils 1.6.0
tmpdir 0.1.2
base64 0.1.1
singleton 0.1.1
open3 0.1.1
nkf 0.1.1
prettyprint 0.1.1
pp 0.3.0
find 0.1.1
yaml 0.2.0
psych 4.0.3
fastlane-plugin-increment_version_name 0.0.10
fastlane-plugin-increment_version_code 0.4.3
fastlane-plugin-load_json 0.0.1
fastlane-plugin-versioning 0.5.0

generated on: 2022-06-03

I can’t tell you how much I hate Apple and Xcode: I have downgraded to Xcode 13.3.0 and it is working now.
My two days gone in vain.

Pleased to see your issue as I think I have the same problem,I am also confused and in need of light on this same issue. Need help. Hyvee Huddle App

Thanks for sharing such great information, I highly appreciate your hard-working skills as the post you published have some great information which is quite beneficial for me, I hope you will post more like that in the future

DG Paystub Login

ezoic increase your site revenue