fastlane: Deliver fails to delete screenshots that don't yet exist when overwrite_screenshots is true
Noticing an issue with how deliver is sending along screenshots. Looking through issues saw lots of activity around screenshots recently such as #17346, #16972, and #16842, but nothing that directly correlated.
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
- Create a new version release in the app store connect
- add screenshots to
fastlane/screenshotsdirectory - Run
deliverwithoverwrite_screenshotsset to true - Receive error message:
[!] Failed verification of all screenshots deleted... ### screenshot(s) still exist. Note the number indicated - go to app store connect and confirm that no screenshots are present for the release
- go to
fastlane/screenshotsdirectory - confirm that number of screenshots present equals count noted in prior step
Command executed
deliver(
ipa: "[REDACTED]",
primary_category: "[REDACTED]",
secondary_category: "[REDACTED]",
overwrite_screenshots: true,
force: true
)
Complete output when running fastlane, including the stack trace and command used
[14:16:40]: --------------------- [14:16:40]: --- Step: deliver --- [14:16:40]: --------------------- [14:16:40]: Login to App Store Connect [REDACTED] [14:16:41]: Login successful±-------------------------------------±---------------------------------------------------------------+ | deliver 2.162.0 Summary | ±-------------------------------------±---------------------------------------------------------------+ | ipa | [REDACTED] | | primary_category | [REDACTED] | | secondary_category | [REDACTED] | | overwrite_screenshots | true | | force | true | | app_identifier | [REDACTED] | | screenshots_path | ./fastlane/screenshots | | metadata_path | ./fastlane/metadata | | app_version | 4.0.1 | | username | [REDACTED] | | platform | ios | | edit_live | false | | use_live_version | false | | skip_binary_upload | false | | skip_screenshots | false | | skip_metadata | false | | skip_app_version_update | false | | submit_for_review | false | | reject_if_possible | false | | automatic_release | false | | phased_release | false | | reset_ratings | false | | run_precheck_before_submit | true | | precheck_default_rule_level | warn | | ignore_language_directory_validation | false | | precheck_include_in_app_purchases | true | ±-------------------------------------±---------------------------------------------------------------+
[14:16:43]: Making sure the latest version on App Store Connect matches ‘4.0.1’… [14:16:44]: ‘4.0.1’ is the latest version on App Store Connect [14:16:44]: Loading ‘./fastlane/metadata/en-US/description.txt’… [14:16:44]: Loading ‘./fastlane/metadata/en-US/keywords.txt’… [14:16:44]: Loading ‘./fastlane/metadata/en-US/support_url.txt’… [14:16:44]: Loading ‘./fastlane/metadata/en-US/marketing_url.txt’… [14:16:44]: Loading ‘./fastlane/metadata/en-US/promotional_text.txt’… [14:16:44]: Loading ‘./fastlane/metadata/en-US/privacy_url.txt’… [14:16:44]: Loading ‘./fastlane/metadata/copyright.txt’… [14:16:44]: Loading ‘./fastlane/metadata/review_information/first_name.txt’… [14:16:44]: Loading ‘./fastlane/metadata/review_information/last_name.txt’… [14:16:44]: Loading ‘./fastlane/metadata/review_information/phone_number.txt’… [14:16:46]: Will begin uploading metadata for ‘4.0.1’ on App Store Connect [14:16:46]: Uploading metadata to App Store Connect for version [14:16:49]: Uploading app review information to App Store Connect [14:16:51]: Will begin uploading snapshots for ‘4.0.1’ on App Store Connect [14:16:51]: Starting with the upload of screenshots… [14:16:54]: Number of screenshots not deleted: 35 [14:16:54]: Failed to delete all screenshots… Tries remaining: 4 [14:16:55]: Number of screenshots not deleted: 35 [14:16:55]: Failed to delete all screenshots… Tries remaining: 3 [14:16:55]: Number of screenshots not deleted: 35 [14:16:55]: Failed to delete all screenshots… Tries remaining: 2 [14:16:56]: Number of screenshots not deleted: 35 [14:16:56]: Failed to delete all screenshots… Tries remaining: 1 [14:16:57]: Number of screenshots not deleted: 35 [14:16:57]: Reporting build status error for lane: deploy_prod_ios [14:16:57]: Backtrace: [“/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane_core/lib/fastlane_core/ui/interface.rb:141:in
user_error!'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:inmethod_missing’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:104:indelete_screenshots'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:107:indelete_screenshots’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:107:indelete_screenshots'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:107:indelete_screenshots’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:107:indelete_screenshots'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/upload_screenshots.rb:36:inupload’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/runner.rb:146:inupload_metadata'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/deliver/lib/deliver/runner.rb:54:inrun’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/actions/upload_to_app_store.rb:17:inrun'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:263:inblock (2 levels) in execute_action’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:inexecute_action'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:255:inblock in execute_action’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:229:inchdir'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:229:inexecute_action’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:157:intrigger_action_by_name'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/fast_file.rb:159:inmethod_missing’”, “Fastfile:446:inblock in parsing_binding'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/lane.rb:33:incall’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:204:intry_switch_to_lane'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:146:intrigger_action_by_name’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/fast_file.rb:159:inmethod_missing'", "Fastfile:722:inblock in parsing_binding’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/lane.rb:33:incall'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:49:inblock in execute’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:45:inchdir'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/runner.rb:45:inexecute’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/lane_manager.rb:47:incruise_lane'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/command_line_handler.rb:36:inhandle’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/commands_generator.rb:108:inblock (2 levels) in run'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:incall’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:inrun'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:inrun_active_command’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:inrun!'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:inrun!'”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/commands_generator.rb:352:inrun'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/commands_generator.rb:41:instart’”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:intake_off'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/gems/fastlane-2.162.0/bin/fastlane:23:in<top (required)>'”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/bin/fastlane:23:inload'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/bin/fastlane:23:in<main>'”, “/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:ineval'", "/Users/[REDACTED]/jenkins/workspace/[REDACTED]/vendor/bundle/ruby/2.6.0/bin/ruby_executable_hooks:24:in<main>'”] [14:16:57]: No error info available. Returning the exception as message [14:16:57]: Failed verification of all screenshots deleted… 35 screenshot(s) still exist
Environment
🚫 fastlane environment 🚫
Stack
| Key | Value |
|---|---|
| OS | 10.15.7 |
| Ruby | 2.6.3 |
| Bundler? | true |
| Git | git version 2.24.3 (Apple Git-128) |
| Installation Source | ~/.rvm/rubies/ruby-2.6.3/bin/fastlane |
| Host | Mac OS X 10.15.7 (19H2) |
| Ruby Lib Dir | ~/.rvm/rubies/ruby-2.6.3/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 | 12.0.1 |
System Locale
| Error |
|---|
| No Locale with UTF8 found 🚫 |
fastlane files:
`./Fastfile`
# [REDACTED LANES]
lane :deploy_prod_ios do |options|
# Redacted setup steps including build & screenshot generation
deliver(
ipa: "[REDACTED]",
primary_category: "[REDACTED]",
secondary_category: "[REDACTED]",
overwrite_screenshots: true,
force: true
)
# Other redacated steps
end
No Appfile found
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.162.0 | ✅ Up-To-Date |
Loaded fastlane plugins:
| Plugin | Version | Update-Status |
|---|---|---|
| fastlane-plugin-cryptex | 0.1.5 | ✅ Up-To-Date |
| fastlane-plugin-android_change_package_identifier | 0.1.0 | ✅ Up-To-Date |
| fastlane-plugin-android_change_string_app_name | 0.1.1 | ✅ Up-To-Date |
| fastlane-plugin-msbuild | 0.1.4 | ✅ Up-To-Date |
| fastlane-plugin-souyuz | 0.9.1 | ✅ Up-To-Date |
| fastlane-plugin-appicon | 0.15.0 | ✅ Up-To-Date |
| fastlane-plugin-xml_editor | 0.2.0 | ✅ Up-To-Date |
| fastlane-plugin-unzip | 1.0.1 | ✅ Up-To-Date |
| fastlane-plugin-appcenter | 1.9.0 | ✅ Up-To-Date |
| fastlane-plugin-automated_test_emulator_run | 1.6.0 | ✅ Up-To-Date |
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.3.0 |
| executable-hooks | 1.6.0 |
| bundler-unload | 1.0.2 |
| rubygems-bundler | 1.4.5 |
| bundler | 2.1.4 |
| rake | 13.0.1 |
| CFPropertyList | 3.0.2 |
| public_suffix | 4.0.6 |
| addressable | 2.7.0 |
| atomos | 0.1.3 |
| aws-eventstream | 1.1.0 |
| aws-partitions | 1.379.0 |
| aws-sigv4 | 1.2.2 |
| jmespath | 1.4.0 |
| aws-sdk-core | 3.109.0 |
| aws-sdk-kms | 1.39.0 |
| aws-sdk-s3 | 1.82.0 |
| babosa | 1.0.3 |
| claide | 1.0.3 |
| colored | 1.2 |
| colored2 | 3.1.2 |
| highline | 1.7.10 |
| commander | 4.4.6 |
| commander-fastlane | 4.4.6 |
| declarative | 0.0.20 |
| declarative-option | 0.1.0 |
| digest-crc | 0.6.1 |
| unf_ext | 0.0.7.7 |
| unf | 0.1.4 |
| domain_name | 0.5.20190701 |
| dotenv | 2.7.6 |
| emoji_regex | 3.0.0 |
| excon | 0.76.0 |
| multipart-post | 2.0.0 |
| faraday | 1.0.1 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.7 |
| faraday_middleware | 1.0.0 |
| fastimage | 2.2.0 |
| gh_inspector | 1.1.3 |
| jwt | 2.2.2 |
| memoist | 0.16.2 |
| multi_json | 1.15.0 |
| os | 1.1.1 |
| signet | 0.14.0 |
| googleauth | 0.13.1 |
| 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.3 |
| google-cloud-errors | 1.0.1 |
| google-cloud-core | 1.5.0 |
| google-cloud-storage | 1.29.0 |
| json | 2.3.1 |
| mini_magick | 4.10.1 |
| plist | 3.3.0 |
| rubyzip | 2.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.8.1 |
| tty-cursor | 0.7.1 |
| tty-spinner | 0.9.3 |
| word_wrap | 1.0.0 |
| nanaimo | 0.3.0 |
| xcodeproj | 1.18.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| xcpretty-travis-formatter | 1.0.0 |
| fastlane-plugin-android_change_package_identifier | 0.1.0 |
| mini_portile2 | 2.3.0 |
| nokogiri | 1.8.5 |
| fastlane-plugin-android_change_string_app_name | 0.1.1 |
| fastlane-plugin-appcenter | 1.9.0 |
| fastlane-plugin-appicon | 0.15.0 |
| fastlane-plugin-automated_test_emulator_run | 1.6.0 |
| fastlane-plugin-cryptex | 0.1.5 |
| fastlane-plugin-msbuild | 0.1.4 |
| souyuz | 0.9.1 |
| fastlane-plugin-souyuz | 0.9.1 |
| fastlane-plugin-unzip | 1.0.1 |
| fastlane-plugin-xml_editor | 0.2.0 |
| simple_oauth | 0.3.1 |
generated on: 2020-10-05
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 22 (9 by maintainers)
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 👍
I keep getting this error on fastlane version 2.164.0.
@ainame
I think both options work for me 😄 If option 2 is easier because of pre-existing behaviour, then I would say we have a winner.
Something that would additionally help us a lot would be to get some more logs around the filtering part, as to understand better which screenshots ware not delated.
BTW: I’m really sorry for not being able to help you our here with a PR of my own. The Contributors Agreement is standing in my way 😞 It shouldn’t be a problem to get it signed, but nothing is easy when legal is involved.
@ianbytchek
Glad to hear that you figured out your issue. Hope you are okay with it now🤞 Regarding your suggestion, it would be definitely possible to implement, I guess.
Since I’m not a core contributor at all, I can decide nothing for new functionalities. You should create a feature request ticket. If the spec is fixed and people agree with it, I can pick it up to implement.
Unlike metadata’s
defaultsupport, the union of both default and a language’s screenshots are likely to be undesirable. So the only thing it benefits is just that you can set a directory name todefault. However, the downside of it that I can think of is that it requires validation for directory names to avoid edge cases and it might be confused for even developers and its locale can’t be recognised unless you preview the image.For example, if the screenshots directory has duplicated directory named same as the
defaultlocale, let’s say there aredefaultanden-USdirectories and the default locale isen-US,delivershould fail in that case. I think that kind of discussion should happen before adding a new behaviour😄Thanks for reporting this and investigating @dlakes-hx!
Hey @ainame, this is apparently the same thing I mentioned in #16972. I changed the default locale from en-GB to en-US awhile ago and looks like that’s precisely what causes the issue as you guys have established. I think one bit that can be improved if
screenshotscould supportdefaultlocale like metadata does. My metadata looks like follows and when I upload it fastlane reports the following:This is very neat, effectively I guess I should get rid of en-US symlink and not rely on manually specifying the locale. However, trying the same approach with screenshots I get something like
locale "default" is not supported.So, can screenshots support
defaultlocale? What do you think?@ainame It looks like this may be a matter of “fixed the bug”.
Our builds have a shared workspace, so I think when you asked about the directory structure last time I must have been seeing structure from a subsequent build, and not realized it.
I bumped up logging on the call, and it appears for that particular build, the directory is:
fastlane/screenshots. However it has no contents, including the localizationen-USfolder.So odds are the overwrites/deletes were failing before, the system was just swallowing it. We’ll update our process to only toggle
overwrite_screenshotswhen there’s something in the directory.I’m personally happy to close this one out. Thanks so much for your help sorting the minor functionality change and my boneheaded overlook @ainame !
Tagging the screenshot 🥷 here: @ainame 😇