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

[Spaceship] You are not allowed to access the document you requested. in spaceship after moving to ruby 2.6 #16430

Closed
4 tasks done
BalestraPatrick opened this issue May 7, 2020 · 8 comments

Comments

@BalestraPatrick
Copy link
Contributor

BalestraPatrick commented May 7, 2020

New Issue Checklist

Issue Description

We have some code that uses spaceship to create bundle identifiers and other things with the developer portal. Everything was working fine in macOS Mojave and Ruby 2.3, but when moving to Ruby 2.6 and macOS Catalina, the same code started randomly throwing exceptions when handling some responses from App Store Connect:

gems/fastlane-2.145.0/spaceship/lib/spaceship/client.rb:714:in `parse_response': <HTML> (Spaceship::UnexpectedResponse)
  <HEAD>
  <TITLE>Access Denied</TITLE>
  </HEAD>
  <BODY BGCOLOR="white" FGCOLOR="black">
  <H1>Access Denied</H1>
  <HR>
  <FONT FACE="Helvetica,Arial"><B>
  Description: You are not allowed to access the document you requested.
  </B></FONT>
  <HR>
  </BODY>
gems/fastlane-2.145.0/spaceship/lib/spaceship/portal/portal_client.rb:128:in `block in apps'
gems/fastlane-2.145.0/spaceship/lib/spaceship/client.rb:317:in `block in paging'
gems/fastlane-2.145.0/spaceship/lib/spaceship/client.rb:315:in `loop'
gems/fastlane-2.145.0/spaceship/lib/spaceship/client.rb:315:in `paging'
gems/fastlane-2.145.0/spaceship/lib/spaceship/portal/portal_client.rb:121:in `apps'
gems/fastlane-2.145.0/spaceship/lib/spaceship/portal/app.rb:85:in `all'
gems/fastlane-2.145.0/spaceship/lib/spaceship/portal/app.rb:111:in `find'
Command executed

The exception seems to take place in different calls that communicate with the App Store Connect API, one example is when we create a bundle id or find an existing one:

Spaceship::Portal.app.find(bundle_id)
Spaceship::Portal.app.create!(bundle_id: bundle_id, name: app_name)

Any idea what the cause could be?

@fastlane-bot
Copy link

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env 👍

@BalestraPatrick
Copy link
Contributor Author

I'm now seeing this on ruby 2.3 as well without changing anything, so it feels like this is a problem with App Store Connect. Anyone else with the same issue?

@fhickman
Copy link

fhickman commented May 8, 2020

We started seeing a similar issues a couple of days ago, though it isn't 100% repeatable.

@Arclite
Copy link

Arclite commented May 19, 2020

I +1’d the comment above a few days ago, but thought I’d come back with some more info. We’re seeing this sporadically as well, but as a result of running cert, not as a result of running spaceship directly:

bundler: failed to load command: fastlane (/workspace/vendor/bundle/ruby/2.6.0/bin/fastlane)
Spaceship::UnexpectedResponse: [!] <HTML>
<HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>
 
<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Access Denied</H1>
<HR>
 
<FONT FACE="Helvetica,Arial"><B>
Description: You are not allowed to access the document you requested.
</B></FONT>
<HR>
</BODY>
 
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/client.rb:714:in `parse_response'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/portal/portal_client.rb:45:in `teams'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/portal/ui/select_team.rb:51:in `select_team'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/portal/portal_client.rb:73:in `select_team'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/portal/spaceship.rb:43:in `select_team'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/spaceship/lib/spaceship/portal/spaceship.rb:107:in `select_team'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/cert/lib/cert/runner.rb:25:in `login'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/cert/lib/cert/runner.rb:34:in `run'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/cert/lib/cert/runner.rb:13:in `launch'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/actions/get_certificates.rb:17:in `run'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:261:in `block (2 levels) in execute_action'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:253:in `block in execute_action'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
  Fastfile:93:in `block (2 levels) in parsing_binding'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/lane.rb:33:in `call'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /workspace/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /workspace/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /workspace/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  /workspace/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
  /workspace/vendor/bundle/ruby/2.6.0/bundler/gems/fastlane-3f5ff3c7b1d8/bin/fastlane:23:in `<top (required)>'
  /workspace/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `load'
  /workspace/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in `<top (required)>'

This is on an older version of fastlane (2.141), but we’ve been able to reproduce it (again, sporadically) on newer versions as well.

@Soliy0u
Copy link

Soliy0u commented May 21, 2020

I have same this problem now. Any one can help me, please?. Thank so much.

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.14.6
Ruby 2.4.2
Bundler? true
Git git version 2.20.1 (Apple Git-117)
Installation Source ~/.rvm/gems/ruby-2.4.2/bin/fastlane
Host Mac OS X 10.14.6 (18G5027)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.4.2/lib
OpenSSL Version OpenSSL 1.1.1d 10 Sep 2019
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 10.3

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.1.0
executable-hooks 1.6.0
bundler-unload 1.0.2
rubygems-bundler 1.4.5
bundler 1.17.3
CFPropertyList 3.0.2
public_suffix 2.0.5
addressable 2.7.0
atomos 0.1.3
aws-eventstream 1.1.0
aws-partitions 1.317.0
aws-sigv4 1.1.3
jmespath 1.4.0
aws-sdk-core 3.96.1
aws-sdk-kms 1.31.0
aws-sdk-s3 1.65.0
babosa 1.0.3
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 1.7.10
commander-fastlane 4.4.6
declarative 0.0.10
declarative-option 0.1.0
digest-crc 0.5.1
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.5
emoji_regex 1.0.1
excon 0.73.0
multipart-post 2.0.0
faraday 1.0.1
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 1.0.0
fastimage 2.1.7
gh_inspector 1.1.3
jwt 2.1.0
memoist 0.16.2
multi_json 1.14.1
os 1.1.0
signet 0.14.0
googleauth 0.12.0
httpclient 2.8.3
mini_mime 1.0.2
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.38.0
google-cloud-env 1.3.1
google-cloud-errors 1.0.0
google-cloud-core 1.5.0
google-cloud-storage 1.26.1
json 2.3.0
mini_magick 4.10.1
multi_xml 0.6.0
plist 3.5.0
rubyzip 1.3.0
security 0.1.3
naturally 2.2.0
simctl 1.6.8
slack-notifier 2.3.2
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
tty-screen 0.7.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.2.6
xcodeproj 1.16.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.0

generated on: 2020-05-21

@ecamacho
Copy link
Contributor

@Arclite @NguyenPhong276 My PR to fix this issue was merged. It should be available in the next release, it would be nice if you can check that it works for you as well.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants