Environment
- OS: macOS 14.6 (Darwin 23.6.0)
- Device: Mac (Apple Silicon/Intel if known)
- Node.js: v24.14.1
- npm: 11.11.0
- App run command:
npm run tauri dev
- Browser test URL:
http://localhost:1420 and http://localhost:1420/welcome
- Network: normal local dev network (no special proxy required for repro)
Summary
In browser dev mode on macOS, app initialization crashes with:
TypeError: Cannot read properties of undefined (reading 'metadata')
The app shows the "Failed to Initialize" fallback and becomes unusable in that context.
Steps To Reproduce
- Start Cortex IDE with
npm run tauri dev.
- Open
http://localhost:1420 in a regular browser tab on macOS.
- Observe startup.
Expected
Browser path should either:
- initialize safely, or
- show a graceful “Tauri runtime required” message without crashing core initialization.
Actual
Initialization fails and displays:
Failed to Initialize
The application could not load its core systems.
TypeError: Cannot read properties of undefined (reading 'metadata')
Code Evidence
Browser failure surfaces through initialization fallback UI:
src/context/OptimizedProviders.tsx (ErrorFallback renders err.toString())
Window initialization depends on Tauri webview metadata:
src/context/WindowsContext.tsx (getSafeCurrentWindowLabel() calls getCurrentWebviewWindow().label)
src/context/WindowsContext.tsx (WindowsProvider computes isMainWindow from that label)
Auxiliary window path uses same label-resolution dependency:
src/context/WindowsContext.tsx (useAuxiliaryWindowInfo() fallback path)
Impact
Medium. Browser-based local testing path appears broken and blocks contributor/dev workflows.
Environment
npm run tauri devhttp://localhost:1420andhttp://localhost:1420/welcomeSummary
In browser dev mode on macOS, app initialization crashes with:
TypeError: Cannot read properties of undefined (reading 'metadata')The app shows the "Failed to Initialize" fallback and becomes unusable in that context.
Steps To Reproduce
npm run tauri dev.http://localhost:1420in a regular browser tab on macOS.Expected
Browser path should either:
Actual
Initialization fails and displays:
Failed to InitializeThe application could not load its core systems.TypeError: Cannot read properties of undefined (reading 'metadata')Code Evidence
Browser failure surfaces through initialization fallback UI:src/context/OptimizedProviders.tsx (ErrorFallback renders err.toString())
Window initialization depends on Tauri webview metadata:src/context/WindowsContext.tsx (getSafeCurrentWindowLabel() calls getCurrentWebviewWindow().label)
src/context/WindowsContext.tsx (WindowsProvider computes isMainWindow from that label)
Auxiliary window path uses same label-resolution dependency:Impact
Medium. Browser-based local testing path appears broken and blocks contributor/dev workflows.