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

[deliver] fix deliver download screenshot file extension #16719

Merged

Conversation

joshdholtz
Copy link
Member

Motivation and Context

Fixes issue reported by @changusmc (#16639 (comment))

Description

  • Extension file grabbing code was bad
    • Replaced with proper way to get extension

Testing Steps

gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "joshdholtz-2.150.0-fix-deliver-download-extension"

@changusmc
Copy link

I'm running it right now, I downloaded all the images using this branch and i'm re-uploading them.

It's been stuck for over 30 minutes.

[09:26:12]: Uploading 'fastlane/metadata_to_test/da/0_APP_IPAD_PRO_129_0.**********.png'...
.

@joshdholtz
Copy link
Member Author

@changusmc App Store Connect might be having some processing issues 😔 They've been a bit up and down about processing images times and image uploads now wait for processing to be complete by default (debating if I want to keep it that way).

But you can set the DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true environment variable which skips the wait for processing to complete 😇


The reason this was added is because processing on all screenshots need to be complete before the app is submitted.

@changusmc
Copy link

Got it, I think in terms of this PR, we're good to go because I was failing in the "remove all previous screenshots" step.

@joshdholtz
Copy link
Member Author

Thanks so much for working with me on these issues! I really appreciate the time you spent helping. I'd give you a 🏆 if I could.

@changusmc
Copy link

Absolutely, I'm happy to help!

@changusmc
Copy link

After almost 2 hours, the run finished and it errorred for the same reason

DEBUG [11:06:37]: << GET appScreenshots/***: 200 {"data"=>{"type"=>"appScreenshots", "id"=>"***", "attributes"=>{"fileSize"=>1354637, "fileName"=>"0_IMESSAGE_APP_IPAD_PRO_3GEN_129_0.ftl_d6e265d912c9f2e07860f8c52e5a785b_1_ipadPro129_1.0x0ss.jpg", "sourceFileChecksum"=>nil, "imageAsset"=>nil, "assetToken"=>"PurpleSource114/v4/a8/51/58/a851586f-830a-1b14-9635-da951ae23cbf/***_0_IMESSAGE_APP_IPAD_PRO_3GEN_129_0.ftl_d6e265d912c9f2e07860f8c52e5a785b_1_ipadPro129_1.0x0ss.jpg", "assetType"=>"SCREENSHOT", "uploadOperations"=>[{"method"=>"PUT", "url"=>"https://store-037.blobstore.apple.com/itmspod11-assets-massilia-037001/PurpleSource114%2Fv4%2Fa8%2F51%2F58%2Fa851586f-830a-1b14-9635-da951ae23cbf%2FB4qS0z7vNn0_YCzDgaChrPGAqkgOajK75qemTiiN4Bg_U003d-1593626793351?uploadId=98ba5080-bbc5-11ea-bd50-b8599fef42ed&Signature=OljksNuQdg4w4IVMjRhrF713J4o%3D&AWSAccessKeyId=MKIA9HA11I4FU8DC7S5M&partNumber=1&Expires=1594231593", "length"=>1354637, "offset"=>0, "requestHeaders"=>[{"name"=>"Content-Type", "value"=>"image/jpg"}]}], "assetDeliveryState"=>{"errors"=>[{"code"=>"IMAGE_BAD_FILE_EXTENSION", "description"=>"IMAGE_BAD_FILE_EXTENSION"}], "warnings"=>nil, "state"=>"FAILED"}, "uploaded"=>nil}, "relationships"=>{"appScreenshotSet"=>{"links"=>{"self"=>"https://appstoreconnect.apple.com/iris/v1/appScreenshots/***/relationships/appScreenshotSet", "related"=>"https://appstoreconnect.apple.com/iris/v1/appScreenshots/***/appScreenshotSet"}}}, "links"=>{"self"=>"https://appstoreconnect.apple.com/iris/v1/appScreenshots/***"}}, "links"=>{"self"=>"https://appstoreconnect.apple.com/iris/v1/appScreenshots/***"}}

@joshdholtz
Copy link
Member Author

@changusmc What is the full name of the file it was uploading? Was it 0_IMESSAGE_APP_IPAD_PRO_3GEN_129_0.ftl_d6e265d912c9f2e07860f8c52e5a785b_1_ipadPro129_1.0x0ss.jpg?

@changusmc
Copy link

@changusmc What is the full name of the file it was uploading? Was it 0_IMESSAGE_APP_IPAD_PRO_3GEN_129_0.ftl_d6e265d912c9f2e07860f8c52e5a785b_1_ipadPro129_1.0x0ss.jpg?

Yup that is correct.. let me try the download_screenshots command again in a clean folder to be sure where it's coming from

@joshdholtz
Copy link
Member Author

@changusmc Yeah yeah, I did clean up the naming of the files that get downloaded so maybe that might help. I'm going to try uploading something with that name to see if I get that same error 🙃

@joshdholtz
Copy link
Member Author

@changusmc I was able to upload something with that same file name so I don't think it was that 😔

@joshdholtz
Copy link
Member Author

Ohhhh, I think a clean folder is what is needed! It was downloading them as PNGs but with the JPG extension. I shouldn't have assumed everything was a PNG at first 🤦

@changusmc
Copy link

Yea i downloaded them to a clean folder and it looks like deliver is grabbing the jpgs

[11:27:13]: Downloading existing screenshot '0_IMESSAGE_APP_IPAD_PRO_3GEN_129_0.0x0ss.jpg' for language 'uk'
[11:27:14]: Downloading existing screenshot '1_IMESSAGE_APP_IPAD_PRO_3GEN_129_1.0x0ss (1).jpg' for language 'uk'
[11:27:15]: Downloading existing screenshot '2_IMESSAGE_APP_IPAD_PRO_3GEN_129_2.0x0ss (2).jpg' for language 'uk'
[11:27:15]: Downloading existing screenshot '3_IMESSAGE_APP_IPAD_PRO_3GEN_129_3.0x0ss (3).jpg' for language 'uk'
[11:27:16]: Downloading existing screenshot '4_IMESSAGE_APP_IPAD_PRO_3GEN_129_4.0x0ss (4).jpg' for language 'uk'

What should I do now?

@joshdholtz
Copy link
Member Author

@changusmc That should be good! They are actually jpgs this time. They had jpg extension before but were actually pngs 😇 If you want to try uploading them that would be 💯

@changusmc
Copy link

I turned off processing, and it's currently running, 50 minutes and counting.

@joshdholtz
Copy link
Member Author

🤞 😬 🤞

@changusmc
Copy link

It worked!

|                fastlane summary                 |
+------+----------------------------+-------------+
| Step | Action                     | Time (in s) |
+------+----------------------------+-------------+
| 1    | opt_out_usage              | 0           |
| 2    | Verifying fastlane version | 0           |
| 3    | default_platform           | 0           |
| 4    | deliver                    | 4234        |
+------+----------------------------+-------------+

[13:00:33]: fastlane.tools just saved you 71 minutes! 🎉

@joshdholtz
Copy link
Member Author

YESSSSSSSS... Thank you so much again! ❤️

@joshdholtz joshdholtz merged commit 12c2b25 into 2.150.0 Jul 1, 2020
@joshdholtz joshdholtz deleted the joshdholtz-2.150.0-fix-deliver-download-extension branch July 1, 2020 20:44
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>
@fastlane-bot
Copy link

Hey @joshdholtz 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

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>
@fastlane fastlane locked and limited conversation to collaborators Sep 25, 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