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 error for App containing an App Clip #17639

Open
3 of 4 tasks
EmDee opened this issue Nov 20, 2020 · 43 comments · May be fixed by #21180 or #22041
Open
3 of 4 tasks

Deliver error for App containing an App Clip #17639

EmDee opened this issue Nov 20, 2020 · 43 comments · May be fixed by #21180 or #22041

Comments

@EmDee
Copy link
Contributor

EmDee commented Nov 20, 2020

New Issue Checklist

Issue Description

Ran deliver this morning and got the following error:

The request cannot be fulfilled because of the state of another resource. - Submit for review errors found. The provided entity is missing a required relationship - You must provide a value for the relationship 'appClipVersion' with this request

It looks like the upload fails due to the app having an App Clip target. Is there a way to define the meta data needed for App Clips (screenshot, title, App Clip experiences, domains, ...)?

Command executed
deliver(
  reset_ratings: false,
  submit_for_review: true,
  automatic_release: false,
  phased_release: true,
  force: true, # Skip HTML report verification
  skip_screenshots: false,
  overwrite_screenshots: true,
  ignore_language_directory_validation: true,
  app_version: version_number,
  build_number: build_number,
  skip_binary_upload: true,
  skip_metadata: false,
  metadata_path: "./fastlane/metadata",
  submission_information: {
    add_id_info_uses_idfa: false
  }
)

Environment

I've redacted the fastfile and appfile as I don't think it's relevant for this issue.

🚫 fastlane environment 🚫

Stack

Key Value
OS 11.0.1
Ruby 2.6.3
Bundler? false
Git git version 2.24.3 (Apple Git-128)
Installation Source /usr/local/bin/fastlane
Host macOS 11.0.1 (20B29)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
OpenSSL Version LibreSSL 2.8.3
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.2

System Locale

Error
No Locale with UTF8 found 🚫

fastlane files:

fastlane gems

Gem Version Update-Status
fastlane 2.164.0 🚫 Update available

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-badge 1.4.0 ✅ Up-To-Date
fastlane-plugin-bugsnag 1.4.2 🚫 Update available
Loaded gems
Gem Version
did_you_mean 1.3.0
slack-notifier 2.3.2
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
terminal-table 1.8.0
plist 3.5.0
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
faraday_middleware 1.0.0
gh_inspector 1.1.3
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.0
uber 0.1.0
declarative-option 0.1.0
representable 3.0.4
retriable 3.1.2
mini_mime 1.0.2
httpclient 2.8.3
google-api-client 0.38.0
nanaimo 0.3.0
colored2 3.1.2
claide 1.0.3
CFPropertyList 3.0.2
atomos 0.1.3
xcodeproj 1.19.0
unicode-display_width 1.7.0
public_suffix 4.0.6
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
babosa 1.0.4
excon 0.78.0
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
ruby2_keywords 0.0.2
faraday 1.1.0
faraday-cookie_jar 0.0.7
fastimage 2.2.0
json 2.3.1
mini_magick 4.10.1
dotenv 2.7.6
bundler 1.17.3
naturally 2.2.0
simctl 1.6.8
jwt 2.2.2
declarative 0.0.20
multi_json 1.15.0
signet 0.14.0
os 1.1.1
memoist 0.16.2
googleauth 0.14.0
rake 13.0.1
digest-crc 0.6.1
google-cloud-errors 1.0.1
google-cloud-env 1.4.0
google-cloud-core 1.5.0
google-cloud-storage 1.29.1
emoji_regex 3.0.0
aws-eventstream 1.1.0
aws-sigv4 1.2.2
aws-partitions 1.384.0
jmespath 1.4.0
aws-sdk-core 3.109.1
aws-sdk-kms 1.39.0
aws-sdk-s3 1.83.1
forwardable 1.2.0
logger 1.3.0
stringio 0.0.2
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.1.0
strscan 1.0.0
date 2.0.0
fileutils 1.1.0
etc 1.0.1
io-console 0.4.7
zlib 1.0.0
libxml-ruby 3.1.0
rexml 3.1.9
psych 3.1.0
mutex_m 0.1.0
webrick 1.4.2
curb 0.9.10
badge 0.12.0
fastlane-plugin-badge 1.4.0
xml-simple 1.1.5
fastlane-plugin-bugsnag 1.4.2

