You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug?]:TypeError: Cannot read properties of undefined (reading 'metadata') #2328
This error comes from @tauri-apps/api, not from SolidStart, and it does not depend on the SolidStart version.
The screenshot shows getCurrentWebviewWindow() being called while Inner2 renders (app.tsx:5:25). It reads window.__TAURI_INTERNALS__.metadata, and window.__TAURI_INTERNALS__ is undefined. Only the Tauri runtime adds that object to the page. The page in the screenshot is open at localhost:3002 in a regular browser tab, not inside a Tauri window, so any Tauri window API throws there. SolidStart's dev overlay only displays the error. The same code throws on SolidStart 2.0, and in a plain Vite app.
To make the app work in both places:
Check that you are running inside Tauri before calling Tauri APIs. isTauri() from @tauri-apps/api/core does this.
Call them on the client after the component mounts, for example in onMount or inside a clientOnly component. During server rendering there is no window at all.
import{isTauri}from"@tauri-apps/api/core";import{getCurrentWebviewWindow}from"@tauri-apps/api/webviewWindow";import{onMount}from"solid-js";functionInner(){onMount(()=>{if(!isTauri())return;constwin=getCurrentWebviewWindow();// use win});// ...}
Closing, since this is not a SolidStart bug. If you see this error inside the Tauri window itself, please reopen with a small reproduction.
Activity
brenelz commentedon Sep 27, 2026
Looks like this version is using vinxi. Can you upgrade to solid start 2.0 and see if it fixes it
lxsmnsyc commentedon Oct 13, 2026
This error comes from
@tauri-apps/api, not from SolidStart, and it does not depend on the SolidStart version.The screenshot shows
getCurrentWebviewWindow()being called whileInner2renders (app.tsx:5:25). It readswindow.__TAURI_INTERNALS__.metadata, andwindow.__TAURI_INTERNALS__isundefined. Only the Tauri runtime adds that object to the page. The page in the screenshot is open atlocalhost:3002in a regular browser tab, not inside a Tauri window, so any Tauri window API throws there. SolidStart's dev overlay only displays the error. The same code throws on SolidStart 2.0, and in a plain Vite app.To make the app work in both places:
isTauri()from@tauri-apps/api/coredoes this.onMountor inside aclientOnlycomponent. During server rendering there is nowindowat all.Closing, since this is not a SolidStart bug. If you see this error inside the Tauri window itself, please reopen with a small reproduction.