[GH-ISSUE #1233] [Issue]: Refactor Vite image connection setup shows raw Tauri invoke error #606

Closed
opened 2026-10-20 17:30:40 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @cha1latte on GitHub (May 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1233

Originally assigned to: @cha1latte on GitHub.

Summary

On upstream/refactor, trying to create an Image Generation connection in the plain Vite web shell without a remote runtime shows a raw Tauri IPC error. The user sees Cannot read properties of undefined (reading 'invoke') instead of guidance about needing the Tauri shell or Remote Runtime URL.

Expected behavior

The web shell should either create the connection through an available runtime, or show a clear setup error such as "Remote Runtime URL is not configured" / "This action requires the Tauri app shell."

Actual behavior

Clicking Create for an Image Generation connection shows a raw JavaScript/Tauri implementation error:

Cannot read properties of undefined (reading 'invoke')

Steps to reproduce

  1. Check out upstream/refactor at commit 507e64ac.
  2. Run the Vite app.
  3. Do not configure Remote Runtime URL.
  4. Open Connections.
  5. Click Add Connection.
  6. Enter a name.
  7. Select Image Generation.
  8. Click Create.

Marinara Engine version

upstream/refactor commit 507e64ac

Install type

Source

OS + version

Windows, exact version not specified

Browser or app shell

Vite web shell in Chromium/Playwright

Screenshots or video

Raw Tauri invoke error when creating image connection

Logs

User-facing toast:

Cannot read properties of undefined (reading 'invoke')

Additional context

Likely owner/component: src/shared/api/tauri-client.ts runtime detection/error normalization and connection creation via storage API.

This blocks fresh browser/remote setup before users can configure image generation.

Template check

  • I provided the required summary, behavior, reproduction, and environment details.
  • If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
Originally created by @cha1latte on GitHub (May 26, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1233 Originally assigned to: @cha1latte on GitHub. ### Summary On `upstream/refactor`, trying to create an Image Generation connection in the plain Vite web shell without a remote runtime shows a raw Tauri IPC error. The user sees `Cannot read properties of undefined (reading 'invoke')` instead of guidance about needing the Tauri shell or Remote Runtime URL. ### Expected behavior The web shell should either create the connection through an available runtime, or show a clear setup error such as "Remote Runtime URL is not configured" / "This action requires the Tauri app shell." ### Actual behavior Clicking `Create` for an Image Generation connection shows a raw JavaScript/Tauri implementation error: ```text Cannot read properties of undefined (reading 'invoke') ``` ### Steps to reproduce 1. Check out `upstream/refactor` at commit `507e64ac`. 2. Run the Vite app. 3. Do not configure Remote Runtime URL. 4. Open Connections. 5. Click `Add Connection`. 6. Enter a name. 7. Select `Image Generation`. 8. Click `Create`. ### Marinara Engine version `upstream/refactor` commit `507e64ac` ### Install type Source ### OS + version Windows, exact version not specified ### Browser or app shell Vite web shell in Chromium/Playwright ### Screenshots or video ![Raw Tauri invoke error when creating image connection](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/issue-evidence/image-generation-refactor-20260526/refactor-no-remote-create-connection-error.png) ### Logs User-facing toast: ```text Cannot read properties of undefined (reading 'invoke') ``` ### Additional context Likely owner/component: `src/shared/api/tauri-client.ts` runtime detection/error normalization and connection creation via storage API. This blocks fresh browser/remote setup before users can configure image generation. ### Template check - [ ] I provided the required summary, behavior, reproduction, and environment details. - [ ] If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
bsakaguchi 2026-10-20 17:30:40 +07:00
Author
Owner

@Xelvanis commented on GitHub (May 26, 2026):

Related transport edge case from the audit: configured-but-invalid Remote Runtime URL should fail closed too. Right now remoteRuntimeTarget() catches URL parsing errors and returns null, which lets invokeTauri() fall through to embedded Tauri. In browser mode that can become a raw invoke failure; in desktop it can read/write local data when the user intended remote data.

I split that into #1246 because this ticket is specifically about missing runtime setup in Vite, but the fix likely belongs near the same runtime detection/error normalization path.

<!-- gh-comment-id:4544643585 --> @Xelvanis commented on GitHub (May 26, 2026): Related transport edge case from the audit: configured-but-invalid Remote Runtime URL should fail closed too. Right now `remoteRuntimeTarget()` catches URL parsing errors and returns null, which lets `invokeTauri()` fall through to embedded Tauri. In browser mode that can become a raw invoke failure; in desktop it can read/write local data when the user intended remote data. I split that into #1246 because this ticket is specifically about missing runtime setup in Vite, but the fix likely belongs near the same runtime detection/error normalization path.
Author
Owner

@franko-c commented on GitHub (May 26, 2026):

from what I can see, tauri-client.ts:19 — invokeTauri falls through to invoke() when remoteRuntimeTarget() returns null. in a vite web shell window.__TAURI_INTERNALS__ is undefined.

if (typeof window.__TAURI_INTERNALS__ === "undefined") {
  throw new ApiError("Remote Runtime URL is not configured", 400);
}

storage_create is in REMOTE_COMMANDS — gap is the else-branch when neither runtime is set. haven't checked if other image commands hit the same path.

<!-- gh-comment-id:4546104185 --> @franko-c commented on GitHub (May 26, 2026): from what I can see, `tauri-client.ts:19` — `invokeTauri` falls through to `invoke()` when `remoteRuntimeTarget()` returns null. in a vite web shell `window.__TAURI_INTERNALS__` is undefined. ```ts if (typeof window.__TAURI_INTERNALS__ === "undefined") { throw new ApiError("Remote Runtime URL is not configured", 400); } ``` `storage_create` is in REMOTE_COMMANDS — gap is the else-branch when neither runtime is set. haven't checked if other image commands hit the same path.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#606
No description provided.