Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Build AppImage cannot display images in Tauri v1 #10161

Closed
0xddy opened this issue Jul 1, 2024 · 2 comments
Closed

[bug] Build AppImage cannot display images in Tauri v1 #10161

0xddy opened this issue Jul 1, 2024 · 2 comments
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@0xddy
Copy link

0xddy commented Jul 1, 2024

Describe the bug

Windows dev √
Windows build √
Linux dev √
Linux build X Appimage

Tauri v1、Vue3+Vite+Element plus

view.vue

<script setup lang="ts">
import logo from '@/assets/steamdeck.svg'
// or 
// other .... 
</script>

<template>
<el-image :lazy="true" :src="logo" />
//or
<el-image :lazy="true" src="steamdeck.svg" />
</template>

Vue

  • public
    • favicon.ico
    • steamdeck.svg
  • src
    • assets
      • steamdeck.svg
    • views

Tauri

  • src-tauri
    • assets
      • steamdeck.svg
    • src
    • tauri.conf.json

tauri.conf.json

{
  "build": {
    "devPath": "../dist",
    "distDir": "../dist",
    "withGlobalTauri": true
  },
  "package": {
    "productName": "panel",
    "version": "0.0.1"
  },
  "tauri": {
    "allowlist": {
      "all": false,
      "shell": {
        "execute": true,
        "open": true
      }
    },
    "windows": [
      {
        "title": "panel",
        "width": 800,
        "height": 600,
        "minWidth": 800,
        "minHeight": 600,
        "resizable": true,
        "visible":false,
        "label": "main",
        "center": true
      },
      {
        "width": 400,
        "height": 200,
        "decorations": false,
        "url": "splash.html",
        "label": "splash",
        "center": true,
        "visible":false
      }
    ],
    "security": {
      "csp": null
    },
    "bundle": {
      "active": true,
      "targets": "all",
      "identifier": "com.aaa.cccc",
      "icon": [
        "icons/32x32.png",
        "icons/128x128.png",
        "icons/128x128@2x.png",
        "icons/icon.icns",
        "icons/icon.ico"
      ],
      "resources": [
        "assets/steamdeck.svg"
      ]
    }
  }
}

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Ubuntu 22.4.0 X64
    ✔ webkit2gtk-4.0: 2.44.2
    ✔ rsvg2: 2.52.5
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)

[-] Packages
    - tauri [RUST]: 1.6.8
    - tauri-build [RUST]: 1.5.2
    - wry [RUST]: 0.24.10
    - tao [RUST]: 0.16.9
    - tauri-cli [RUST]: 1.5.14
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: ../dist

Stack trace

No response

Additional context

No response

@0xddy 0xddy added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jul 1, 2024
@FabianLars
Copy link
Member

Can you do a debug build via tauri build --debug (if you use npm it needs another -- like npm run tauri build -- --debug), output in target/debug/bundle/ and in the devtools check the console and network tab for errors?

@0xddy
Copy link
Author

0xddy commented Jul 1, 2024

@FabianLars I found out that the problem should be caused by lazy loading, so I will debug it again

@0xddy 0xddy closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants