Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

build - Fastlane iOS Suddenly getting error: muninitialized constant Fastlane::Actions::SharedValues::KEYCHAIN_PATH

I have fastline set up in AZURE cloud which worked great until a week ago Suddenly all build are failing, and this is AFTER i set up new FASTLANE_SESSION which i usually do every month

getting error: muninitialized constant Fastlane::Actions::SharedValues::KEYCHAIN_PATH 

fastlane output:

stack trace and command, used

 2021-01-28T10:17:33.7609670Z /Users/runner/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
2021-01-28T10:17:33.7629520Z /Users/runner/hostedtoolcache/Ruby/3.0.0/x64/lib/ruby/gems/3.0.0/gems/bundler-1.17.3/lib/bundler/shared_helpers.rb:118: warning: Pathname#untaint is deprecated and will be removed in Ruby 3.2.
2021-01-28T10:17:33.7630880Z [10:17:33]: [33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile[0m
2021-01-28T10:17:36.2135810Z [10:17:36]: [33mGenerating fastlane environment output, this might take a few seconds...[0m
2021-01-28T10:17:36.4575750Z e??? fastlane environment e???
 
 ### Stack
 
 | Key                         | Value                                            |
 | --------------------------- | ------------------------------------------------ |
 | OS                          | 10.15.7                                          |
 | Ruby                        | 3.0.0                                            |
 | Bundler?                    | false                                            |
 | Git                         | git version 2.30.0                               |
 | Installation Source         | ~/hostedtoolcache/Ruby/3.0.0/x64/bin/fastlane    |
 | Host                        | Mac OS X 10.15.7 (19H114)                        |
 | Ruby Lib Dir                | ~/hostedtoolcache/Ruby/3.0.0/x64/lib             |
 | OpenSSL Version             | OpenSSL 1.1.1i  8 Dec 2020                       |
 | Is contained                | false                                            |
 | Is homebrew                 | false                                            |
 | Is installed via Fabric.app | false                                            |
 | Xcode Path                  | /Applications/Xcode_12.3.app/Contents/Developer/ |
 | Xcode Version               | 12.3                                             |
 
 
 ### System Locale
 
 | Variable | Value       |   |
 | -------- | ----------- | - |
 | LANG     | en_US.UTF-8 | a?… |
 | LC_ALL   | en_US.UTF-8 | a?… |
 | LANGUAGE |             |   |
 
 
 ### fastlane files:
 
 `./fastlane/Fastfile`
 
 ```ruby
 #dont send info to google
 opt_out_usage # opt-out of metrics collection
 default_platform(:ios)
 #xcversion(version: "11.1")
 xcode_select("/Applications/Xcode_12.app")
 
 
 platform :ios do
 
 
 
     desc "Ios build "
     lane :release do |options|
             opt_out_usage # opt-out of metrics collection
             debug
    
             #@my_key_name = ENV['IPHONE_DISTRIBUTION']
         
         
            project_name = options[:projectName]
            app_identifier = options[:appIdentifier]
            v_num = options[:versionNumber]
            build_number = options[:buildNumber]
            ftp_path = options[:plistFileFtpBasePath]
            ArtifactsDirectory = options[:ArtifactsDirectory]
            
             create_keychain(
                 name: ENV['IPHONE_DISTRIBUTION'],
                 default_keychain: true,
                 unlock: true,
                 timeout: false,
                 password: ENV['CERTIFICATE_PASSWORD'])
 
             import_certificate(
                 certificate_path: ENV['CERTIFICATE_PATH_P12'],
                 certificate_password: ENV['CERTIFICATE_PASSWORD'],
                 keychain_name: ENV['IPHONE_DISTRIBUTION'],
                 keychain_password: ENV['CERTIFICATE_PASSWORD'],
                 log_output: true)
 
             import_certificate(
                 certificate_path: ENV['CERTIFICATE_PATH_CER'],
                 keychain_name: ENV['IPHONE_DISTRIBUTION'],
                 log_output: true)
                
 
            increment_version_number(version_number: v_num)
            bundle_name = "#{project_name}_#{build_number}"
            bundle_version = "#{v_num}_#{build_number}"
            update_info_plist(
                    plist_path:"xxxridxxxnetics/Info.plist",
                    block: proc do |plist|
                            plist[:CFBundleVersion] = bundle_version
                            plist[:CFBundleDisplayName] = bundle_name
                    end
            )
            
            
             
            sigh(
                    username: ENV['APPLE_ID'],
                    app_identifier: app_identifier,
                    team_id: ENV['TEAM_ID']
 
            )
            
            profile_name_found = lane_context[SharedValues::SIGH_NAME]
            update_code_signing_settings(profile_name: profile_name_found)
            
            update_code_signing_settings(profile_name: profile_name_found)
            
            automatic_code_signing(code_sign_identity:"iPhone Distribution", use_automatic_signing: false)
 
            #to update PRODUCT_BUNDLE_IDENTIFIER, use:
            update_app_identifier(
                xcodeproj: "Hybridxxxnetics.xcodeproj",
                plist_path: "Hybridxxxnetics/Info.plist",
                app_identifier: app_identifier
            )
            
 
            build_app(
                  workspace: "Hybridxxxnetics.xcworkspace",
                  output_name:"#{project_name}_#{v_num}_#{build_number}.ipa",
                  output_directory:"#{ArtifactsDirectory}",
                  export_options: {
                        manifest: {
                                appURL: "#{ftp_path}/#{project_name}_#{v_num}_#{build_number}.ipa",
                                displayImageURL: "https://download.xxxnetics.com/release/product-qa/ios/Test/xxxPush57.png",
                                fullSizeImageURL: "https://download.xxxnetics.com/release/product-qa/ios/Test/xxxPush512.png"
                        }
                  }
           )
          
 
     end
 end
 ```
 
 
 `./fastlane/Appfile`
 
 ```ruby
 #app_identifier("com.xxxnetics.xxxBPEREnt")
 #apple_id("devops@xxxnetics.com")
 #itc_team_id("433380") # App Store Connect Team ID
 #team_id("5E6D333C5B") # Developer Portal Team ID```
 
 
 ### fastlane gems
 
 | Gem      | Version | Update-Status      |
 | -------- | ------- | ------------------ |
 | fastlane | 2.54.1  | e??? Update available |
 
 
 ### Loaded fastlane plugins:
 
 **No plugins Loaded**
 
 
 Loaded gems
 
 | Gem                       | Version      |
 | ------------------------- | ------------ |
 | did_you_mean              | 1.5.0        |
 | slack-notifier            | 1.5.1        |
 | atomos                    | 0.1.3        |
 | CFPropertyList            | 2.3.6        |
 | claide                    | 1.0.3        |
 | colored2                  | 3.1.2        |
 | nanaimo                   | 0.3.0        |
 | xcodeproj                 | 1.19.0       |
 | rouge                     | 2.0.7        |
 | xcpretty                  | 0.3.0        |
 | terminal-notifier         | 1.8.0        |
 | unicode-display_width     | 1.7.0        |
 | terminal-table            | 1.8.0        |
 | plist                     | 3.6.0        |
 | public_suffix             | 4.0.6        |
 | addressable               | 2.7.0        |
 | multipart-post            | 2.0.0        |
 | word_wrap                 | 1.0.0        |
 | tty-screen                | 0.5.1        |
 | babosa                    | 1.0.4        |
 | colored                   | 1.2          |
 | highline                  | 1.7.10       |
 | commander-fastlane        | 4.4.6        |
 | excon                     | 0.78.1       |
 | faraday                   | 0.17.3       |
 | unf_ext                   | 0.0.7.7      |
 | unf                       | 0.1.4        |
 | domain_name               | 0.5.20190701 |
 | http-cookie               | 1.0.3        |
 | faraday-cookie_jar        | 0.0.7        |
 | fastimage                 | 2.2.1        |
 | gh_inspector              | 1.1.3        |
 | uber                      | 0.1.0        |
 | declarative               | 0.0.20       |
 | declarative-option        | 0.1.0        |
 | representable             | 3.0.4        |
 | retriable                 | 3.1.2        |
 | mini_mime                 | 1.0.2        |
 | jwt                       | 2.2.2        |
 | multi_json                | 1.15.0       |
 | signet                    | 0.14.1       |
 | memoist                   | 0.16.2       |
 | os                        | 1.1.1        |
 | googleauth                | 0.15.0       |
 | httpclient                | 2.8.3        |
 | rexml                     | 3.2.4        |
 | webrick                   | 1.7.0        |
 | google-apis-core          | 0.2.1        |
 | gems                      | 1.2.0        |
 | google-apis-discovery_v1  | 0.1.0        |
 | thor                      | 1.1.0        |
 | google-apis-generator     | 0.1.2        |
 | google-api-client         | 0.53.0       |
 | json                      | 2.5.1        |
 | mini_magick               | 4.5.1        |
 | multi_xml                 | 0.6.0        |
 | rubyzip                   | 1.3.0        |
 | security                  | 0.1.3        |
 | xcpretty-travis-formatter | 1.0.1        |
 | dotenv                    | 2.7.6        |
 | bundler                   | 1.17.3       |
 | faraday_middleware        | 0.14.0       |
 | tsort                     | 0.1.0        |
 | set                       | 1.0.1        |
 | uri                       | 0.10.1       |
 | minitest                  | 5.14.2       |
 | zeitwerk                  | 2.4.2        |
 | concurrent-ruby           | 1.1.8        |
 | tzinfo                    | 2.0.4        |
 | i18n                      | 1.8.7        |
 | activesupport             | 6.1.1        |
 | ostruct                   | 0.3.1        |
 | logger                    | 1.4.3        |
 | cgi                       | 0.2.0        |
 | erb                       | 2.2.0        |
 | strscan                   | 3.0.0        |
 | optparse                  | 0.1.0        |
 | stringio                  | 3.0.0        |
 | abbrev                    | 0.1.0        |
 | date                      | 3.1.0        |
 | pathname                  | 0.1.0        |
 | forwardable               | 1.3.2        |
 | tempfile                  | 0.1.1        |
 | delegate                  | 0.2.0        |
 | fileutils                 | 1.5.0        |
 | tmpdir                    | 0.1.1        |
 | shellwords                | 0.1.0        |
 | openssl                   | 2.2.0        |
 | io-nonblock               | 0.1.0        |
 | ipaddr                    | 1.2.2        |
 | io-wait                   | 0.1.0        |
 | timeout                   | 0.1.1        |
 | zlib                      | 1.1.0        |
 | digest                    | 3.0.0        |
 | time                      | 0.1.0        |
 | open-uri                  | 0.1.0        |
 | singleton                 | 0.1.1        |
 | base64                    | 0.1.0        |
 | prettyprint               | 0.1.0        |
 | pp                        | 0.1.0        |
 | open3                     | 0.1.1        |
 | net-protocol              | 0.1.0        |
 | net-smtp                  | 0.2.1        |
 | securerandom              | 0.1.0        |
 | english                   | 0.7.1      

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...