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 build mixin should warn if shorebird.yaml is missing #414

Closed
eseidel opened this issue May 1, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@eseidel
Copy link
Contributor

eseidel commented May 1, 2023

Right now it just carries on and crashes (which is a separate issue: #413).

PS C:\Users\micro\demo\hello_shorebird> shorebird run
Running app...
Flutter assets will be downloaded from https://download.shorebird.dev. Make sure you trust this source!

Using hardware rendering with device sdk gphone64 x86 64. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".

Launching lib\main.dart on sdk gphone64 x86 64 in release mode...

Running Gradle task 'assembleRelease'...


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

Running Gradle task 'assembleRelease'...
   33.2s

√  Built build\app\outputs\flutter-apk\app-release.apk (9.0MB).

Installing build\app\outputs\flutter-apk\app-release.apk...     
 1,487ms



Flutter run key commands.

h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).

E/FlutterJNI( 5305): Failed to load shorebird.yaml

E/FlutterJNI( 5305): java.io.FileNotFoundException: flutter_assets/shorebird.yaml
E/FlutterJNI( 5305):    at android.content.res.AssetManager.nativeOpenAsset(Native Method)        
E/FlutterJNI( 5305):    at android.content.res.AssetManager.open(AssetManager.java:904)
E/FlutterJNI( 5305):    at android.content.res.AssetManager.open(AssetManager.java:881)
E/FlutterJNI( 5305):    at io.flutter.embedding.engine.FlutterJNI.init(Unknown Source:51)
E/FlutterJNI( 5305):    at m.d.e(Unknown Source:454)
E/FlutterJNI( 5305):    at io.flutter.embedding.engine.a.<init>(Unknown Source:184)
E/FlutterJNI( 5305):    at io.flutter.embedding.engine.a.<init>(Unknown Source:12)
E/FlutterJNI( 5305):    at io.flutter.embedding.android.e.G(Unknown Source:106)
E/FlutterJNI( 5305):    at io.flutter.embedding.android.e.p(Unknown Source:7)
E/FlutterJNI( 5305):    at io.flutter.embedding.android.d.onCreate(Unknown Source:13)
E/FlutterJNI( 5305):    at android.app.Activity.performCreate(Activity.java:8305)
E/FlutterJNI( 5305):    at android.app.Activity.performCreate(Activity.java:8284)
E/FlutterJNI( 5305):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
E/FlutterJNI( 5305):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
E/FlutterJNI( 5305):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
E/FlutterJNI( 5305):    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
E/FlutterJNI( 5305):    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/FlutterJNI( 5305):    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/FlutterJNI( 5305):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)   
E/FlutterJNI( 5305):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/FlutterJNI( 5305):    at android.os.Looper.loopOnce(Looper.java:201)
E/FlutterJNI( 5305):    at android.os.Looper.loop(Looper.java:288)
E/FlutterJNI( 5305):    at android.app.ActivityThread.main(ActivityThread.java:7872)
E/FlutterJNI( 5305):    at java.lang.reflect.Method.invoke(Native Method)
E/FlutterJNI( 5305):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/FlutterJNI( 5305):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
D/flutter ( 5305): updater::logging: Logging initialized
E/flutter ( 5305): updater::c_api: Error initializing updater: Invalid Argument: yaml -> missing field `app_id`

E/flutter ( 5305): log_panics: thread '<unnamed>' panicked at 'Must call shorebird_init() before using the updater.': library/src/config.rs:68

E/flutter ( 5305):    0: <unknown>
E/flutter ( 5305):    1: <unknown>
E/flutter ( 5305):    2: <unknown>
E/flutter ( 5305):    3: <unknown>
E/flutter ( 5305):    4: <unknown>
E/flutter ( 5305):    5: <unknown>
E/flutter ( 5305):    6: <unknown>
E/flutter ( 5305):    7: <unknown>
E/flutter ( 5305):    8: <unknown>
E/flutter ( 5305):    9: <unknown>
E/flutter ( 5305):   10: art_quick_generic_jni_trampoline
E/flutter ( 5305):   11: nterp_helper
E/flutter ( 5305):   12: nterp_helper
E/flutter ( 5305):   13: nterp_helper
E/flutter ( 5305):   14: nterp_helper
E/flutter ( 5305):   15: nterp_helper
E/flutter ( 5305):   16: nterp_helper
E/flutter ( 5305):   17: nterp_helper
E/flutter ( 5305):   18: <unknown>
@eseidel eseidel added the bug Something isn't working label May 1, 2023
@bryanoltman
Copy link
Contributor

I think this may be fixed, although the implementation is in the ShorebirdConfigMixin instead of ShorebirdBuildMixin. See https://github.com/shorebirdtech/shorebird/blob/main/packages/shorebird_cli/lib/src/commands/release_command.dart#L79-L84 for an example of its use.

@bryanoltman
Copy link
Contributor

On second thought, reopening as we don't seem to validate that shorebird has been initialized in either of our shorebird build subcommands.

@bryanoltman bryanoltman reopened this May 18, 2023
@eseidel eseidel closed this as completed Jul 26, 2023
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
None yet
Development

No branches or pull requests

2 participants