generated on: 2020-11-20

@joshdholtz
Copy link
Member

@EmDee There is not at the moment but I will see what we can do for adding that 😊

@EmDee
Copy link
Contributor Author

EmDee commented Nov 20, 2020

@EmDee There is not at the moment but I will see what we can do for adding that 😊

Awesome! Thanks for all your amazing work here!

@EmDee
Copy link
Contributor Author

EmDee commented Nov 22, 2020

@joshdholtz It looks like the error only occurs the first time around. Subsequent uploads after I've added all the App Clips info in App Store Connect were successful.

@EmDee
Copy link
Contributor Author

EmDee commented Nov 27, 2020

I'll take the last statement back. For today's upload I got the same error again. The "advanced App Clip experiences" are persisted correctly across updates, but the "standard App Clip" (screenshot, title and action) need to be set with each new app update.

@EmDee
Copy link
Contributor Author

EmDee commented Dec 28, 2020

@fastlane-bot Nope, not fixed yet.

@joshdholtz
Copy link
Member

I'm going to add this on my list this/next week to figure out! I have never made an app clip before so I will have to get a project created with that inside of it first 😇

@EmDee
Copy link
Contributor Author

EmDee commented Feb 13, 2021

In case this might be helpful: The App Store Connect UI offers a way to use the existing metadata when submitting an app including App Clip.

image

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

@janicduplessis
Copy link
Contributor

@fastlane-bot Not fixed yet, mr. bot

@ainame
Copy link
Contributor

ainame commented Mar 26, 2021

I started looking at this error by using a sample app having App Clip. It looks like the app submission with metadata for App Clip updated "manually" just works on my end. I'm assuming as @EmDee mentioned #17639 (comment) this would be the case for now. (Let's hope this will be improved by WWDC 2021😇 )

Maybe we need to create additional behaviour in deliver, which uploads subtitle and header image for the App Clip.


🍎 has got "feature rich" app including App Clip I used this to test submission🙂
https://developer.apple.com/documentation/swiftui/fruta_building_a_feature-rich_app_with_swiftui

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@EmDee
Copy link
Contributor Author

EmDee commented Apr 28, 2021

@fastlane-bot not fixed.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@EmDee
Copy link
Contributor Author

EmDee commented Jun 27, 2021

@fastlane-bot Not fixed.

@ainame
Copy link
Contributor

ainame commented Jul 4, 2021

I've created a PR to add App Clips support to spaceship. #19043

@EmDee
Copy link
Contributor Author

EmDee commented Mar 12, 2022

@fastlane-bot Not done.

@gsavit
Copy link
Contributor

gsavit commented May 9, 2022

The problem is when deliver create new version, it doesn't take appClipDefaultExperience from previous version.

I think this is the crux of the issue, but to be clear it seems to be an shortcoming of the ASC API versus deliver itself. In contrast to the ASC UI, which does carry over the previous version's app clip default experience when you manually create a new version, creating a new version via the API does not carry over app clip data. (My team has experienced this hitting the API directly.)

There are some app clips related endpoints which seem to allow for creating a new app clip default experience using previous release's as a template and then attaching that to the new version, but still figuring out how that could work in practice.

@blesson3
Copy link

blesson3 commented May 17, 2022

I have a wip branch on my fork here. My goal is to add app clips default experience functionality. This not only fixes this error, but allows specifying app clip metadata (similar to how uploading normal app metadata works today).

It contains enough functionality for app clips to allow the following:

  • specify default experience action (PLAY, VIEW, ...)
  • specify localized subtitle
  • specify localized default experience header image

I will create a PR and comment here once it passes integration with my own projects.

If anyone wants to use it before I finish the implementation, point your Gemfile towards my repo https://github.com/qatonda/fastlane (matt/app-clips branch) and reference the following example code:

EDIT: Use the instructions in the PR #20300 to use/test until it's merged.

