Rust program for iced framework crashes on snapcraft

Hey guys I got these errors on the pictures trying to create snap out of the rust program using iced framework on the newest Manjaro Linux 24: Here is my GPL3 free source to compile and run snap. Thanks for any help: https://hrubos.org/repo/autoskola3.zip Pics:

I would like to upload this program to snap store, but impossible for me at the moment. ^^^

Can I display the output of this command snappy-debug.

For information, you must first execute snappy-debug , then, in another terminal execute your snap.

This is it ^^^ Any ideas? Thanks.

@lesna.vevericka, just execute snappy-debug (without leaving) , then, another terminal execute your snap.

After, show the output where you executed snappy-debug.

I’m afraid snappy-debug is written in wrong way. It wants to read /var/log/syslog but Manjaro linux nowadays uses /var/log/journal for logs. All I have is this pic:

Any ideas? My command: snapcraft --debug spits also nothing…

Can you show the content of your *.yaml file ?

This is my yaml file ^^^ Any ideas? Thanks.

Please, can you copy and paste the content ?

Hello! You’re missing a bunch of desktop stuff that will enable this to work.

This can be easily fixed though, as you may be able to get away with simply adding the GNOME extension, which is probably enough.

Halloy is a rust program which also uses iced, and works great. Here’s the yaml The important bit I suspect you’re missing is this:

apps:
  autoskola3:
    command: bin/autoskola3
    extensions: [gnome]
3 Likes

Thanks, trying it, but my source as: . for local folder is being refused, pic: Question is whether the source must be github only? I wanna local folder source. LOGs pic:

Any ideas? Thanks. ^^^

I tried also the slash: Will see after compilation what it says: Pic:

name: autoskola3 # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '3.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Testing app for drivers with 2000 questions. # 79 char long summary
description: |
  This app offers 2000 questions in Slovak and English for drivers to be tested 
  before main exam in Slovak Republic. More on https://hrubos.org or 
  http://programujem.szm.sk Just download and be ready before driving exam.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
source-code: ./


parts:
  autoskola3:
    # See 'snapcraft plugins'
    plugin: rust
    source: ./ 
    build-packages:
      - cargo
      - libssl-dev  
    stage-packages:
      - libxkbcommon-x11-0
apps:
  autoskola3:
    command: bin/autoskola3
    common-id: org.hrubos
    extensions: [gnome]
    plugs:
      - network

Ok I got it, my yaml is this:

name: autoskola3 # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '3.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Testing app for drivers with 2000 questions. # 79 char long summary
description: |
  This app offers 2000 questions in Slovak and English for drivers to be tested 
  before main exam in Slovak Republic. More on https://hrubos.org or 
  http://programujem.szm.sk Just download and be ready before driving exam.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
source-code: janko.hrubos@gmail.com


parts:
  autoskola3:
    # See 'snapcraft plugins'
    plugin: rust
    source: ./ 
    build-packages:
      - cargo
      - libssl-dev  
    stage-packages:
      - libxkbcommon-x11-0
apps:
  autoskola3:
    command: bin/autoskola3
    common-id: org.hrubos
    extensions: [gnome]
    plugs:
      - network

Some pics of running devel snap:

THANKS TO ALL FOR THE HELP!!! THE TOPIC IS CLOSED NOW.

1 Like

One last question: How long does it last pending review? Picture:

Thanks for everything :wink:

Typically a day or two. But only Canonical employees have access to this review process, so I don’t know how long the queue is. I expect (based on my recent experience) you’ll get an answer before the middle of the week.

Hey there, thanks, I finally created my snap, but during the push I get this error on your side:

Issues while processing snap:g                                                 
- __all__: Links must be http(s):// URLs.

I cant’t see any docu for this error. THANKS A LOT FOR THE HELP. Picture:

You have an email where a url should be. source-code is usually used to point to a url. If you want to use an email address, put that in a top level contact field. As per the documentation: Snapcraft top-level metadata | Snapcraft documentation

All right I just changes yaml to this:

name: autoskola3 # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '3.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Testing app for drivers with 2000 questions. # 79 char long summary
description: |
  This app offers 2000 questions in Slovak and English for drivers to be tested 
  before main exam in Slovak Republic. More on https://hrubos.org Just download and be ready before driving exam.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots



parts:
  autoskola3:
    # See 'snapcraft plugins'
    plugin: rust
    source: ./ 
    build-packages:
      - cargo
      - libssl-dev  
    stage-packages:
      - libxkbcommon-x11-0
apps:
  autoskola3:
    command: bin/autoskola3
    common-id: org.hrubos.autoskola3
    extensions: [gnome]
    plugs:
      - network

Now the output is this picture:

Seems to be it is finally there in the global market… THANKS A LOT.

1 Like

Well, another error, it did not attached my ./resources folder from which binary reads pictures, I tried layout: but it cant have layout: ./resources: $SNAP/local/resources, then I am reading about dump plugin, but I can’t find anywhere in docu how to add dump plugin to yaml. Any ideas how to allow ./resources folder in snap? My pic:

Thanks for the help: What to change in this yaml:

name: autoskola3 # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '3.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Testing app for drivers with 2000 questions. # 79 char long summary
description: |
  This app offers 2000 questions in Slovak and English for drivers to be tested 
  before main exam in Slovak Republic. More on https://hrubos.org Just download and be ready before driving exam.

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

parts:
  autoskola3:
    # See 'snapcraft plugins'
    plugin: rust    
    source: ./ 
    build-packages:
      - cargo
      - libssl-dev  
    stage-packages:
      - libxkbcommon-x11-0
  
apps:
  autoskola3:
    command: bin/autoskola3
    common-id: org.hrubos.autoskola3
    extensions: [gnome]
    plugs:
      - network

Ok I got it, I added dump plugin for local resources, picture:

My yaml is this:


name: autoskola3 # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '3.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Testing app for drivers with 2000 questions. # 79 char long summary
description: |
  This app offers 2000 questions in Slovak and English for drivers to be tested 
  before main exam in Slovak Republic. More on https://hrubos.org Just download and be ready before driving exam.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
parts:
  autoskola3:
    # See 'snapcraft plugins'
    plugin: rust    
    source: ./ 
    build-packages:
      - cargo
      - libssl-dev  
    stage-packages:
      - libxkbcommon-x11-0
  autoskola3-resources:
    plugin: dump
    source: ./
apps:
  autoskola3:
    command: bin/autoskola3
    common-id: org.hrubos.autoskola3
    extensions: [gnome]
    plugs:
      - network

THIS IS FINAL SOLUTION, THANKS FOR EVERYTHING!!!

1 Like