Ubuntu – “stop-timeout is not an integer” when generating snap package – why

snapubuntu-core

Based on the tutorial, I have created an extremely simple snapcraft.yaml which contains the following:

name: hectane
version: 1
vendor: Nathan Osman <nathan@quickmediasolutions.com>
summary: Lightweight SMTP client
description: An SMTP client that is extremely easy to configure and use.
icon: icon.png
services:
  hectane:
    description: SMTP daemon
    start: bin/hectane

parts:
  hectane:
    plugin: go
    source: git://github.com/hectane/hectane

However, when I attempt to build the snap with snapcraft, I end up with the following errors and warnings:

Snapping hectane 
Errors
------
 - snappy-systemd_hook_optional_key_stop-timeout_hectane.snappy-systemd
    'stop-timeout' is not an integer
 - snappy-systemd_hook_stop_timeout_hectane.snappy-systemd
    stop-timeout is not an integer
Warnings
--------
 - lint_DEBIAN_extra_files
    found extra files in DEBIAN/: hashes.yaml
 - lint_snappy_unknown
    unknown entries in package.yaml: 'architectures'
hectane_1_amd64.snap: FAIL
Generated 'hectane_1_amd64.snap' snap

What do these errors mean and why am I seeing them?

Technical Information

Host: Ubuntu 15.04
Architecture: x86_64
snapcraft version: 0.4 (installed via PPA)

Best Answer

snappy build and the tool that reviews the resulting snap are provided in two different packages developed in separate source repositories but they need to be kept in sync, the most likely cause of this particular issue is that they are indeed not in sync. Getting the latest versions of these packages will most likely fix this.

If you've done a release upgrade the ppa where the tools are published probably got disabled, you can simply add it again by running

sudo add-apt-repository ppa:snappy-dev/tools

Then update and upgrade

sudo apt-get update
sudo apt-get dist-upgrade

Replace apt-get for apt if you prefer using it.