deliver(
  ...
  app_clip_default_experience_action: "PLAY",
  app_clip_default_experience_subtitle: {
    "en-US": "this is a test from fastlane",
    "es-MX": "está es una prueba de fastlane"
  },
  app_clip_header_images_path: './fastlane/app-clip-header-images'
)

and for the header images:

$ tree app-clip-header-images/
app-clip-header-images
├── en-US
│   └── random-header-image.jpg
└── es-MX
    └── another-header-image.jpg

2 directories, 2 files

@gsavit I'll consider adding a deliver option like use_previous_version_app_clip_metadata that uses the previous version's app clip metadata (or uses the templating option) and copies to it to the new version. Does that seem more useful than being able to specify metadata via fastlane?

@EmDee
Copy link
Contributor Author

EmDee commented May 18, 2022

@blesson3 Awesome to hear that!

I will give your branch a try this week!

@gsavit I'll consider adding a deliver option like use_previous_version_app_clip_metadata that uses the previous version's app clip metadata (or uses the templating option) and copies to it to the new version. Does that seem more useful than being able to specify metadata via fastlane?

Maybe we should go with overwrite_app_clip_metadata (since there is also a overwrite_screenshots), where the default value is false so it just takes the previous value?

@gsavit
Copy link
Contributor

gsavit commented May 18, 2022

@blesson3 super cool, thanks!

Maybe we should go with overwrite_app_clip_metadata (since there is also a overwrite_screenshots), where the default value is false so it just takes the previous value?

This sounds right to me, I think, especially given that the default behavior in ASC UI seems to be to use previous. So in other words, deliver could copy over previous by default, and optionally not do that if an option is passed in?

@blesson3
Copy link

blesson3 commented May 18, 2022

@EmDee @gsavit

Maybe we should go with overwrite_app_clip_metadata (since there is also a overwrite_screenshots), where the default value is false so it just takes the previous value?

This sounds right to me, I think, especially given that the default behavior in ASC UI seems to be to use previous. So in other words, deliver could copy over previous by default, and optionally not do that if an option is passed in?

For clarity:

  • overwrite_app_clip_metadata = false (default) means we should use the previous version's app clip metadata
  • overwrite_app_clip_metadata = true means we should use the metadata specified in the deliver command (subtitle, action, header image)

As far as I can tell, the only thing overwrite_screenshots = true does is delete the existing screenshots before uploading new ones. Maybe overwrite_app_clip_metadata should be more clearly named to reflect metadata carry-over between versions? Another way is to not use the extra flag using the strategy below.

Also: I can't find any functionality in the deliver command that's similar to the issue we're facing here. AFAIK screenshots are carried over by default between versions created by the ASC UI and API.


There are three scenarios I can think of:

  1. App has no app clip: there's no app clip metadata to process or carry over
    • fastlane does nothing
  2. App has one or more app clips and the app clip metadata is specified in the deliver command
    • fastlane uses the specified app clip metadata
  3. App has one or more app clips and the app clip metadata is NOT specified in the deliver command
    • fastlane carries over previous version's app clip metadata (or keeps ASC UI inputted app clip metadata for current version)

In the scenario where the app has an app clip, I think the app clip default experience metadata is required by ASC to submit the build for review (see screenshots in next comment). If that's the case, we either want to use the previous (or current if specified in ASC UI) version's metadata by default OR use fastlane's app clip metadata deliver options. This would solve the problem without an extra flag and would mimic the default behavior of the ASC UI by carrying over the metadata between versions.

If neither the previous version has an app clip metadata nor the user specified metadata, the build submitted for review will fail that check anyway, so it may reasonable to have fastlane output a warning, but not fail outright.

Is this a fair way of viewing this problem? My team and I are new to using app clips in ASC UI, so we may be missing something.

@blesson3
Copy link

Just tested and it looks like if the latest uploaded binary contains an app clip target the app clip default experience metadata (subtitle, action, and header image) are required to submit.

CleanShot 2022-05-18 at 11 16 02@2x

CleanShot 2022-05-18 at 11 17 23@2x

@gsavit
Copy link
Contributor

