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] increase timeout for web session connect api to 1200 #16676

Merged

Conversation

joshdholtz
Copy link
Member

Motivation and Context

Prevent some timeouts?

Description

Another way to hopefully prevent some timeouts along with the retry

@joshdholtz joshdholtz merged commit d608f42 into 2.150.0 Jun 25, 2020
@joshdholtz joshdholtz deleted the joshdholtz-2.150.0-update-web-session-connect-api-timeout branch June 25, 2020 13:09
Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.150.0.rc2 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.150.0.rc5 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.150.0.rc6 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.150.0.rc7 🚀

joshdholtz pushed a commit that referenced this pull request Jul 1, 2020
…ct API endpoints (#16640)

* [deliver][produce][spaceship] Update to use new App Store Connect API endpoints (#16626)

* Initial commit

* Fixed ensuring version at start of deliver and selecting build at the end

* Added error message for submission not working yet

* Big fix for screenshots and fix for erroring out when not able to activate language

* Removal of unused things and fix for explicitly submitting build

* Fix for circular reference

* Fix for first screenshot

* content_rights_contains_third_party_content works for submission information

* Updated comment

* Quick fix

* This should fix all bad state issues

* Removed UI from spaceship

* fixed submit stuff

* Updating categories works holy cow

* I think all meta data is working

* Whoops. had submit for review commented out

* Allowed rejected apps to be edit and only send up whatsNew if live version

* rubocop is happy

* So many fixes

* Fixed validate doc and lint

* Fixed and commented out some tests

* Added in age rating

* ruocoped

* Adding back in IDFA because i dont know where it went

* Fix produce for app store connect

* Removed some pp

* One extra line

* Update to ConnectAPI usage

Adding authorization and retrieving list of apps / find specific app.

* [2.150.0][deliver] better error when uses non exempt encryption not set (#16646)

* [deliver] fix for better error on uses non exempt encryption

* New error messages and fixes of wrong things being set

* [2.150.0][deliver] fix category deleting when not specified (#16652)

* [deliver] fix category from deleting when not specified

* Warn users of deprecated mapped categories

* Updated some doc

* [deliver] warn about mapped/deprecated age rating values (#16655)

* [deliver] warn about mapped/deprecated age rating values

* Full in on https

* Lots of fixes whoops

Co-authored-by: Max Ott <max.ott@me.com>

* [deliver][produce] map language names and available countries on app (#16656)

* [deliver][produce] map language names and available countries on app

* Fix price match and remove comment

* [deliver] allow default language for metadata (#16657)

* [action] fix set_changelog (#16658)

* [deliver][spaceship] multi-thread delete screenshots and retry on 504 (#16667)

* [deliver][spaceship] multi-thread delete screenshots and retry on 504

* Improved error handling

* Fix tests

* [spaceship] add app preview (#16671)

* [spaceship] add app preview

* Added new preview devices

* [spaceship] increase timeout for web session connect api to 1200 (#16676)

* Version bump 2.150.0.rc2

* Fix to make produce create on ASC work again

* [spaceship] waiting_for_review is editable (ish) (#16680)

* [spaceship] waiting_for_review is editable (ish)

* Added for app store version too

* [spaceship] retry file uploader and poll app preview to set frame (#16684)

* [spaceship] retry file uploader and poll app preview to set frame

* Some doc cleanup

* Handle fail logic if patch retries on file upload and fix mapping of age category

* Raise error if all failed

* [spaceship][fastlane_core] run itmstransporter with xcrun if xcode 11 or up (#16689)

* [deliver][spaceship] fix 500 with appInfos and skip already uploaded screenshots with deliver (#16694)

* Version bump to 2.150.0.rc4

* [produce][spaceship] add users to app when created (#16695)

* [produce][spaceship] add users to app when created

* Also add company name

* Updated docs on how to use submission (#16706)

* [deliver][spaceship] wait for screenshots to be completed after processing and download properly formatted screenshots and error on processing error (#16709)

* [deliver][spaceship] choose highest edit version, retry on 500, submit without app version (#16713)

* 2.150.0.rc5 bump

* [deliver] give better error message when edit or live version is not found when downloading screenshots (#16714)

* 2.150.0.rc6 bump

* [deliver] fix first version logic now uses number of versions, reject_if_possible, and automatic_release_date uses ms again (#16715)

* [deliver] fix first version logic now uses number of versions

* Fix deliver reject and fix automatic release date to use time in ms

* 2.150.0.rc7 bump

* [spaceship] reorder app screenshots in AppScreenshotSet (#16718)

* [deliver] fix deliver download screenshot file extension (#16719)

* [deliver] fix deliver download screenshot file extension

* Updated how skip waiting for processing works

* [deliver] fix language detection on upload meta data (#16722)

* Reset version to 2.149.0

* Fix for broken review attachment

Co-authored-by: Max Ott <max.ott@me.com>
minuscorp pushed a commit to minuscorp/fastlane that referenced this pull request Jul 18, 2020
…ct API endpoints (fastlane#16640)

* [deliver][produce][spaceship] Update to use new App Store Connect API endpoints (fastlane#16626)

* Initial commit

* Fixed ensuring version at start of deliver and selecting build at the end

* Added error message for submission not working yet

* Big fix for screenshots and fix for erroring out when not able to activate language

* Removal of unused things and fix for explicitly submitting build

* Fix for circular reference

* Fix for first screenshot

* content_rights_contains_third_party_content works for submission information

* Updated comment

* Quick fix

* This should fix all bad state issues

* Removed UI from spaceship

* fixed submit stuff

* Updating categories works holy cow

* I think all meta data is working

* Whoops. had submit for review commented out

* Allowed rejected apps to be edit and only send up whatsNew if live version

* rubocop is happy

* So many fixes

* Fixed validate doc and lint

* Fixed and commented out some tests

* Added in age rating

* ruocoped

* Adding back in IDFA because i dont know where it went

* Fix produce for app store connect

* Removed some pp

* One extra line

* Update to ConnectAPI usage

Adding authorization and retrieving list of apps / find specific app.

* [2.150.0][deliver] better error when uses non exempt encryption not set (fastlane#16646)

* [deliver] fix for better error on uses non exempt encryption

* New error messages and fixes of wrong things being set

* [2.150.0][deliver] fix category deleting when not specified (fastlane#16652)

* [deliver] fix category from deleting when not specified

* Warn users of deprecated mapped categories

* Updated some doc

* [deliver] warn about mapped/deprecated age rating values (fastlane#16655)

* [deliver] warn about mapped/deprecated age rating values

* Full in on https

* Lots of fixes whoops

Co-authored-by: Max Ott <max.ott@me.com>

* [deliver][produce] map language names and available countries on app (fastlane#16656)

* [deliver][produce] map language names and available countries on app

* Fix price match and remove comment

* [deliver] allow default language for metadata (fastlane#16657)

* [action] fix set_changelog (fastlane#16658)

* [deliver][spaceship] multi-thread delete screenshots and retry on 504 (fastlane#16667)

* [deliver][spaceship] multi-thread delete screenshots and retry on 504

* Improved error handling

* Fix tests

* [spaceship] add app preview (fastlane#16671)

* [spaceship] add app preview

* Added new preview devices

* [spaceship] increase timeout for web session connect api to 1200 (fastlane#16676)

* Version bump 2.150.0.rc2

* Fix to make produce create on ASC work again

* [spaceship] waiting_for_review is editable (ish) (fastlane#16680)

* [spaceship] waiting_for_review is editable (ish)

* Added for app store version too

* [spaceship] retry file uploader and poll app preview to set frame (fastlane#16684)

* [spaceship] retry file uploader and poll app preview to set frame

* Some doc cleanup

* Handle fail logic if patch retries on file upload and fix mapping of age category

* Raise error if all failed

* [spaceship][fastlane_core] run itmstransporter with xcrun if xcode 11 or up (fastlane#16689)

* [deliver][spaceship] fix 500 with appInfos and skip already uploaded screenshots with deliver (fastlane#16694)

* Version bump to 2.150.0.rc4

* [produce][spaceship] add users to app when created (fastlane#16695)

* [produce][spaceship] add users to app when created

* Also add company name

* Updated docs on how to use submission (fastlane#16706)

* [deliver][spaceship] wait for screenshots to be completed after processing and download properly formatted screenshots and error on processing error (fastlane#16709)

* [deliver][spaceship] choose highest edit version, retry on 500, submit without app version (fastlane#16713)

* 2.150.0.rc5 bump

* [deliver] give better error message when edit or live version is not found when downloading screenshots (fastlane#16714)

* 2.150.0.rc6 bump

* [deliver] fix first version logic now uses number of versions, reject_if_possible, and automatic_release_date uses ms again (fastlane#16715)

* [deliver] fix first version logic now uses number of versions

* Fix deliver reject and fix automatic release date to use time in ms

* 2.150.0.rc7 bump

* [spaceship] reorder app screenshots in AppScreenshotSet (fastlane#16718)

* [deliver] fix deliver download screenshot file extension (fastlane#16719)

* [deliver] fix deliver download screenshot file extension

* Updated how skip waiting for processing works

* [deliver] fix language detection on upload meta data (fastlane#16722)

* Reset version to 2.149.0

* Fix for broken review attachment

Co-authored-by: Max Ott <max.ott@me.com>
@Thangaraj-M
Copy link

@joshdholtz
When uploading screenshot with deliver, there was timeout issue occurred. Due to this extra empty screenshot is uploaded to store. Can you say how to increase the timeout value? below is the log.

INFO [2020-07-21 07:54:42.12]: Uploading 8 screenshots for language en-US
INFO [2020-07-21 07:54:42.20]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-CardDetails.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:54:48.71]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-MerchantsAlert.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:54:53.89]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-MerchantsControl.png'...
Timeout received! Retrying after 3 seconds (remaining: 4)...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:57:02.53]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-SpendLimitControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:57:07.20]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-CardDetails.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:57:12.88]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-MerchantsAlert.png'...
Timeout received! Retrying after 3 seconds (remaining: 4)...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:59:19.30]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-MerchantsControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:59:24.24]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-SpendLimitControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 07:59:29.04]: �[32mSuccessfully uploaded screenshots to App Store Connect�[0m

Below is the empty file shows in the appstore.
empty

@Thangaraj-M
Copy link

@joshdholtz
There was timeout error occurred at the time of uptate placeholder of screenshot by the function Spaceship::ConnectAPI.post_app_screenshot in app_screenshot.rb. After that it retry again and another placeholder created and file is uploaded. Due to this empty placeholder is showing in the appstore. Can you please check this?
app_screenshot rb

@joshdholtz
Copy link
Member Author

@Thangaraj-M Can you try setting ENV["SPACESHIP_TIMEOUT"] = 1500 and let me know if you see any different behavior? It looks like the file uploader code is still using 300 as the default where the rest of the Connect API is using 1200. If that works for you and I can change that default.

Thanks!

@Thangaraj-M
Copy link

@joshdholtz I will try with increase the timeout.

@Thangaraj-M
Copy link

@joshdholtz I tried again with increase the spaceship timeout value with 1500. But still Timeout error occurred. below is the log.
It looks the timeout occurred in the placeholder update API. The timeout occurred within 2 minutes.

INFO [2020-07-21 20:00:38.90]: Uploading 8 screenshots for language en-US
INFO [2020-07-21 20:00:38.91]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-CardDetails.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:00:44.30]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-MerchantsAlert.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:00:48.79]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-MerchantsControl.png'...
Timeout received! Retrying after 3 seconds (remaining: 4)...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:02.41]: Uploading 'fastlane/output/screenshots/en-US/iPhone 7 Plus-SpendLimitControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:05.75]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-CardDetails.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:10.60]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-MerchantsAlert.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:14.40]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-MerchantsControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:18.75]: Uploading 'fastlane/output/screenshots/en-US/iPhone XS Max-SpendLimitControl.png'...
Uploading file (part 1)...
Uploading complete!
INFO [2020-07-21 20:03:23.18]: Successfully uploaded screenshots to App Store Connect

@Thangaraj-M
Copy link

@joshdholtz The timeout issue occurred at the time of distributing build also. So the whats new value is not updated. below is the log. Here within 2 minutes 5 times retry happened.
INFO [2020-07-21 06:53:51.14]: �[32mSuccessfully finished processing the build 3.10.1 - 13 for IOS�[0m
INFO [2020-07-21 06:55:48.16]: �[32mSuccessfully set the changelog for build�[0m
INFO [2020-07-21 06:55:49.22]: Distributing new build to testers: 3.10.1 - 13
Timeout received! Retrying after 3 seconds (remaining: 4)...
Timeout received! Retrying after 3 seconds (remaining: 3)...
Timeout received! Retrying after 3 seconds (remaining: 2)...
Timeout received! Retrying after 3 seconds (remaining: 1)...
Timeout received! Retrying after 3 seconds (remaining: 0)...
call_with_defaults Exception is... Server error got 500
Logger: Upload to testflight lane completed 2020-07-21 06:57:54.928

@Thangaraj-M
Copy link

@joshdholtz It looks the timeout value is not taken from SPACESHIP_TIMEOUT variable. Could you please say what is wrong?

@joshdholtz
Copy link
Member Author

@Thangaraj-M Can you give this PR a try? #16912

@Thangaraj-M
Copy link

@joshdholtz I will try this and update the result.

@Thangaraj-M
Copy link

@joshdholtz I updated from the branch and checked again. There was timeout occurred at the time distributing build. Not sure it running from the latest updated branch or the old one. Is there any way to check the build running from new branch or existing one? In the summary it showing 2.152.0 only.
�[32mdeliver 2.152.0 Summary�[0m

@joshdholtz
Copy link
Member Author

@Thangaraj-M The contents of your Gemfile.lock should show the fastlane as being remote and should have the URL in there. Also, can we move this conversation into the PR? 😇

@Thangaraj-M
Copy link

yes. I will reply in that PR

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

Successfully merging this pull request may close these issues.

None yet

4 participants