Repository navigation
Fix Windows desktop API offline / Failed to fetch - #25
Merged
Merged
Conversation
Spawn Node with CREATE_NO_WINDOW, keep http://tauri.localhost (no mixed content), broaden CORS for *.localhost, improve offline UI with log path, and smoke-test the sidecar in CI. Co-authored-by: Damon <[email protected]>
Packaged builds now copy ui-dist into Tauri resources, pass PRM_UI_DIR to the sidecar, and open the webview at http://127.0.0.1:8787/ so /api is same-origin. Also harden Windows spawn logging and exe-relative sidecar discovery. Co-authored-by: Damon van der linde <[email protected]>
1 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Packaged Windows builds show API offline with
Failed to fetch(and the web-dev hint to runpnpm dev:api). The UI loads, but the webview cannot reliably call the Node sidecar onhttp://127.0.0.1:8787(spawn/CORS/cross-origin fetch issues).Fix
apps/ui/dist→src-tauri/ui-dist, passPRM_UI_DIRto the sidecar, serve static files from the API, and open the webview athttp://127.0.0.1:8787/so/apiis same-origin.CREATE_NO_WINDOW, append child stdio todesktop-api.log(no pipe deadlock), exe-relative sidecar discovery.*.localhost/tauri://; keepuse_https_scheme(false)./after each desktop matrix build.Verify
PRM_UI_DIRreturns/api/healthand HTML for/.desktop-windows-x86_64artifact frommainCI (not a pre-fix build).%APPDATA%\com.prm.workbench\desktop-api.log.Notes
You are currently on a build that still shows the
pnpm dev:apimessage (pre–desktop offline copy). This PR’s artifact will show a desktop-specific offline screen if the sidecar fails, or skip that screen entirely when same-origin load succeeds.