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 release android fails with "unable to resolve class org.yaml.snakeyaml.Yaml" #1149

Closed
bryanoltman opened this issue Aug 23, 2023 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@bryanoltman
Copy link
Contributor

This is an issue in 0.14.1, and probably 0.14.0 also.

@bryanoltman bryanoltman added the bug Something isn't working label Aug 23, 2023
@bryanoltman bryanoltman self-assigned this Aug 23, 2023
@bryanoltman bryanoltman moved this to In Progress in Adoption Blockers Aug 23, 2023
@bryanoltman
Copy link
Contributor Author

Fixed by #1150

@github-project-automation github-project-automation bot moved this from In Progress to Done in Adoption Blockers Aug 23, 2023
@rikousik
Copy link

Unfortunately, I am still facing this problem.

_

Shorebird doctor:

Shorebird 0.14.2 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.13.0 • revision 7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2
Engine • revision a4613505045177f96d7cbfbb42335e2db7cf7b51

✓ Shorebird is up-to-date (0.8s)
✓ Flutter install is correct (0.5s)
✓ AndroidManifest.xml files contain INTERNET permission (36ms)

No issues detected!

_

Build command: shorebird release android --target ./lib/main_production.dart --flavor production


✗ Failed to build: 
FAILURE: Build failed with an exception.

* Where:
Script '/Users/kousikambani/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 34

* What went wrong:
Could not compile script '/Users/kousikambani/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/Users/kousikambani/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
   @ line 34, column 1.
     import org.yaml.snakeyaml.Yaml
     ^

  1 error

But I tried to build with my Flutter SDK, it worked as expected.

Flutter doctor:

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.81.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

@Fudal
Copy link

Fudal commented Aug 24, 2023

+1

* What went wrong:
Could not compile script '/Users/mac1/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/Users/mac1/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
   @ line 34, column 1.
     import org.yaml.snakeyaml.Yaml
     ^

  1 error
Shorebird 0.14.2 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.13.0 • revision 7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2
Engine • revision a4613505045177f96d7cbfbb42335e2db7cf7b51

✓ Shorebird is up-to-date (0.6s)
✓ Flutter install is correct (0.4s)
✓ AndroidManifest.xml files contain INTERNET permission (34ms)

No issues detected!

@yusufsirinn
Copy link

+1

C:\repo\src\mobile> shorebird release android
✗ Failed to build: Flutter assets will be downloaded from https://download.shorebird.dev./ Make sure you trust this source!

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Users\Developer.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 34

  • What went wrong:
    Could not compile script 'C:\Users\Developer.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy'.

startup failed:
script 'C:\Users\Developer.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
@ line 34, column 1.
import org.yaml.snakeyaml.Yaml
^

1 error

@JoyEnergiser
Copy link

+1
shorebird doctor
Shorebird 0.14.2 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.13.0 • revision 7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2
Engine • revision a4613505045177f96d7cbfbb42335e2db7cf7b51

✓ Shorebird is up-to-date (0.7s)
✓ Flutter install is correct (0.4s)
✓ AndroidManifest.xml files contain INTERNET permission (44ms)

No issues detected!
PS C:\dev\yourcart-flut> shorebird release android
✗ Failed to build: Flutter assets will be downloaded from https://download.shorebird.dev. Make sure you trust this source!

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Users\joyen.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 34

  • What went wrong:
    Could not compile script 'C:\Users\joyen.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy'.

startup failed:
script 'C:\Users\joyen.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
@ line 34, column 1.
import org.yaml.snakeyaml.Yaml
^

1 error

@kamaravichow
Copy link

Fixed by #1150

Still doesnt work

@carllosnc
Copy link

+1
same error for shorebird patch android and shorebird release android

* Where:
Script 'C:\Users\carll\.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 34

* What went wrong:
Could not compile script 'C:\Users\carll\.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy'.
> startup failed:
  script 'C:\Users\carll\.shorebird\bin\cache\flutter\7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
   @ line 34, column 1.
     import org.yaml.snakeyaml.Yaml
     ^

  1 error

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.0, on Microsoft Windows [Version 10.0.22621.2134], locale en-US)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.5.4)
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Community Edition (version 2023.1)
[✓] VS Code (version 1.81.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

shorebird doctor

Shorebird 0.14.2 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.13.0 • revision 7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2
Engine • revision a4613505045177f96d7cbfbb42335e2db7cf7b51

✓ Shorebird is up-to-date (0.7s)
✓ Flutter install is correct (0.7s)
✓ AndroidManifest.xml files contain INTERNET permission (42ms)

@rikousik
Copy link

@bryanoltman just drawing your attention here in case you don't receive notification from a closed PR. 🙂

@srkraut
Copy link

srkraut commented Aug 24, 2023

+1

@krishh-apnaklub
Copy link

I am getting the same error.

shorebird release android --flavor prod --target lib/main_prod.dart

✗ Failed to build: Flutter assets will be downloaded from https://download.shorebird.dev. Make sure you trust this source!

FAILURE: Build failed with an exception.

* Where:
Script '/Users/user/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 34

* What went wrong:
Could not compile script '/Users/user/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'.
> startup failed:
  script '/Users/user/.shorebird/bin/cache/flutter/7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 34: unable to resolve class org.yaml.snakeyaml.Yaml
   @ line 34, column 1.
     import org.yaml.snakeyaml.Yaml
     ^

  1 error


* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Gradle task bundleProdRelease failed with exit code 1

shorebird doctor

Shorebird 0.14.2 • git@github.com:shorebirdtech/shorebird.git
Flutter 3.13.0 • revision 7b63f1bac9879c2b00f02bc8d404ffc4c7f24ca2
Engine • revision a4613505045177f96d7cbfbb42335e2db7cf7b51

✓ Shorebird is up-to-date (1.2s)
✓ Flutter install is correct (1.4s)
✓ AndroidManifest.xml files contain INTERNET permission (38ms)

No issues detected!

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.1, on macOS 13.4.1 22F770820d darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.80.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Do we really need to keep Shorebird up-to-date in order to use it? Can we use the older working version even if there is a newer version is available?

@Flonger
Copy link

Flonger commented Aug 24, 2023

+1

@eseidel
Copy link
Contributor

eseidel commented Aug 24, 2023

Thank you all for the reports. We're working on a fix right now. Should be out in an hour or so.

@bryanoltman
Copy link
Contributor Author

Reopening as shorebirdtech/flutter#23 has not landed

@bryanoltman bryanoltman reopened this Aug 24, 2023
@bryanoltman
Copy link
Contributor Author

This should be fixed in 0.14.3

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

Successfully merging a pull request may close this issue.