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

fix: shorebird preview --app-id {flavor_id} downloads and runs wrong flavor on iOS #2549

Closed
AhmedLSayed9 opened this issue Oct 16, 2024 · 27 comments
Assignees
Labels
bug Something isn't working waiting for response Waiting for customer response

Comments

@AhmedLSayed9
Copy link

AhmedLSayed9 commented Oct 16, 2024

App ID: (2c13f029-59fa-4e67-a044-4e9ecf3e33d9)

Prerequisites

I've 3 flavors (Prod - Dev - Staging)

Steps To Reproduce:

  1. Release then run shorebird preview --app-id {flavor_id} with flavor_id of Dev or Staging
  2. It runs the correct flavor Dev/Staging.
  3. Release then run shorebird preview --app-id {flavor_id} with flavor_id of Prod
  4. It runs the correct flavor Prod.
  5. Run shorebird preview --app-id {flavor_id} with flavor_id of Dev or Staging again
  6. it somehow downloads and runs Prod flavor (even if it's deleted from Shorebird Console) and I can't preview Dev/Staging again.

It only occurs on iOS, while on Android it previews the correct flavor.

I've tested this on both simulator and real device and tested it on 2 different apps.

@AhmedLSayed9 AhmedLSayed9 added the bug Something isn't working label Oct 16, 2024
@eseidel
Copy link
Contributor

eseidel commented Oct 18, 2024

Thanks for the report, will look.

@felangel felangel self-assigned this Oct 18, 2024
@felangel
Copy link
Contributor

shorebird preview --app-id takes the actual app id not the flavor name (e.g Dev or Staging). Let me know if that helps!

@felangel felangel added the waiting for response Waiting for customer response label Oct 23, 2024
@AhmedLSayed9
Copy link
Author

shorebird preview --app-id takes the actual app id not the flavor name (e.g Dev or Staging). Let me know if that helps!

Yes I'm using the app id for the flavor (from shorebird.yaml), not the name itself.

@bryanoltman
Copy link
Contributor

Do you have this problem if you run shorebird preview without providing the --app-id? e.g., if you select dev or staging when prompted by the preview command, does it preview the flavor you select?

@AhmedLSayed9
Copy link
Author

Do you have this problem if you run shorebird preview without providing the --app-id? e.g., if you select dev or staging when prompted by the preview command, does it preview the flavor you select?

I didn't know that I'd be prompted If I didn't provide --app-id in advance. I'll try it now.

@bryanoltman
Copy link
Contributor

Interesting! Do you remember why you thought you needed to provide the --app-id argument? There might be a place in our docs that needs to be clarified

@AhmedLSayed9
Copy link
Author

Interesting! Do you remember why you thought you needed to provide the --app-id argument? There might be a place in our docs that needs to be clarified

https://docs.shorebird.dev/guides/flavors/android/#preview-the-release
https://docs.shorebird.dev/guides/flavors/ios/#preview-the-release

@bryanoltman
Copy link
Contributor

Interesting! Do you remember why you thought you needed to provide the --app-id argument? There might be a place in our docs that needs to be clarified

https://docs.shorebird.dev/guides/flavors/android/#preview-the-release https://docs.shorebird.dev/guides/flavors/ios/#preview-the-release

Awesome, thanks!

@AhmedLSayed9
Copy link
Author

Well, I tried not providing an --app-id argument and the issue still exists.

@AhmedLSayed9
Copy link
Author

AhmedLSayed9 commented Oct 23, 2024

What's interesting is that it doesn't install the current Prod version, but the version that matches the Dev version.

So, currently I've the following app flavors in the console:

  • Dev: 2.1.0+21
  • Prod: 2.1.1+22 & 2.1.2+23

When I select to preview the Dev flavor, it installs the Prod flavor of version 2.1.0+21, which is deleted from the console.

@bryanoltman
Copy link
Contributor

That definitely sounds like a bug. Let me see if I can reproduce this locally. If you remember the steps you took to get into this scenario, that would be super helpful.

Other things that would be helpful:

  1. Can you share your shorebird.yaml?
  2. Do you have the same flavors on both iOS and Android?

@AhmedLSayed9
Copy link
Author

AhmedLSayed9 commented Oct 23, 2024

Same steps at the issue.

my shorebird.yaml:

# This file is used to configure the Shorebird updater used by your app.
# Learn more at https://docs.shorebird.dev
# This file does not contain any sensitive information and should be checked into version control.

# Your app_id is the unique identifier assigned to your app.
# It is used to identify your app when requesting patches from Shorebird's servers.
# It is not a secret and can be shared publicly.
app_id: 2c13f029-59fa-4e67-a044-4e9ecf3e33d9
flavors:
  dev: 2c13f029-59fa-4e67-a044-4e9ecf3e33d9
  prod: f6ecdf28-3a7b-4599-95e6-9d0beede9d7c
  staging: 4a505f3c-9484-4153-8cc0-a3510be7f31c

# auto_update controls if Shorebird should automatically update in the background on launch.
# If auto_update: false, you will need to use package:shorebird_code_push to trigger updates.
# https://pub.dev/packages/shorebird_code_push
# Uncomment the following line to disable automatic updates.
auto_update: false

Yes, I've the same flavors for both platforms.

@bryanoltman
Copy link
Contributor

Same steps at the issue.

I meant steps to configure the project. I'm trying now, but in case it's not as simple as the following, it'd be good to konw.

  1. Create an app
  2. Add two flavors
  3. Create release 1.0.0+1 with flavorA
  4. Create release 1.0.0+2 with flavorB
  5. Run through the steps in the original issue

@AhmedLSayed9
Copy link
Author

That's enough to re-produce it.

@AhmedLSayed9
Copy link
Author

You can create same release 1.0.0+1 for both flavors.

@AhmedLSayed9
Copy link
Author

I think you have to create same release version for both flavors to be able to re-produce it.

@bryanoltman
Copy link
Contributor

Hmm, I did the following and was not able to reproduce:

  1. Create a new app with flutter create (add the xcode schemes, update the bundle identifier for those schemes, etc.)
  2. Follow the instructions on the flutter.dev website to add flavors to both iOS and Android (I used internal and stable)
  3. Create a release for internal (shorebird release ios --flavor internal)
  4. Change the theme color from the default purple to green
  5. Create a release for stable (shorebird release ios --flavor stable)
  6. Preview internal
  7. See the expected purple app
  8. Preview stable
  9. See the expected green app
  10. Preview internal
  11. See the expected purple app

What'd I miss?

@AhmedLSayed9
Copy link
Author

@bryanoltman Are you using same version 1.0.0+1 for both flavors?

@bryanoltman
Copy link
Contributor

Yep

@AhmedLSayed9
Copy link
Author

AhmedLSayed9 commented Oct 23, 2024

Can you try releasing with:

shorebird release ios -- --flavor={flavor}

That’s the only difference I can see.

@bryanoltman
Copy link
Contributor

Here's what I see:

⑆ shorebird release ios -- --flavor=internal
✓ Fetching apps (0.5s)
✓ Building ipa with Flutter 3.24.3 (5a6dc546e8) (76.9s)
✓ Fetching releases (0.1s)

🚀 Ready to create a new release!

📱 App: wrong_flavors (internal) (8d0e8b5d-1603-40b6-b80f-d420fed5309b)
🍧 Flavor: internal
📦 Release Version: 1.0.0+4
🕹️  Platform: ios
🐦 Flutter Version: 3.24.3 (5a6dc546e8)

Would you like to continue? (y/N) Yes
✓ Fetching releases (0.1s)
✓ Creating release (0.3s)
✓ Updating release status (0.1s)
✓ Uploading artifacts (12.3s)
✓ Updating release status (1.7s)

✅ Published Release 1.0.0+4!

Your next step is to upload your app to App Store Connect.

To upload to the App Store, do one of the following:
    1. Open build/ios/archive/Runner.xcarchive in Xcode and use the "Distribute App" flow.
    2. Drag and drop the build/ios/ipa/*.ipa bundle into the Apple Transporter macOS app (https://apps.apple.com/us/app/transporter/id1450874784).
    3. Run xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id.
       See "man altool" for details about how to authenticate with the App Store Connect API key.

To create a patch for this release, run shorebird patch --platforms=ios --flavor=internal --release-version=1.0.0+4

Note: shorebird patch --platforms=ios --flavor=internal without the --release-version option will patch the current version of the app.


bryanoltman@moltman ~/Documents/sandbox/wrong_flavors
⑆ shorebird release ios -- --flavor=stable
✓ Fetching apps (0.2s)
✓ Building ipa with Flutter 3.24.3 (5a6dc546e8) (68.0s)
✓ Fetching releases (0.2s)

🚀 Ready to create a new release!

📱 App: wrong_flavors (stable) (a485094f-f469-4235-a78e-b80f304afa6b)
🍧 Flavor: stable
📦 Release Version: 1.0.0+4
🕹️  Platform: ios
🐦 Flutter Version: 3.24.3 (5a6dc546e8)

Would you like to continue? (y/N) Yes
✓ Fetching releases (0.7s)
✓ Creating release (0.3s)
✓ Updating release status (0.1s)
✓ Uploading artifacts (12.2s)
✓ Updating release status (1.8s)

✅ Published Release 1.0.0+4!

Your next step is to upload your app to App Store Connect.

To upload to the App Store, do one of the following:
    1. Open build/ios/archive/Runner.xcarchive in Xcode and use the "Distribute App" flow.
    2. Drag and drop the build/ios/ipa/*.ipa bundle into the Apple Transporter macOS app (https://apps.apple.com/us/app/transporter/id1450874784).
    3. Run xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id.
       See "man altool" for details about how to authenticate with the App Store Connect API key.

To create a patch for this release, run shorebird patch --platforms=ios --flavor=stable --release-version=1.0.0+4

Note: shorebird patch --platforms=ios --flavor=stable without the --release-version option will patch the current version of the app.

bryanoltman@moltman ~/Documents/sandbox/wrong_flavors
⑆ cat shorebird.yaml
# This file is used to configure the Shorebird updater used by your app.
# Learn more at https://docs.shorebird.dev
# This file does not contain any sensitive information and should be checked into version control.

# Your app_id is the unique identifier assigned to your app.
# It is used to identify your app when requesting patches from Shorebird's servers.
# It is not a secret and can be shared publicly.
app_id: 8d0e8b5d-1603-40b6-b80f-d420fed5309b
flavors:
  internal: 8d0e8b5d-1603-40b6-b80f-d420fed5309b
  stable: a485094f-f469-4235-a78e-b80f304afa6b

# auto_update controls if Shorebird should automatically update in the background on launch.
# If auto_update: false, you will need to use package:shorebird_code_push to trigger updates.
# https://pub.dev/packages/shorebird_code_push
# Uncomment the following line to disable automatic updates.
# auto_update: false

bryanoltman@moltman ~/Documents/sandbox/wrong_flavors
⑆ shorebird preview --app-id 8d0e8b5d-1603-40b6-b80f-d420fed5309b
✓ Fetching releases (0.2s)
✓ Fetching releases (0.2s)
Which release would you like to preview?
❯ ◉  1.0.0+4
  ◯  1.0.0+2
Which release would you like to preview? 1.0.0+4
✓ Fetching runner artifact (0.1s)
✓ Downloading release (1.2s)
✓ Using production track (6ms)
✓ Using device Bryan Oltman’s iPhone (0.5s)
✓ Installing app (5.4s)
✓ Launching app (1.0s)
SANITY CHECK: Running precompiled code.
Using App.framework from /private/var/containers/Bundle/Application/56FC461B-5F11-4D4F-B05B-FFDD6363BD68/ios_1.0.0+4_456057.app/Frameworks/App.framework
ASSET PATH /var/containers/Bundle/Application/56FC461B-5F11-4D4F-B05B-FFDD6363BD68/ios_1.0.0+4_456057.app/Frameworks/App.framework/flutter_assets
release_version changed 1.0.0+2 -> 1.0.0+4, creating new state
[INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
Reporting launch start.
[INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
Sending patch check request: PatchCheckRequest { app_id: "8d0e8b5d-1603-40b6-b80f-d420fed5309b", channel: "stable", release_version: "1.0.0+4", platform: "ios", arch: "aarch64" }
[INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
Reporting successful launch.
base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
Update thread finished with status: No update
^C

bryanoltman@moltman ~/Documents/sandbox/wrong_flavors
⑆ shorebird preview --app-id a485094f-f469-4235-a78e-b80f304afa6b
✓ Fetching releases (0.2s)
✓ Fetching releases (0.2s)
Which release would you like to preview?
❯ ◉  1.0.0+4
  ◯  1.0.0+3
Which release would you like to preview? 1.0.0+4
✓ Fetching runner artifact (0.1s)
✓ Downloading release (1.3s)
✓ Using production track (7ms)
✓ Using device Bryan Oltman’s iPhone (0.1s)
✓ Installing app (2.1s)
✓ Launching app (0.6s)
SANITY CHECK: Running precompiled code.
Using App.framework from /private/var/containers/Bundle/Application/F624F10F-D10A-42CD-819E-4C80543ECFDF/ios_1.0.0+4_456076.app/Frameworks/App.framework
ASSET PATH /var/containers/Bundle/Application/F624F10F-D10A-42CD-819E-4C80543ECFDF/ios_1.0.0+4_456076.app/Frameworks/App.framework/flutter_assets
release_version changed 1.0.0+3 -> 1.0.0+4, creating new state
[INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
Reporting launch start.
[INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
Sending patch check request: PatchCheckRequest { app_id: "a485094f-f469-4235-a78e-b80f304afa6b", channel: "stable", release_version: "1.0.0+4", platform: "ios", arch: "aarch64" }
[INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
Reporting successful launch.
base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
Update thread finished with status: No update
^C

bryanoltman@moltman ~/Documents/sandbox/wrong_flavors
⑆ shorebird preview --app-id 8d0e8b5d-1603-40b6-b80f-d420fed5309b
✓ Fetching releases (0.2s)
✓ Fetching releases (0.2s)
Which release would you like to preview?
❯ ◉  1.0.0+4
  ◯  1.0.0+2
Which release would you like to preview? 1.0.0+4
✓ Fetching runner artifact (0.1s)
✓ Using production track (17ms)
✓ Using device Bryan Oltman’s iPhone (0.1s)
✓ Installing app (1.1s)
✓ Launching app (0.5s)
SANITY CHECK: Running precompiled code.
Using App.framework from /private/var/containers/Bundle/Application/02EB4C21-66E3-4785-8274-8941F6F46E7C/ios_1.0.0+4_456057.app/Frameworks/App.framework
ASSET PATH /var/containers/Bundle/Application/02EB4C21-66E3-4785-8274-8941F6F46E7C/ios_1.0.0+4_456057.app/Frameworks/App.framework/flutter_assets
[INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
Reporting launch start.
[INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
Sending patch check request: PatchCheckRequest { app_id: "8d0e8b5d-1603-40b6-b80f-d420fed5309b", channel: "stable", release_version: "1.0.0+4", platform: "ios", arch: "aarch64" }
[INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
Reporting successful launch.
base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
Update thread finished with status: No update
^C

Everything looks good (note the app IDs in the PatchCheckRequest)

@AhmedLSayed9
Copy link
Author

AhmedLSayed9 commented Oct 24, 2024

Weird. I've tried with a new flutter project and I still can re-produce it.

Here's the exact steps I've done:

  1. Create a new flutter project (the default template).

  2. Add new 2 schemes from Xcode (prod, dev).

  3. Duplicate the default build configurations for each new scheme and then delete the default ones (not necessary):
    Screenshot 2024-10-24 at 8 31 07 AM

  4. Update each scheme to match the build configurations already created:
    Screenshot 2024-10-24 at 8 34 17 AM
    Screenshot 2024-10-24 at 8 34 35 AM

  5. Change the Product Bundle Identifier & Product Name to differentiate between schemes:
    Screenshot 2024-10-24 at 8 38 18 AM

  6. Update the Bundle Display Name value to $(PRODUCT_NAME) at info.plist:
    Screenshot 2024-10-24 at 8 40 26 AM

  7. Add the following to build.gradle & AndroidManifest.xml at Android (This is just to avoid creating a 3rd non-flavor app flavors at shorebird console):
    Screenshot 2024-10-24 at 9 12 53 AM
    Screenshot 2024-10-24 at 9 13 24 AM

  8. Update the following lines at main.dart to differentiate between the two flavors:

    colorScheme:
               ColorScheme.fromSeed(seedColor: appFlavor == 'dev' ? Colors.green : Colors.blue),
    // and
    home: const MyHomePage(title: 'Flutter Demo Home Page [$appFlavor]'),
  9. Run shorebird init (Using Shorebird 1.4.1):

    Log
    ✓ Fetching organizations (0.4s)
    ✓ 2 product flavors detected: (1.8s)
      - dev
      - prod
    ? How should we refer to this app? (flavors) flavors
    
    🐦 Shorebird initialized successfully!
    
    ✅ A shorebird app has been created.
    ✅ A "shorebird.yaml" has been created.
    ✅ The "pubspec.yaml" has been updated to include "shorebird.yaml" as an asset.
    
    Reference the following commands to get started:
    
    📦 To create a new release use: "shorebird release".
    🚀 To push an update use: "shorebird patch".
    👀 To preview a release use: "shorebird preview".
    
    For more information about Shorebird, visit https://shorebird.dev
    ✓ Shorebird is up-to-date (1.5s)
      [!] A new version of shorebird is available! Run `shorebird upgrade` to upgrade.
    ✓ Flutter install is correct (2.4s)
    ✓ AndroidManifest.xml files contain INTERNET permission (3ms)
    ✓ Has access to api.shorebird.dev (0.2s)
    ✓ Has access to storage.googleapis.com (0.2s)
    ✓ shorebird.yaml found in pubspec.yaml assets (4ms)
    1 issue detected.
    
    A new version of shorebird is available!
    Run shorebird upgrade to upgrade.
    
  10. Now I've the following shorebird.yaml & apps at Shorebird Console:

    # This file is used to configure the Shorebird updater used by your app.
    # Learn more at https://docs.shorebird.dev
    # This file does not contain any sensitive information and should be checked into version control.
    
    # Your app_id is the unique identifier assigned to your app.
    # It is used to identify your app when requesting patches from Shorebird's servers.
    # It is not a secret and can be shared publicly.
    app_id: 2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2
    flavors:
      dev: 2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2
      prod: 97b50bd8-b76e-4a88-9a0e-7a570cabfb10
    
    # auto_update controls if Shorebird should automatically update in the background on launch.
    # If auto_update: false, you will need to use package:shorebird_code_push to trigger updates.
    # https://pub.dev/packages/shorebird_code_push
    # Uncomment the following line to disable automatic updates.
    # auto_update: false
    
    Screenshot 2024-10-24 at 9 17 24 AM
  11. Run shorebird release ios --flavor dev:

    Log
    ✓ Fetching apps (0.4s)
    ✓ Building ipa with Flutter 3.24.3 (5a6dc546e8) (186.0s)
    ✓ Fetching releases (0.4s)
    
    🚀 Ready to create a new release!
    
    📱 App: flavors (dev) (2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2)
    🍧 Flavor: dev
    📦 Release Version: 1.0.0+1
    🕹️  Platform: ios
    🐦 Flutter Version: 3.24.3 (5a6dc546e8)
    
    Would you like to continue? (y/N) Yes
    ✓ Fetching releases (0.3s)
    ✓ Creating release (0.6s)
    ✓ Updating release status (0.3s)
    ✓ Uploading artifacts (286.9s)
    ✓ Updating release status (2.2s)
    
    ✅ Published Release 1.0.0+1!
    
    Your next step is to upload your app to App Store Connect.
    
    To upload to the App Store, do one of the following:
        1. Open build/ios/archive/Flavors-Dev.xcarchive in Xcode and use the "Distribute App" flow.
        2. Drag and drop the build/ios/ipa/*.ipa bundle into the Apple Transporter macOS app (https://apps.apple.com/us/app/transporter/id1450874784).
        3. Run xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id.
           See "man altool" for details about how to authenticate with the App Store Connect API key.
    
    To create a patch for this release, run shorebird patch --platforms=ios --flavor=dev --release-version=1.0.0+1
    
    Note: shorebird patch --platforms=ios --flavor=dev without the --release-version option will patch the current version of the app.
    
    
    A new version of shorebird is available!
    Run shorebird upgrade to upgrade.
    
  12. Run shorebird release ios --flavor prod:

    Log
    ✓ Fetching apps (0.4s)
    ✓ Building ipa with Flutter 3.24.3 (5a6dc546e8) (151.0s)
    ✓ Fetching releases (0.5s)
    
    🚀 Ready to create a new release!
    
    📱 App: flavors (prod) (97b50bd8-b76e-4a88-9a0e-7a570cabfb10)
    🍧 Flavor: prod
    📦 Release Version: 1.0.0+1
    🕹️  Platform: ios
    🐦 Flutter Version: 3.24.3 (5a6dc546e8)
    
    Would you like to continue? (y/N) Yes
    ✓ Fetching releases (0.2s)
    ✓ Creating release (0.6s)
    ✓ Updating release status (0.2s)
    ✓ Uploading artifacts (260.3s)
    ✓ Updating release status (2.3s)
    
    ✅ Published Release 1.0.0+1!
    
    Your next step is to upload your app to App Store Connect.
    
    To upload to the App Store, do one of the following:
        1. Open build/ios/archive/Flavors-Dev.xcarchive in Xcode and use the "Distribute App" flow.
        2. Drag and drop the build/ios/ipa/*.ipa bundle into the Apple Transporter macOS app (https://apps.apple.com/us/app/transporter/id1450874784).
        3. Run xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey your_api_key --apiIssuer your_issuer_id.
           See "man altool" for details about how to authenticate with the App Store Connect API key.
    
    To create a patch for this release, run shorebird patch --platforms=ios --flavor=prod --release-version=1.0.0+1
    
    Note: shorebird patch --platforms=ios --flavor=prod without the --release-version option will patch the current version of the app.
    
  13. I've both apps uploaded to Shorebird Console:
    Screenshot 2024-10-24 at 9 45 51 AM

  14. Now, here is a recorded try of shorebird preview for both flavors after releasing them:

    Screen.Recording.2024-10-24.at.9.49.10.AM.mp4
    Dev Preview Log
    Which app flavor? dev
    ✓ Fetching releases (0.9s)
    ✓ Fetching releases (0.9s)
    Which release would you like to preview? 1.0.0+1
    ✓ Fetching runner artifact (0.3s)
    ✓ Downloading release (6.6s)
    ✓ Using production track (11ms)
    ✓ Using device Ahmed’s iPhone (0.3s)
    ✓ Installing app (6.1s)
    ✓ Launching app (3.4s)
    SANITY CHECK: Running precompiled code.
    Using App.framework from /private/var/containers/Bundle/Application/8A412845-CCE1-439B-A8AA-EFF749FBB7EF/ios_1.0.0+1_456536.app/Frameworks/App.framework
    ASSET PATH /var/containers/Bundle/Application/8A412845-CCE1-439B-A8AA-EFF749FBB7EF/ios_1.0.0+1_456536.app/Frameworks/App.framework/flutter_assets
    [INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
    Reporting launch start.
    [INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
    Sending patch check request: PatchCheckRequest { app_id: "2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2", channel: "stable", release_version: "1.0.0+1", platform: "ios", arch: "aarch64" }
    [INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
    Reporting successful launch.
    base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
    Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
    Update thread finished with status: No update
    SANITY CHECK: Running precompiled code.
    Using App.framework from /private/var/containers/Bundle/Application/B4A8EEBA-7998-4E32-B9FE-C297E1926EDD/ios_1.0.0+1_456546.app/Frameworks/App.framework
    ASSET PATH /var/containers/Bundle/Application/B4A8EEBA-7998-4E32-B9FE-C297E1926EDD/ios_1.0.0+1_456546.app/Frameworks/App.framework/flutter_assets
    [INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
    Reporting launch start.
    [INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
    Sending patch check request: PatchCheckRequest { app_id: "2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2", channel: "stable", release_version: "1.0.0+1", platform: "ios", arch: "aarch64" }
    [INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
    Reporting successful launch.
    base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
    Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
    Update thread finished with status: No update
    
    Prod Preview Log
    Which app flavor? prod
    ✓ Fetching releases (0.5s)
    ✓ Fetching releases (0.5s)
    Which release would you like to preview? 1.0.0+1
    ✓ Fetching runner artifact (0.4s)
    ✓ Downloading release (5.6s)
    ✓ Using production track (7ms)
    ✓ Using device Ahmed’s iPhone (0.3s)
    ✓ Installing app (4.8s)
    ✓ Launching app (2.2s)
    SANITY CHECK: Running precompiled code.
    Using App.framework from /private/var/containers/Bundle/Application/B4A8EEBA-7998-4E32-B9FE-C297E1926EDD/ios_1.0.0+1_456546.app/Frameworks/App.framework
    ASSET PATH /var/containers/Bundle/Application/B4A8EEBA-7998-4E32-B9FE-C297E1926EDD/ios_1.0.0+1_456546.app/Frameworks/App.framework/flutter_assets
    [INFO:flutter/shell/common/shorebird/shorebird.cc(161)] Shorebird updater: no active patch.
    Reporting launch start.
    [INFO:flutter/shell/common/shorebird/shorebird.cc(184)] Starting Shorebird update
    Sending patch check request: PatchCheckRequest { app_id: "2939f2e4-55d1-412f-ae7b-34ee0f9ad1a2", channel: "stable", release_version: "1.0.0+1", platform: "ios", arch: "aarch64" }
    [INFO:flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm(243)] CPU::Id(): simarm64
    Reporting successful launch.
    base_app_snapshot_instructions or base_app_snapshot_data is set but no link table is available, ignoring base snapshot.
    Patch check response: PatchCheckResponse { patch_available: false, patch: None, rolled_back_patch_numbers: Some([]) }
    Update thread finished with status: No update
    

This time I'm stuck with always getting dev flavor previewed. Note when previewing prod the app id in the PatchCheckRequest matches the dev instead of the prod flavor.

@bryanoltman
Copy link
Contributor

Can you share the project you created? A link to a github repo would be super helpful

@AhmedLSayed9
Copy link
Author

Can you share the project you created? A link to a github repo would be super helpful

https://github.com/AhmedLSayed9/flavors

@bryanoltman
Copy link
Contributor

Thank you! I'm able to reproduce. This looks like an issue with shorebird release, as the shorebird.yaml that gets packaged with the prod build has the wrong app ID. This was super helpful, investigating now.

@bryanoltman
Copy link
Contributor

This should be fixed in version 1.4.6. Thanks for the repro sample—not sure we would've been able to track down the issue without it!

@AhmedLSayed9
Copy link
Author

This should be fixed in version 1.4.6. Thanks for the repro sample—not sure we would've been able to track down the issue without it!

Glad to hear! Thanks for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for response Waiting for customer response
Projects
Status: Done
Development

No branches or pull requests

4 participants