fastlane / boarding

Instantly create a simple signup page for TestFlight beta testers
https://fastlane.tools
MIT License
877 stars 191 forks source link

Method not allowed #185

Closed jabeler closed 7 years ago

jabeler commented 7 years ago

We've had Boarding set up and working well for the last 2 months or so, however, all of the sudden it has started throwing Method Not Allowed errors when users attempt to sign up.

See attached.

screen shot 2017-11-15 at 4 17 11 pm
taquitos commented 7 years ago

Hey @jabeler, could you also paste the output from your logs/terminal?

phaseOne commented 7 years ago

Looks like the endpoint for https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/test_flight/client.rb#L167 may have changed to POST. Looking into this as well.

phaseOne commented 7 years ago

Confirmed that the user gets created at the app level, but the failure occurs when adding an existing user to a testing group via spaceship. I'll try swapping to POST and report back.

phaseOne commented 7 years ago

Changed to POST, but now getting a new error: Note: I've replaced the correct app id with REDACTED_APP_ID_HERE

Creating a new tester: test@example.com - Test User
#<Spaceship::Client::UnexpectedResponse: <?xml version="1.0" encoding="UTF-8"?>
<String>There is no route for the path 'user/internalTesters/REDACTED_APP_ID_HERE/'.</String>
>
/gems/gems/fastlane-2.53.1/spaceship/lib/spaceship/client.rb:588:in `parse_response'
/gems/gems/fastlane-2.53.1/spaceship/lib/spaceship/tunes/tunes_client.rb:1094:in `testers_by_app'
/gems/gems/fastlane-2.53.1/spaceship/lib/spaceship/tunes/tester.rb:121:in `all_by_app'
/gems/gems/fastlane-2.53.1/spaceship/lib/spaceship/tunes/tester.rb:129:in `find_by_app'
/boarding/app/services/boarding_service.rb:120:in `find_app_tester'
/boarding/app/services/boarding_service.rb:44:in `add_tester'
/boarding/app/controllers/invite_controller.rb:92:in `create_and_add_tester'
/boarding/app/controllers/invite_controller.rb:75:in `submit'
taquitos commented 7 years ago

If you look at the response from the actual web page, you can find a javascript file called manage_users_services.js, this has a bunch of end points defined (https://itunesconnect.apple.com/itc/js/ng-app/services/manage_users_services.b0586ced5d.js)

taquitos commented 7 years ago

Looks like Apple changed up their API 🙁

phaseOne commented 7 years ago

Trying to find a replacement endpoint for getting testers by appId. I think it's by groupId now: https://itunesconnect.apple.com/testflight/v2/providers/IDKWHATNUMBERTHISIS/apps/APPID/groups/GROUPID/testers?order=asc&sort=status

taquitos commented 7 years ago

yeah @phaseOne I think you're right, that comes from: https://itunesconnect.apple.com/olympus/v1/session

    "provider": {
        "providerId": <id>,
        "name": "<team name>",
        "contentTypes": ["SOFTWARE"]
    },

I think that's team_id in fastlane world

phaseOne commented 7 years ago

I think there's a helper somewhere that gets the correct groupId by ITC.apps.tf.labels.internalTesters?

taquitos commented 7 years ago

yeah, you can get a list of groups at https://itunesconnect.apple.com/testflight/v2/providers//apps//groups Then, you can use the group_id here: https://itunesconnect.apple.com/testflight/v2/providers//apps//groups//testerEmails Here are some new looking APIs: https://itunesconnect.apple.com/testflight/v2/providers//apps//platforms/ios/trains https://itunesconnect.apple.com/testflight/v2/providers//apps//platforms/ios/trains//builds

phaseOne commented 7 years ago

Might help us: https://itunesconnect.apple.com/itc/bower_components/tf/dist/tf.tidbits.min.ed87a3f149.js

ohayon commented 7 years ago

Working on some fixes for these issues here: https://github.com/fastlane/fastlane/pull/10921