Not able to create flutter linux desktop application snapcraft build

460 views Asked by At

I have developed a Linux desktop application with the help of flutter but now I am facing an error when I am trying to create the snapcraft build in #Flutter Project and the project is running perfectly when I am run on a Linux system . Please let me know if anyone can connect with me and help me to solve this error. when I was run snapcraft cmd to create project snap so terminal showed this error.

**Error while processing... The store was unable to accept this snap.

  • human review required due to 'deny-connection' constraint (interface attributes)
  • Could not find 'Exec=' in desktop file
  • Could not find 'Type=Application' in desktop file**

projectname.desktop file code

  Name=projectname
  Comment=projectname
  Exec=projectname
  Icon=snap/gui/projectname.png # replace name to your app name
  Terminal=false
  Type=Application
  Categories=Utility; #adjust accordingly your snap category```

snapcraft.yaml Code

```name: projectname
version: '1.0.8'
summary: projectname summary
description: |
             projectname description

confinement: strict
base: core18
grade: stable
# icon: snap/gui/projectname.png

# architectures:
#   - build-on: armhf
architectures:
  - build-on: armhf
    # run-on: amd64
system-usernames:
  snap_daemon: shared

slots:
  dbus-projectname: # adjust accordingly to your app name
    interface: dbus
    bus: session
    name: org.bar.projectname # adjust accordingly to your app name and
    
apps:
  projectname:
    command: projectname
    extensions: [flutter-master] # Where "master" defines which Flutter channel to use for the 
    # desktop: snap/gui/projectname.desktop
    plugs:
    - network
    - desktop
    slots:
      - dbus-projectname
parts:
  bstamp:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart # The main entry-point file of the application```
2

There are 2 answers

0
omnimind On

I ran into exactly the same issue. I copy pasted from the guide on flutter.dev when creating my .desktop file. That left all entries with preceding spaces. Removing all the spaces fixed my issue.

If you fix those issues you'll still get the "human review required due to 'deny-connection' constraint (interface attributes)" but it will trigger a manual review this time after which you'll need to wait a couple of days for a human to review your submission.

1
Jogean Carvalho On

I faced this issue a while ago and is was quit simple to solve. Check your .desktop file. It can't have extra spaces

change this

  Name=projectname
  Comment=projectname
  Exec=projectname
  Icon=snap/gui/projectname.png # replace name to your app name
  Terminal=false
  Type=Application
  Categories=Utility; #adjust accordingly your snap category

to this

Name=projectname
Comment=projectname
Exec=projectname
Icon=snap/gui/projectname.png # replace name to your app name
Terminal=false
Type=Application
Categories=Utility; #adjust accordingly your snap category

I hope it helped you