Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Calls to custom schemes freeze the application #3421

Closed
Trivernis opened this issue Feb 12, 2022 · 4 comments
Closed

[bug] Calls to custom schemes freeze the application #3421

Trivernis opened this issue Feb 12, 2022 · 4 comments
Labels
status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug

Comments

@Trivernis
Copy link

Describe the bug

When fetching data via custom schemes with slightly longer running logic handling the requests the application freezes for the duration of the request. This behaviour seems to be more extreme when having multiple requests to custom schemes at once.
I observed this behaviour with custom schemes being used in image elements but I'd imagine that this is a general problem.

Reproduction

  1. Register a custom scheme that runs for a while (e.g. by using sleep calls)
  2. Call this custom scheme (by registering a scheme url as an image source for example)
  3. The application freezes for the duration of the request

Expected behavior

Calls to custom schemes should not freeze the application.
If this is unavoidable with synchronous handlers, at least having an option for using asynchronous calls would be nice.

Platform and versions

Operating System - Arch Linux, version Rolling Release X64

Node.js environment
  Node.js - 16.13.2
  @tauri-apps/cli - 1.0.0-beta.10
  @tauri-apps/api - 1.0.0-beta.8

Global packages
  npm - 8.1.2
  yarn - 1.22.17

Rust environment
  rustc - 1.58.1
  cargo - 1.58.0

App directory structure
/src-tauri
/src
/node_modules
/.idea
/.angular
/dist

App
  tauri.rs - 1.0.0-beta.8
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self' once: thumb: content:
  distDir - ../dist/mediarepo-ui
  devPath - http://localhost:4200
  framework - Angular
  bundler - Webpack

Stack trace

No response

Additional context

I've reproduced this behaviour with a minimal tauri app. My real use case is calling custom schemes that then use an asynchronous runtime to block on asynchronous callbacks.

@amrbashir
Copy link
Member

I think this should be fixed in wry.

@amrbashir
Copy link
Member

/upstream tauri-apps/wry

@tauri-apps
Copy link

tauri-apps bot commented Feb 28, 2022

I have created an upstream issue at tauri-apps/wry#511, I will notify you once it is resolved.

@tauri-apps tauri-apps bot added the status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes label Feb 28, 2022
@lucasfernog lucasfernog added the type: breaking change This issue or pull request will introduce a breaking change and requires major version bump label Jul 4, 2022
@lucasfernog
Copy link
Member

Closed by #7754 (will be fixed on v2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: breaking change This issue or pull request will introduce a breaking change and requires major version bump type: bug
Projects
None yet
Development

No branches or pull requests

3 participants