Skip to content

Commit

Permalink
Try patch fastlane for Google Issue
Browse files Browse the repository at this point in the history
* fastlane/fastlane#21507
* Google Api Error: Unauthorized - Request is missing required
  authentication credentials
* Retry
  • Loading branch information
chrisvire committed Sep 15, 2023
1 parent 3e0214c commit 0dfae66
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ WORKDIR /ansible
RUN mkdir -p /etc/ansible && echo local > /etc/ansible/hosts &&\
ansible-playbook playbook.yml -c local &&\
apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/*.* /App \Builder/Scripture\ Apps/App\ Projects/* /tmp/App\ Builder/*

COPY patch /patch
WORKDIR /patch

RUN patch /root/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/fastlane-2.214.0/supply/lib/supply/client.rb < 21507.patch
23 changes: 23 additions & 0 deletions patch/21507.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@@ -78,6 +78,7 @@
private

def call_google_api
+ tries_left ||=5
yield if block_given?
rescue Google::Apis::Error => e
error = begin
@@ -92,7 +93,13 @@
message = e.body
end

- UI.user_error!("Google Api Error: #{e.message} - #{message}")
+ if tries_left.positive?
+ UI.error("Google Api Error: #{e.message} - #{message} - Retrying...")
+ tries_left -= 1
+ retry
+ else
+ UI.user_error!("Google Api Error: #{e.message} - #{message}")
+ end
end
end

0 comments on commit 0dfae66

Please sign in to comment.