← Back to issue list

icon 'discord.webp' must be either a .png or a .svg

View original Github issue

Metadata

Project
snapcraft
Number
#4459
Type
issue
State
open
Author
merlijn-sebrechts
Labels
Type: Enhancement
Created
2023-11-29 17:50:39+00:00
Updated
2025-04-29 16:52:42+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description The Snap Store allows `.webp` icons, but snapcraft doesn't seem to allow it. https://github.com/snapcrafters/discord/actions/runs/7036300577/job/19148618656 ### To Reproduce Build a snap with a `.webp` icon using remote-build (such as this one: https://github.com/snapcrafters/discord/commit/0b16e65175bcac8e23829e93e1b0a55e4a406423 ) ### Environment `remote-build` inside of a GitHub runner with Ubuntu 22.04 ### snapcraft.yaml ```shell name: discord title: Discord summary: Chat for Communities and Friends description: | Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities. Snaps are confined, as such Discord may be unable to perform some of the tasks it typically does when unconfined. This may result in the system log getting spammed with apparmor errors. Granting access to the system-observe interface when in the snap will enable the features, and thus reduce the logging. snap connect discord:system-observe **Authors** This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or officially maintained by the upstream developers. website: https://discord.com/ contact: https://github.com//snapcrafters/discord/issues issues: https://github.com//snapcrafters/discord/issues source-code: https://github.com//snapcrafters/discord license: Proprietary icon: discord.webp version: 0.0.36 base: core22 grade: stable confinement: strict assumes: - snapd2.54 architectures: - build-on: amd64 compression: lzo parts: disable-updater: plugin: nil override-pull: | cat <<'EOF' > disable-updater.sh #!/bin/bash if [ ! -d "$SNAP_USER_DATA"/.config/discord ]; then mkdir -p "$SNAP_USER_DATA"/.config/discord fi CONFIG_FILE="$SNAP_USER_DATA"/.config/discord/settings.json if ! [ -f "$CONFIG_FILE" ]; then echo '{}' > "$CONFIG_FILE" fi ORIG_JSON=$(cat "$CONFIG_FILE") NEW_JSON=$(jq '.SKIP_HOST_UPDATE = true' < "$CONFIG_FILE") if [ "$ORIG_JSON" != "$NEW_JSON" ]; then echo "$NEW_JSON" > "$CONFIG_FILE" fi exec "$@" EOF override-build: | install -m755 -D -t $CRAFT_PART_INSTALL/bin disable-updater.sh stage-packages: - jq launcher: plugin: dump source: launcher override-build: | cp launcher $CRAFT_PART_INSTALL/ discord: plugin: nil override-build: | craftctl default curl -o discord.deb "https://dl.discordapp.net/apps/linux/${SNAPCRAFT_PROJECT_VERSION}/discord-${SNAPCRAFT_PROJECT_VERSION}.deb" dpkg-deb -xv discord.deb $CRAFT_PART_INSTALL/ rm $CRAFT_PART_INSTALL/usr/share/discord/chrome-sandbox # Correct path to icon. sed -i 's|Icon=discord|Icon=/usr/share/discord/discord\.png|' ${CRAFT_PART_INSTALL}/usr/share/discord/discord.desktop build-packages: - curl - sed stage-packages: - libatomic1 - libc++1 - libnspr4 - libnss3 - libxss1 - xdg-utils prime: - -usr/bin/xdg-open cleanup: after: [discord] plugin: nil build-snaps: [ gnome-42-2204 ] override-prime: | set -eux cd /snap/gnome-42-2204/current find . -type f,l -exec rm -f $CRAFT_PRIME/{} \; plugs: shmem: interface: shared-memory private: true apps: discord: extensions: [gnome] command: launcher command-chain: [bin/disable-updater.sh] autostart: discord.desktop desktop: usr/share/applications/discord.desktop environment: # Correct the TMPDIR path for Chromium Framework/Electron to # ensure libappindicator has readable resources TMPDIR: $XDG_RUNTIME_DIR GTK_USE_PORTAL: 1 DISABLE_WAYLAND: 1 plugs: - audio-playback - audio-record - camera - home - mount-observe - network - network-observe - opengl - process-control - removable-media - screen-inhibit-control - shmem - system-observe - unity7 ``` ### Relevant log output ```shell Starting Snapcraft 7.5.4 Logging execution to '/home/runner/.local/state/snapcraft/log/snapcraft-20231129-173117.927008.log' Issues while validating snapcraft.yaml: icon 'discord.webp' must be either a .png or a .svg snapcraft remote-build is experimental and is subject to change - use with caution. Error: Process completed with exit code 2. ``` ### Additional context _No response_

Evaluation history

No evaluation history available.