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

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

Closed
maheshmnj opened this issue May 16, 2024 · 11 comments
Labels
bug Something isn't working waiting for response Waiting for customer response

Comments

@maheshmnj
Copy link

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.

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

eseidel commented May 16, 2024

I think this might be #1945?

@felangel
Copy link
Contributor

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.

@maheshmnj
Copy link
Author

maheshmnj commented May 16, 2024

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
Copy link
Contributor

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)?

@maheshmnj
Copy link
Author

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

This comment was marked as off-topic.

@eseidel

This comment was marked as off-topic.

@bryanoltman
Copy link
Contributor

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)

@erickzanardo erickzanardo added the waiting for response Waiting for customer response label May 29, 2024
@maheshmnj
Copy link
Author

maheshmnj commented May 29, 2024

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
Copy link
Contributor

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
Copy link
Contributor

I think this has been resolved. Closing.

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

6 participants