Go-flutter: Bug: Cross-Compile corrupts other builds

Created on 1 Oct 2019  Â·  20Comments  Â·  Source: go-flutter-desktop/go-flutter

@jld3103

When I build one platform, the other folders gets updated and corrupted. Not sure whats happening but on ubuntu platfrom.

[ERROR:flutter/shell/platform/embedder/embedder.cc(629)] 
Not running in AOT mode but could not resolve the kernel binary.
[ERROR:flutter/shell/platform/embedder/embedder.cc(53)]
Returning error 'kInvalidArguments' (2) from Flutter Embedder API call 
to 'FlutterEngineRun'. 
Origin: ../../flutter/shell/platform/embedder/embedder.cc:631
go-flutter: engine.Run() returned result code 2 (invalid arguments)

Let me know if you guys can reproduce this?

Flutter version

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.7-pre.70, on Linux, locale en_US.UTF-8)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 3.5)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.36.0)
[✓] Connected device (3 available)

bug hover wontfix

Most helpful comment

Fixed by the flutter team: xref: https://github.com/flutter/flutter/issues/41861

All 20 comments

For what it is worth:
Can you share the content of your go directory, ls -R ./go?

Sometimes I get this error, and re-running the hover command solve the problem.
Have you found a reproducible path/route to always get this issue?
If yes, then please share the commands you used!

That's not a hover bug it's a bug in flutter that has already been fixed. Just update.

This was the original bug report: flutter/flutter#41352

@jld3103 I have upgraded but still facing issue. I have created script for now to zip the output platform folder. But when I build one platform, the old builts of other platforms get corrupted. I don't know how?

I will double check non the less.

I'll try to reproduce this scenario (I'm on linux):

  1. Build and run linux - Should be fine
  2. Build and run windows (with wine) - Should be fine
  3. Run linux again - Should crash

@jascodes Is this the scenario you described?

EDIT: Bug confirmed!

The problem seems that all files in flutter_assets are deleted. The folders remain

@jld3103

@jascodes Is this the scenario you described?

Exactly..

Looks like only one flutter bundle can be stored at a time (Why?). So just moving the bundle to one location for all builds and then copying it over should do the thing.

@jascodes @Drakirus can you confirm my fix to be working?

@jld3103 on the following flutter version:

Flutter 1.10.7-pre.108 • channel master • http://github.com/flutter/flutter
Framework • revision e045ef2969 (27 minutes ago) • 2019-10-01 14:10:53 -0700
Engine • revision 5c428d9247
Tools • Dart 2.6.0 (build 2.6.0-dev.4.0 fb1c5a6404)

The above reproduce scenario doesn't lead to an issue.
I cannot assert that your fix works.

And
I like to point out that form the flutter master channel, bad builds occurs.
That is why we have chosen the beta channel as your compatible one (README #version-compatibility), your log info from hover should contain the following message if you diverge:

$ hover run
[....]
hover: âš  The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: âš      It's advised to use the beta channel: flutter channel beta
[....]

@jascodes, to avoid any other bad build that are unrelated to go-flutter/hover, please make sure to switch to the beta branch :wink:.
This issue was fixed by: https://github.com/flutter/flutter/pull/41401, closing the https://github.com/go-flutter-desktop/hover/pull/37 PR.

Reopening since I may have misunderstood the issue. (see above PR on hover).

I will take a re-look at this tonight, while waiting, can you share a reproducible steps?

(or is this an issue that happens randomly?)

And is the issue also occurs on beta channel?

Edit:
The above steps:

1 Build and run linux - Should be fine
2 Build and run windows (with wine) - Should be fine
3 Run linux again - Should crash

On step 3 are using hover?
Or are you starting the app from the build generated on step 1?

Starting the app from step 1

Humm,
on:

Flutter 1.9.1+hotfix.4 • channel beta • http://github.com/flutter/flutter
Framework • revision cc949a8e8b (5 days ago) • 2019-09-27 15:04:59 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0

```sh
$ flutter clean
$ hover build linux
$ ./go/build/outputs/linux/XXXX # works
$ hover build windows
$ ./go/build/outputs/linux/XXXX # works

on 
```log
Flutter 1.10.7-pre.108 • channel master • http://github.com/flutter/flutter
Framework • revision e045ef2969 (27 minutes ago) • 2019-10-01 14:10:53 -0700
Engine • revision 5c428d9247
Tools • Dart 2.6.0 (build 2.6.0-dev.4.0 fb1c5a6404)
$ flutter clean
$ hover build linux
$ ./go/build/outputs/linux/XXXX # works
$ hover build windows
$ ./go/build/outputs/linux/XXXX 
[ERROR:flutter/shell/platform/embedder/embedder.cc(629)] Not running in AOT mode but could not resolve the kernel binary.                                                                                            
[ERROR:flutter/shell/platform/embedder/embedder.cc(53)] Returning error 'kInvalidArguments' (2) from Flutter Embedder API call to 'FlutterEngineRun'. Origin: ../../flutter/shell/platform/embedder/embedder.cc:631  
go-flutter: engine.Run() returned result code 2 (invalid arguments)  

Does this issue occurs on beta channel on your side?

I think the behaviour of flutter build bundle did change. It looks like only one bundle can exist at a time

My question is: should we wait and see if this issue gets promoted into beta, or should we fix it now?

I would wait. The fix currently works, but it looks like it's not necessary if flutter gets fixed.

I don't really know if this is actually the same error.

I'll comment on that issue commands that reproduce the "could not resolve the kernel binary" error.
It' might be related to the same commit, we'll see.


edit: https://github.com/flutter/flutter/issues/41352#issuecomment-537709454


edit2: moved into it's own issue: https://github.com/flutter/flutter/issues/41861

Fixed by the flutter team: xref: https://github.com/flutter/flutter/issues/41861

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lohnn picture lohnn  Â·  6Comments

pauldemarco picture pauldemarco  Â·  7Comments

ghost picture ghost  Â·  6Comments

MathiasDeWeerdt picture MathiasDeWeerdt  Â·  4Comments

GeertJohan picture GeertJohan  Â·  4Comments