fastlane: [snapshot] Incorrect resolutions for new devices
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
iPad Pro 12.9" snapshots are 2 pixels off, causing failure to upload to App Store Connect:
[!] Unsupported screen size [2048, 2730] for path './fastlane/screenshots/en-US/iPad Pro (12.9-inch)-01. Home Screen.png'
From the Apple docs:
2048 x 2732 pixels for portrait
Complete output when running fastlane, including the stack trace and command used
My apologies, but --capture_output did nothing when I tried it, neither copying to pasteboard nor writing any files ¯\(ツ)/¯ Here is the terminal output of the snapshot run instead:
$> rbenv exec bundle exec fastlane upload_screenshots [✔] 🚀 [09:49:19]: ------------------------------ [09:49:19]: --- Step: default_platform --- [09:49:19]: ------------------------------ [09:49:19]: Driving the lane 'ios upload_screenshots' 🚀 [09:49:19]: --------------------------------- [09:49:19]: --- Step: upload_to_app_store --- [09:49:19]: --------------------------------- [09:49:20]: Login to App Store Connect (andrew@tworingsoft.com) [09:49:29]: Login successful±-------------------------------------±------------------------------+ | deliver 2.107.0 Summary | ±-------------------------------------±------------------------------+ | skip_binary_upload | true | | skip_metadata | true | | screenshots_path | ./fastlane/screenshots | | metadata_path | ./fastlane/metadata | | username | | | app_identifier | | | platform | ios | | edit_live | false | | use_live_version | false | | skip_screenshots | false | | skip_app_version_update | false | | force | false | | overwrite_screenshots | false | | submit_for_review | false | | reject_if_possible | false | | automatic_release | false | | phased_release | false | | team_id | | | dev_portal_team_id | | | run_precheck_before_submit | true | | precheck_default_rule_level | warn | | ignore_language_directory_validation | false | | precheck_include_in_app_purchases | true | ±-------------------------------------±------------------------------+
±-----------------±-----------------------+ | Lane Context | ±-----------------±-----------------------+ | DEFAULT_PLATFORM | ios | | PLATFORM_NAME | ios | | LANE_NAME | ios upload_screenshots | ±-----------------±-----------------------+ [09:49:38]: Unsupported screen size [2048, 2730] for path ‘./fastlane/screenshots/en-US/iPad Pro (12.9-inch)-01. Home Screen.png’
±-----±--------------------±------------+ | fastlane summary | ±-----±--------------------±------------+ | Step | Action | Time (in s) | ±-----±--------------------±------------+ | 1 | default_platform | 0 | | 💥 | upload_to_app_store | 18 | ±-----±--------------------±------------+
[09:49:38]: fastlane finished with errors
[!] Unsupported screen size [2048, 2730] for path ‘./fastlane/screenshots/en-US/iPad Pro (12.9-inch)-01. Home Screen.png’ make: *** [upload_screenshots] Error 1
Environment
✅ fastlane environment ✅
Stack
| Key | Value |
|---|---|
| OS | 10.14 |
| Ruby | 2.5.1 |
| Bundler? | true |
| Git | git version 2.18.0 |
| Installation Source | |
| Host | Mac OS X 10.14 (18A391) |
| Ruby Lib Dir | ~/.rbenv/versions/2.5.1/lib |
| OpenSSL Version | OpenSSL 1.0.2p 14 Aug 2018 |
| Is contained | false |
| Is homebrew | false |
| Is installed via Fabric.app | false |
| Xcode Path | /Applications/Xcode10/Xcode.app/Contents/Developer/ |
| Xcode Version | 10.0 |
System Locale
| Variable | Value | |
|---|---|---|
| LANG | en_US.UTF-8 | ✅ |
| LC_ALL | ||
| LANGUAGE |
fastlane files:
`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:ios)
platform :ios do
desc "Generate new localized screenshots"
lane :screenshots do
# reset all simulators from https://gist.github.com/ZevEisenberg/5a172662cb576872d1ab
sh 'osascript -e \'tell application "iOS Simulator" to quit\''
sh 'osascript -e \'tell application "Simulator" to quit\''
sh 'xcrun simctl erase all'
capture_screenshots(workspace: "", scheme: "")
end
desc "Upload screenshots to iTunes connect"
lane :upload_screenshots do
upload_to_app_store(skip_binary_upload: true, skip_metadata: true)
end
end
`./fastlane/Appfile`
app_identifier("") # The bundle identifier of your app
apple_id("") # Your Apple email address
itc_team_id("") # iTunes Connect Team ID
team_id("") # Developer Portal Team ID
# For more information about the Appfile, see:
# https://docs.fastlane.tools/advanced/#appfile
fastlane gems
| Gem | Version | Update-Status |
|---|---|---|
| fastlane | 2.107.0 | ✅ Up-To-Date |
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
| Gem | Version |
|---|---|
| did_you_mean | 1.2.0 |
| bundler | 1.16.6 |
| CFPropertyList | 3.0.0 |
| public_suffix | 2.0.5 |
| addressable | 2.5.2 |
| atomos | 0.1.3 |
| babosa | 1.0.2 |
| claide | 1.0.2 |
| colored | 1.2 |
| colored2 | 3.1.2 |
| highline | 1.7.10 |
| commander-fastlane | 4.4.6 |
| declarative | 0.0.10 |
| declarative-option | 0.1.0 |
| unf_ext | 0.0.7.5 |
| unf | 0.1.4 |
| domain_name | 0.5.20180417 |
| dotenv | 2.5.0 |
| emoji_regex | 0.1.1 |
| excon | 0.62.0 |
| multipart-post | 2.0.0 |
| faraday | 0.15.3 |
| http-cookie | 1.0.3 |
| faraday-cookie_jar | 0.0.6 |
| faraday_middleware | 0.12.2 |
| fastimage | 2.1.4 |
| gh_inspector | 1.1.3 |
| jwt | 2.1.0 |
| memoist | 0.16.0 |
| multi_json | 1.13.1 |
| os | 1.0.0 |
| signet | 0.11.0 |
| googleauth | 0.6.7 |
| httpclient | 2.8.3 |
| mime-types-data | 3.2018.0812 |
| mime-types | 3.2.2 |
| uber | 0.1.0 |
| representable | 3.0.4 |
| retriable | 3.1.2 |
| google-api-client | 0.23.9 |
| json | 2.1.0 |
| mini_magick | 4.5.1 |
| multi_xml | 0.6.0 |
| plist | 3.4.0 |
| rubyzip | 1.2.2 |
| security | 0.1.3 |
| naturally | 2.2.0 |
| simctl | 1.6.5 |
| slack-notifier | 2.3.2 |
| terminal-notifier | 1.8.0 |
| unicode-display_width | 1.4.0 |
| terminal-table | 1.8.0 |
| tty-screen | 0.6.5 |
| tty-cursor | 0.6.0 |
| tty-spinner | 0.8.0 |
| word_wrap | 1.0.0 |
| nanaimo | 0.2.6 |
| xcodeproj | 1.7.0 |
| rouge | 2.0.7 |
| xcpretty | 0.3.0 |
| xcpretty-travis-formatter | 1.0.0 |
generated on: 2018-10-29
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 58 (25 by maintainers)
I can confirm that this fixed the issue for me.
This is good 👍🏼
“Suboptimal code” in the snapshot helper that nobody can remember why it was written that way 😉
In
SnapshotHelper.swiftI changedto
and that solves the issue for me, the odd 2 pixels etc. Not sure changing this could cause other issues but works in my case!
I got the same problem with iPhone Xs Max, snapshot produce screenshot size: [1241, 2688] and could not use in frame it. I try with manual screenshot using simulator and it out exact [1242 2688]. This is latest version 2.123.0. Is Google abandon this project? It is 7 months without any fix.
I’ve got some fun input for you guys.
I’ve got a project where this occurs; both the off-by-2 pixels thing (iPad Pro 12.9, 2g) and other sizes (iPad Pro 12.9, 3g) that are way off (2613x1960), and one project where the screens are generated perfectly.
The snapfiles have no meaningful differences that I can see.
Still no fix for this one?
@janpio I see, I can confirm that deliver did skip them when uploading. All good here! Apologies for the confusion!
Jan asked me to comment in here, after another issue I raised. Have had this issue and variations of it since 2017. https://github.com/fastlane/fastlane/issues/10259
Using snapshot with device type Ipad 2nd or 3rd gen will result in generated images with incorrect sizes. The 3rd gen ones are way off, the 2nd gen ones are 2 pixels off.
Environment
✅ fastlane environment ✅
Stack
System Locale
fastlane files:
No Fastfile found
No Appfile found
fastlane gems
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
generated on: 2019-01-22
I am uploading the screenshot straight from
snapshot.Ok, I understood the iPhone XR problem and created a new issue for it: https://github.com/fastlane/fastlane/issues/14067 Please move all further discussion about the iPhone XR problem to this issue - this is a very different problem.