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::UnauthorizedAccessError: Unauthorized Access thrown 8 hours after deployment #264

Open
abardallis opened this issue Apr 6, 2020 · 3 comments

Comments

@abardallis
Copy link

The issue:

We've deployed boarding to a Docker container hosted on our internal application platform and we are able to successfully add new Beta Testers after deployment.

However, after about 8 hours, users trying to sign up start to see the following error in the UI:

Something went wrong, please contact the application owner: Unauthorized Access

I checked the application logs after a failed sign up attempt and I see the following:

April 6th 2020, 09:59:14.101 | #<Spaceship::UnauthorizedAccessError: Unauthorized Access>
April 6th 2020, 09:59:14.101 | /usr/local/bundle/ruby/2.6.0/gems/fastlane-2.126.0/spaceship/lib/spaceship/client.rb:844:in `send_request'
April 6th 2020, 09:59:14.101 | /boarding/app/services/boarding_service.rb:57:in `block in add_tester'
April 6th 2020, 09:59:14.101 | Could not add (email address) to app: (our app name)

What I'd like to be able to do:

Deploy boarding in a way that doesn't require frequent maintenance to resolve these issues.

What I've tried:

  1. I've seen some chatter of 2FA being enabled having some impact on this, however, the ITC_USER specified is an App Manager role that does not have 2FA enabled so I don't believe this is related.
  2. I've also tried passing in a valid FASTLANE_SESSION (generated via command line) by setting
    export FASTLANE_SESSION=(the fastlane session) prior to bundle exec puma -C config/puma.rb being executed by our app platform. In doing so, I see Session loaded from environment variable is not valid. Continuing with normal login. in the application logs – Googling this leads me right back to the 2FA conversations.

I've also looked through the docs and seemingly related GitHub issues, however, I haven't been able to find anything conclusive.

Thanks in advance for your help in resolving this.

@rodgutierrez
Copy link

@abardallis did you ever find a solution to this?

@abardallis
Copy link
Author

@rodgutierrez not by using boarding unfortunately. Ended up just building out a sign up form and calling the App Store Connect API directly. This way the JWT token can be refreshed if needed prior to sending the POST to the /betaTesters endpoint.

Generating JWT tokens for App Store Connect

App Store Connect API docs

@rodgutierrez
Copy link

thank you @abardallis, this is helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants