shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.2k stars 131 forks source link

Patch failing for flutter 3.22 with ERR : The current Dart SDK version is 3.2.3. #2114

Closed maheshj01 closed 3 months ago

maheshj01 commented 3 months ago

App ID: (insert your app ID here)

Description

The patch is failing when building with latest version of flutter 3.22, please find the complete logs below

logs log.txt

Additionally you can see the workflow logs here https://github.com/maheshmnj/vocabhub/actions/runs/9105732960/job/25031796434

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots

Looks like after the patch succeeds with 3.22 its still creating a patch with old version of flutter

image
flutter doctor -v ``` ✓] Flutter (Channel stable, 3.22.0, on macOS 14.3.1 23D60 darwin-arm64, locale en-IN) • Flutter version 3.22.0 on channel stable at /Users/mahesh/Development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5dcb86f68f (7 days ago), 2024-05-09 07:39:20 -0500 • Engine revision f6344b75dc • Dart version 3.4.0 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4) • Android SDK at /Users/mahesh/Library/Android/sdk • Platform android-34, build-tools 33.0.0-rc4 • ANDROID_HOME = /Users/mahesh/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS (Xcode 15.0.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15A507 ✗ Unable to get list of installed Simulator runtimes. • CocoaPods version 1.14.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) [✓] IntelliJ IDEA Community Edition (version 2021.2.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 61.2.4 • Dart plugin version 212.5080.8 [✓] VS Code (version 1.86.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.88.0 [✓] Connected device (3 available) • macOS (desktop) • macos • darwin-arm64 • macOS 14.3.1 23D60 darwin-arm64 • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.3.1 23D60 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.202 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```
shorebird doctor ``` mahesh@Maheshs-MacBook-Air-M1-3 vocabhub % shorebird doctor -v Shorebird 1.1.6 • git@github.com:shorebirdtech/shorebird.git Flutter 3.22.0 • revision 6d047e401941206daf11740c523ffa3364a2385b Engine • revision c600950be82dcdad6a46da46bcc6e73773ca3907 Android Toolchain • Android Studio: /Applications/Android Studio.app/Contents • Android SDK: /Users/mahesh/Library/Android/sdk • ADB: /Users/mahesh/Library/Android/sdk/platform-tools/adb • JAVA_HOME: /Applications/Android Studio.app/Contents/jbr/Contents/Home ✓ Shorebird is up-to-date (2.1s) ✓ Flutter install is correct (1.1s) ✓ AndroidManifest.xml files contain INTERNET permission (90ms) ✓ Has access to storage.googleapis.com (0.3s) ✓ shorebird.yaml found in pubspec.yaml assets (12ms) No issues detected! ```

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

eseidel commented 3 months ago

I think this might be https://github.com/shorebirdtech/shorebird/issues/1945?

felangel commented 3 months ago

Yeah I believe you can resolve this issue by explicitly specifying the --release-version you want to patch. This way Shorebird will automatically use the correct flutter version to build your app instead of trying to build with the latest version first in order to determine the release version.

maheshj01 commented 3 months ago

I believe --release-version is app version right (The one we would like to patch to)? 😅

I ran the below patach and shorebird choose the old flutter version but still fails

vocabhub % shorebird patch android --release-version=0.7.8+30 -- --dart-define=<mysecretkeys>
✓ Fetching apps (0.3s)
✓ Fetching releases (0.2s)
✓ Fetching aab artifact (0.2s)
✓ Downloading aab (2.8s)
✗ Failed to build: The current Dart SDK version is 3.2.3.
felangel commented 3 months ago

I believe --release-version is app version right (The one we would like to patch to)? 😅

I ran the below patach and shorebird choose the old flutter version but still fails

vocabhub % shorebird patch android --release-version=0.7.8+30 -- --dart-define=<mysecretkeys>
✓ Fetching apps (0.3s)
✓ Fetching releases (0.2s)
✓ Fetching aab artifact (0.2s)
✓ Downloading aab (2.8s)
✗ Failed to build: The current Dart SDK version is 3.2.3.

Can you share the full logs (including the full command you ran and the output)?

maheshj01 commented 3 months ago

Here it is

shorebird patch android  --release-version=0.7.8+30 -v -- --dart-define=SUPABASE_PROJECT_URL=url 
--dart-define=SUPABASE_API_KEY=apikey --dart-define=SUPABASE_REDIRECT_URL=<callback> 
--dart-define=SUPABASE_SERVICE_ROLE=<role> 
--dart-define=FIREBASE_VAPID_KEY=<vapidkey>
--dart-define=ADMIN_EMAIL=<email>
--dart-define=FCM_SERVER_KEY=<server key> > log.txt

complete logs

log.txt

Yongle-Fu commented 3 months ago

when i run shorebird release android --flutter-version 3.19.6 while output

 Failed to build: The current Flutter SDK version is 3.14.0-9.0.pre.2302.
Because my_app depends on flutter_markdown >=0.6.20 which requires Flutter SDK version >=3.16.0, version solving failed.
bin/cache/flutter/6d047e401941206daf11740c523ffa3364a2385b/bin/flutter --version 
Flutter 3.14.0-9.0.pre.3707 • channel [user-branch] • unknown source
Framework • revision 6d047e4019 (5 days ago) • 2024-05-15 15:27:44 -0500
Engine • revision c600950be8
Tools • Dart 3.4.0 • DevTools 2.34.3
eseidel commented 3 months ago

@Yongle-Fu are you suggesting that passing --flutter-version doesn't seem to be having any effect?

bryanoltman commented 3 months ago

From the logs, the issue seems to be that you're attempting to build with an old version of Flutter:

SLVR: fact: vocabhub requires SDK version >=3.3.0 <4.0.0
SLVR: conflict: vocabhub requires SDK version >=3.3.0 <4.0.0
SLVR: Version solving took 0:00:00.000333 seconds.
    | Tried 1 solutions.
ERR : The current Dart SDK version is 3.2.3.
    | 
    | Because vocabhub requires SDK version >=3.3.0 <4.0.0, version solving failed.
FINE: Exception type: SolveFailure

My guess as to what happened is that you updated your app to use a newer version of Flutter than what is used by release 0.7.8+30 (it appears that that release uses Flutter 3.16.5)

maheshj01 commented 3 months ago

My guess as to what happened is that you updated your app to use a newer version of Flutter than what is used by release 0.7.8+30 (it appears that that release uses Flutter 3.16.5)

Yes, I updated the app to latest version of flutter and then tried to patch it. So we cannot apply patch to an app that was built with different version of flutter (old version)?

bryanoltman commented 3 months ago

So we cannot apply patch to an app that was built with different version of flutter (old version)?

You can, but the patch has to be buildable with that version of Flutter, which it seems like is not the case here.

bryanoltman commented 3 months ago

I think this has been resolved. Closing.