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

undefined method hash_md5 for nil:NilClass #367

Closed
nmguse-bighealth opened this issue Apr 30, 2024 · 3 comments · Fixed by #368
Closed

undefined method hash_md5 for nil:NilClass #367

nmguse-bighealth opened this issue Apr 30, 2024 · 3 comments · Fixed by #368
Labels
bug Something isn't working

Comments

@nmguse-bighealth
Copy link

nmguse-bighealth commented Apr 30, 2024

Issue Description

/firebase_app_distribution_action.rb:224:in `aab_certs_included?': �[31m[!] undefined method `hash_md5' for nil:NilClass�[0m (NoMethodError)

The build is successfully uploaded to firebase app distribution before this error occurs. The error seems to occur before the build is assigned to the correct groups, however.

Configuration
        release = firebase_app_distribution(
            app: ENV["firebase_app_distribution_app_id"],
            service_credentials_file: "./android/firebase_app_distribution_credentials.json",
            groups: ENV["firebase_app_distribution_groups"],
            android_artifact_type: "AAB",
        )
Complete verbose output
2024-04-30T16:37:33.4425815Z bundler: failed to load command: fastlane (/home/runner/work/app/app/vendor/bundle/ruby/3.2.0/bin/fastlane)
2024-04-30T16:37:33.4469452Z /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-plugin-firebase_app_distribution-0.9.0/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb:224:in `aab_certs_included?': �[31m[!] undefined method `hash_md5' for nil:NilClass�[0m (NoMethodError)
2024-04-30T16:37:33.4472238Z 
2024-04-30T16:37:33.4472862Z         present?(test_certificate.hash_md5) && present?(test_certificate.hash_sha1) &&
2024-04-30T16:37:33.4473889Z                                  ^^^^^^^^^
2024-04-30T16:37:33.4476572Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-plugin-firebase_app_distribution-0.9.0/lib/fastlane/plugin/firebase_app_distribution/actions/firebase_app_distribution_action.rb:63:in `run'
2024-04-30T16:37:33.4480281Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
2024-04-30T16:37:33.4483496Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
2024-04-30T16:37:33.4486631Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
2024-04-30T16:37:33.4489516Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
2024-04-30T16:37:33.4492557Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
2024-04-30T16:37:33.4495940Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
2024-04-30T16:37:33.4499044Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
2024-04-30T16:37:33.4500978Z 	from Fastfile:119:in `block in parsing_binding'
2024-04-30T16:37:33.4503046Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane.rb:41:in `call'
2024-04-30T16:37:33.4506238Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:204:in `try_switch_to_lane'
2024-04-30T16:37:33.4509892Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:146:in `trigger_action_by_name'
2024-04-30T16:37:33.4513212Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
2024-04-30T16:37:33.4515144Z 	from Fastfile:15:in `block in parsing_binding'
2024-04-30T16:37:33.4517243Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane.rb:41:in `call'
2024-04-30T16:37:33.4520422Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
2024-04-30T16:37:33.4523529Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
2024-04-30T16:37:33.4526586Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
2024-04-30T16:37:33.4529614Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
2024-04-30T16:37:33.4536077Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/command_line_handler.rb:34:in `handle'
2024-04-30T16:37:33.4539621Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
2024-04-30T16:37:33.4542820Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
2024-04-30T16:37:33.4545646Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
2024-04-30T16:37:33.4548602Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
2024-04-30T16:37:33.4551831Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
2024-04-30T16:37:33.4554894Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
2024-04-30T16:37:33.4557921Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:363:in `run'
2024-04-30T16:37:33.4561131Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
2024-04-30T16:37:33.4564684Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
2024-04-30T16:37:33.4567745Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/gems/fastlane-2.220.0/bin/fastlane:23:in `<top (required)>'
2024-04-30T16:37:33.4570211Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/bin/fastlane:25:in `load'
2024-04-30T16:37:33.4572719Z 	from /home/runner/work/app/app/vendor/bundle/ruby/3.2.0/bin/fastlane:25:in `<top (required)>'
2024-04-30T16:37:33.4575419Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `load'
2024-04-30T16:37:33.4576766Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli/exec.rb:58:in `kernel_load'
2024-04-30T16:37:33.4577731Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli/exec.rb:23:in `run'
2024-04-30T16:37:33.4579080Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli.rb:492:in `exec'
2024-04-30T16:37:33.4580110Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
2024-04-30T16:37:33.4581358Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
2024-04-30T16:37:33.4582649Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
2024-04-30T16:37:33.4584118Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli.rb:34:in `dispatch'
2024-04-30T16:37:33.4585152Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
2024-04-30T16:37:33.4586141Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/cli.rb:28:in `start'
2024-04-30T16:37:33.4587415Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.19/libexec/bundle:37:in `block in <top (required)>'
2024-04-30T16:37:33.4588687Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/3.2.0/bundler/friendly_errors.rb:117:in `with_friendly_errors'
2024-04-30T16:37:33.4591349Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/lib/ruby/gems/3.2.0/gems/bundler-2.4.19/libexec/bundle:29:in `<top (required)>'
2024-04-30T16:37:33.4592982Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/bin/bundle:25:in `load'
2024-04-30T16:37:33.4594115Z 	from /opt/hostedtoolcache/Ruby/3.2.4/x64/bin/bundle:25:in `<main>'
Environment
Library Version
fastlane 2.220.0
fastlane-plugin-firebase_app_distribution 0.9.0
@nmguse-bighealth nmguse-bighealth added the bug Something isn't working label Apr 30, 2024
kaibolay added a commit that referenced this issue Apr 30, 2024
kaibolay added a commit that referenced this issue Apr 30, 2024
@kaibolay
Copy link
Collaborator

Thanks for the report and apologies for the bug.

This should be fixed with version 0.9.1. Please let me know if that's not the case.

@nmguse-bighealth
Copy link
Author

Thanks for the quick turn around!

I will keep an eye out and reply here if the issue comes up for me again. I'm not sure why but, with no changes in our code, the error went away on subsequent builds, so I unfortunately cannot reproduce this again at the moment. I know I've had this error more than once though (I just recently started pushing builds for a few apps to Firebase app distribution, with this plugin), so I'm guessing this goes away when something like at least one build is submitted to Firebase app distribution successfully.

@kaibolay
Copy link
Collaborator

kaibolay commented May 1, 2024

I'm not sure why but, with no changes in our code, the error went away on subsequent builds,

From my understanding, the code-path, which contained the bug which caused the crash, is only exercised when the first AAB is uploaded for a given app. All subsequent uploads were not affected.

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

Successfully merging a pull request may close this issue.

2 participants