plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

Webview Blank Screen on new tauri install (Tauri 2 + Ubuntu + Vue + typescript pnpm) after adding store plugin on dev server

Open entseed opened this issue 6 months ago • 2 comments

I'm on Linux (Ubuntu 24.04) and using Tauri 2.0 + vue + typescript + pnpm

Running a fresh dev server instance of Tauri 2.0 runs fine (3 logos + form are displayed):

pnpm create tauri-app
pnpm tauri dev

But if I install the store plugin and run the dev:

pnpm tauri add store
pnpm tauri dev

I get a blank screen. If I right click and inspect the console, I get the errors:

Failed to load resource: the server responded with a status of 404 (Not Found)     http://localhost:1420/vite.svg?import

Failed to load resource: the server responded with a status of 404 (Not Found)     http://localhost:1420/tauri.svg?import

Image

This is solved by right clicking and reloading, but it doesn't work initially. The issue persists on both an ubuntu terminal or a vscode terminal. This issue does not persist when I build and run a .deb file, so it's not a critical bug, just an annoying one.

entseed avatar Jun 25 '25 23:06 entseed

can you also share the output of pnpm tauri info for completeness sake?

does this only happen with the store plugin?

FabianLars avatar Jun 26 '25 12:06 FabianLars

I've only noticed it with the store plugin, but I haven't tried many others yet.

The blank screen issue might not show up without adding a little code, so for someone to test, maybe add the following to ./scr/App.vue:

const greetMsg = ref("");
const name = ref("");

import { load } from '@tauri-apps/plugin-store';
let store;
(async()=>{
    store = await load('newstore.json', { autoSave: true });
    await store.set('storekey', 'store plugin is loaded');
    greetMsg.value = await store.get('storekey') as Array<string>;
})();

my pnpm tauri info is

> [email protected] tauri /projects/tauri-app
> tauri info


[✔] Environment
    - OS: Ubuntu 24.4.0 x86_64 (X64) (ubuntu on x11)
    ✔ webkit2gtk-4.1: 2.48.3
    ✔ rsvg2: 2.58.0
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 22.16.0
    - pnpm: 10.12.3
    - npm: 10.9.2

[-] Packages
    - tauri 🦀: 2.6.1
    - tauri-build 🦀: 2.3.0
    - wry 🦀: 0.52.1
    - tao 🦀: 0.34.0
    - @tauri-apps/api : 2.6.0
    - @tauri-apps/cli : 2.6.1

[-] Plugins
    - tauri-plugin-store 🦀: 2.3.0
    - @tauri-apps/plugin-store : 2.3.0
    - tauri-plugin-opener 🦀: 2.4.0
    - @tauri-apps/plugin-opener : 2.4.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Vue.js
    - bundler: Vite

entseed avatar Jun 27 '25 06:06 entseed