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

Can't access files in public folder in packaged app #17007

Open
darkxanter opened this issue Mar 15, 2024 · 0 comments
Open

Can't access files in public folder in packaged app #17007

darkxanter opened this issue Mar 15, 2024 · 0 comments
Labels
bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/electron Qv2 🔝 Quasar v2 issues

Comments

@darkxanter
Copy link
Contributor

What happened?

When the Quasar Electron project is built and packaged, all public files are inaccessible when attempting to access them from the root path.
For example, <img src="/icons/favicon-128x128.png" /> tries to get the file at path file:///icons/favicon-128x128.png instead of a path like this file:/// tmp/.mount_QuasarLLn7Ki/resources/app.asar/icons/favicon-128x128.png

What did you expect to happen?

Files in the public folder were accessible through the root path.

Reproduction URL

https://github.com/darkxanter/quasar-electron-public-folder-bug

How to reproduce?

  1. Go to provided repository
  2. Build electron app and run it
  3. There is an image in the center of the page that will not load

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Electron Mode

Platforms/Browsers

Electron

Quasar info output

Operating System - Linux(6.7.9-arch1-1) - linux/x64
NodeJs - 20.11.1

Global packages
  NPM - 10.5.0
  yarn - 1.22.19
  @quasar/cli - 2.3.0
  @quasar/icongenie - 3.0.0
  cordova - Not installed

Important local packages
  quasar - 2.15.1 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.0.0-beta.5 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.9 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.21 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.3.0
  pinia - Not installed
  vuex - Not installed
  vite - 5.1.6 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.20.2 -- An extremely fast JavaScript and CSS bundler and minifier.
  typescript - 5.3.3 -- TypeScript is a language for application scale JavaScript development
  workbox-build - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  electron - 29.1.4 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
  electron-packager - Not installed
  electron-builder - 24.13.3 -- A complete solution to package and build a ready for distribution Electron app for MacOS, Windows and Linux with “auto update” support out of the box
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

No response

Additional context

No response

@github-actions github-actions bot added bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite mode/electron labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-hard-to-reproduce A reproduction is available, but it's hard to reproduce, so it has a lower priority. bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 mode/electron Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

1 participant