gsavit commented May 18, 2022

Just tested and it looks like if the latest uploaded binary contains an app clip target the app clip default experience metadata (subtitle, action, and header image) are required to submit.

This much is always true! But if you had a previously released version that also had the App Clip, creating your next version via the UI would copy over the previous metadata by default. Not illustrated by the screenshot because this is the first version, looks like.

If that's the case, we either want to use the previous (or current if specified in ASC UI) version's metadata by default OR use fastlane's app clip metadata deliver options. This would solve the problem without an extra flag and would mimic the default behavior of the ASC UI by carrying over the metadata between versions.

This sounds okay to me, especially because...

As far as I can tell, the only thing overwrite_screenshots = true does is delete the existing screenshots before uploading new ones. Maybe overwrite_app_clip_metadata should be more clearly named to reflect metadata carry-over between versions? Another way is to not use the extra flag using the strategy below.

You're right to flag the distinction between the cases. The screenshots overwrite flag is necessary because otherwise it's an additive operation, right (new screenshots uploaded will just join the preexisting ones)? Whereas App Clip metadata will always be overwritten/replaced by any new data passed. So the fix needed for App Clips is just correct handling of the default case, when no App Clip metadata is explicitly passed.

@blesson3
Copy link

You're right to flag the distinction between the cases. The screenshots overwrite flag is necessary because otherwise it's an additive operation, right (new screenshots uploaded will just join the preexisting ones)? Whereas App Clip metadata will always be overwritten/replaced by any new data passed. So the fix needed for App Clips is just correct handling of the default case, when no App Clip metadata is explicitly passed.

Yep, I agree! I'll include with my implementation the default case where there is an app clip, but no app clip metadata specified with deliver.

@EmDee
Copy link
Contributor Author

EmDee commented May 19, 2022

@blesson3 I've added your changes to our release script, which will run in about ~16h. Will report back if everything worked out.

@blesson3
Copy link

I've created a WIP PR #20300 for automating app clips default experience metadata. Please test using this PR instead of matt/app-clips on my forked repo. Direct any issues with those changes to the PR.

I'm in the process of implementing additional app clips related functionality on matt/app-clips, which I'll use as the nightly-version of my changes.

@blesson3
Copy link

@blesson3 I've added your changes to our release script, which will run in about ~16h. Will report back if everything worked out.

@EmDee If you've not already done so, use the matt/app-clips-default-experience branch and if you're already using it run bundle update fastlane to get the latest changes for the branch. I realized that if I force push to a branch, the bundle install with a Gemfile with an old ref pegged will fail the CI with the following error:

Revision 2fac95213b9eabcc395ba66be8c419f987d2c87d does not exist in the repository https://github.com/qatonda/fastlane.git. Maybe you misspelled it?

Pretty sure your setup from earlier will fail with the same error unless updated. I likely won't force push again today, so it should be safe-ish for your release tonight.

@EmDee
Copy link
Contributor Author

EmDee commented May 20, 2022

If you've not already done so, use the matt/app-clips-default-experience branch and if you're already using it run bundle update fastlane to get the latest changes for the branch. I realized that if I force push to a branch, the bundle install with a Gemfile with an old ref pegged will fail the CI with the following error:

I was already on matt/app-clips-default-experience, albeit on a previous commit of yours (55fb13119ff9b65c865977be6390ecd6cd738360), which worked fine AFAIKT. However, our pipe failed due to a different error, so I just updated fastlane to the latest commit of yours, and the pipe is running right now 🤞

@EmDee
Copy link
Contributor Author

EmDee commented Jun 3, 2022

Just a quick heads up: I've been unable to test these changes further, because ASC had trouble the last couple times processing the screenshots, therefore the deliver job would always fail. I'll report back as soon as that works for us again.

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@EmDee
Copy link
Contributor Author

EmDee commented Jul 8, 2022

@fastlane-bot not done

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@blesson3
Copy link

blesson3 commented Sep 8, 2022

@fastlane-bot not yet fixed

@fastlane-bot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@blesson3
Copy link

blesson3 commented Nov 8, 2022

@fastlane-bot almost done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment