Build Flutter App

Bug #1927096 reported by sixfold fable on 2021-05-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Undecided
Unassigned

Bug Description

I get alot of this warning "snapd is not logged in, snap install commands will use sudo". Followed by flutter build issues. Flutter does not like being used as root.

I have tried snap login and snapcraft login

Basic tutorial does not work. Going to keep updating this ticket as I go.

I have fallen back to getting the basic tutorial working:

https://flutter.dev/docs/deployment/linux

I get alot of this error:

"An error occurred when trying to execute 'sudo -H -i env SNAPCRAFT_BUILD_ENVIRONMENT=managed-host HOME=/root SNAPCRAFT_HAS_TTY=True apt-get dist-upgrade --yes' with 'multipass': returned exit code 255.
"

fix: sudo snap restart multipass.multipassd

well, not really. Now it hangs. Going to restart. Feel like it gets the furthest on a first restart. Should I upgrade from 20.04 LTS?

restarting didn't help. Now it just hangs on "starting snapcraft-test". Having alot trouble just getting the same error twice.

snapcraft clean, hangs too

-d does not add any output

sudo doesn't help

deleting tmp files didn't help

recreating project lead me back to the 255 multipass error. Kindof scared to do sudo snap restart multipass.multipassd now.

okay, tutorial works now. Feel like I did a cycle of steps and it happened to work on the second cycle?

Now I am going to add in the platform plugin which was failing my main project.

Worked moving back to original project.

Okay, back to my original error:

[ +27 ms] CMake Error at flutter/generated_plugins.cmake:12
(add_subdirectory):
[ +1 ms] add_subdirectory given source
[ +3 ms]
"flutter/ephemeral/.plugin_symlinks/url_launcher_linux/linux"
which is not
[ ] an existing directory.
[ ] Call Stack (most recent call first):
[ +2 ms] CMakeLists.txt:69 (include)
[ ] -- Configuring incomplete, errors occurred!
[ ] See also
"/root/parts/gui/build/build/linux/x64/release/CMakeFiles/CMa
keOutput.log".
[ +6 ms] Building Linux application... (completed in
1,173ms)
[ ] "flutter linux" took 5,672ms.
[ +2 ms] Unable to generate build files
[ +2 ms]
           #0 throwToolExit
           (package:flutter_tools/src/base/common.dart:10:3)
           #1 _runCmake

(package:flutter_tools/src/linux/build_linux.dart:156:5)
           <asynchronous suspension>
           #2 buildLinux

(package:flutter_tools/src/linux/build_linux.dart:76:5)
           <asynchronous suspension>
           #3 BuildLinuxCommand.runCommand

(package:flutter_tools/src/commands/build_linux.dart:88:5)
           <asynchronous suspension>
           #4 FlutterCommand.run.<anonymous closure>

(package:flutter_tools/src/runner/flutter_command.dart:1091:2
           7)
           <asynchronous suspension>
           #5 AppContext.run.<anonymous closure>

(package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #6 CommandRunner.runCommand
           (package:args/command_runner.dart:196:13)
           <asynchronous suspension>
           #7 FlutterCommandRunner.runCommand.<anonymous
closure>

(package:flutter_tools/src/runner/flutter_command_runner.dart
           :284:9)
           <asynchronous suspension>
           #8 AppContext.run.<anonymous closure>

(package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #9 FlutterCommandRunner.runCommand

(package:flutter_tools/src/runner/flutter_command_runner.dart
           :232:5)
           <asynchronous suspension>
           #10 run.<anonymous closure>.<anonymous
closure>
           (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #11 AppContext.run.<anonymous closure>

(package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #12 main
(package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>

[ +31 ms] ensureAnalyticsSent: 29ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
Failed to run 'flutter build linux --release -v -t lib/main.dart' for 'gui': Exited with code 1.
Verify that the part is using the correct parameters and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

Making a new project and moving the code over worked. Closing.

description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
summary: - "snapd is not logged in, snap install commands will use sudo"
+ Build Flutter App
description: updated
Changed in snapcraft:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers