mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5724] [CLOSED] fix(desktop): prevent white screen when URI handler fails #5329
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5329
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5724
Author: @GaoSSR
Created: 12/24/2025
Status: ❌ Closed
Base:
main← Head:fix/desktop-white-screen-issue-5722📝 Commits (2)
54732cdfix(desktop): prevent white screen by improving error handling in URI handler98511fcfix(security): escape HTML in error messages to prevent XSS📊 Changes
2 files changed (+148 additions, -2 deletions)
View changed files
📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/lib.rs(+66 -1)📝
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/uri/handler.rs(+82 -1)📄 Description
Summary
This PR fixes the white screen issue reported in #5722.
Root Cause
The white screen occurs due to two issues in the
tauri-plugin-apploadmodule:lib.rs:153: Used.unwrap()on the URI handler result, which could panic and crash the webview when the handler failshandler.rs: Returned an empty 404 response when cache lookup fails, causing the webview to display a blank pageChanges
lib.rs: Replaced.unwrap()with amatchstatement that catches errors and returns a user-friendly error page with a reload buttonhandler.rs: Added comprehensive error handling that displays a styled error page with technical details instead of an empty responseBefore
When the cache lookup fails or URI handler encounters an error, the app shows a blank white screen with no indication of what went wrong.
After
Users now see a helpful error page with:
Test Plan
Closes #5722
Summary by cubic
Prevents the desktop app from turning into a white screen when the URI handler fails by serving a helpful error page and avoiding panics; also escapes error details to prevent XSS. Fixes #5722 and #5716.
Written for commit
98511fca1b. Summary will update automatically on new commits.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.