Skip to content

Dart snapshot generator failed with exit code -6 #21831

@agiletelescope

Description

@agiletelescope

I had a Flutter app that was working just fine until today. I realized that flutter build apk wasn't building the Flutter app with the latest code. Looked up on the internet. Did a flutter clean. Then built the app again with flutter build apk. The following is the error I'm getting,
On Beta channel.

===== CRASH =====

version=2.1.0-dev.1.0.flutter-ccb16f7282 (Tue Aug 21 22:21:20 2018 +0000) on "linux_simarm"
si_signo=Segmentation fault(11), si_code=1, si_addr=0x4
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6
   Woah! You appear to be trying to run flutter as root.
   We strongly recommend running the flutter tool without superuser privileges.
  /
📎
39.5s
Built build/app/outputs/apk/release/app-release.apk (4.3MB).

Before doing "flutter clean" the app size was 6.5 MB.

On master channel.
===== CRASH =====

version=2.1.0-dev.4.0.flutter-05ccfa8502 (Tue Sep 11 09:03:02 2018 +0000) on "linux_simarm"
si_signo=Segmentation fault(11), si_code=1, si_addr=0x5
Dart snapshot generator failed with exit code -6
Snapshotting exited with non-zero exit code: -6

FAILURE: Build failed with an exception.

* Where:
Script '/opt/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 428

* What went wrong:
Execution failed for task ':app:flutterBuildRelease'.
> Process 'command '/opt/flutter/bin/flutter'' finished with non-zero exit value 1

* 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

I then downgraded Flutter. The flutter build apk is working just fine.
How do I resolve this issue?.

Flutter Doctor Output:

[✓] Flutter (Channel beta, v0.7.3, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] Android Studio (version 3.0)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.25.1)
[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

Some related content I found regarding this same issue.
#14891, #21025

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoledependency: dartDart team may need to help ustoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions