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] ui shrinks approx 60% in size after wake from sleep in windows 11 #7142

Closed
r3wt opened this issue Jun 6, 2023 · 8 comments
Closed
Labels
platform: Windows status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug

Comments

@r3wt
Copy link

r3wt commented Jun 6, 2023

Describe the bug

was directed here by @FabianLars to report this from discord support.

after waking from sleep, the ui of my app is approximately 60% in size as shown in pic. interacting with the window by moving it or minimizing it doesn't fix it, but as soon as you resize the window, the app "snaps" back to normal size.

Screenshot 2023-06-04 180439

the issue happens often, but not every time.

Reproduction

i have a project setup with create react app and tauri. i developed a basic ui for it, a layout with a navbar, and a sidebar. the css reset used is the one from tailwindcss.

repro steps:

  1. start the project with npm run tauri dev
  2. after the app is running, put the computer to sleep.
  3. wait a few minutes, and wake the computer

it may take a few times, but happens for me nearly every time, but not always, and it doesn't seem to be related to how long the computer was left in the sleep state. eg, i have come back after the computer slept hours and its fine, or come back after only a minute or 2 and its shrank in size as shown in the screen.

Expected behavior

the ui is not shrank in size after wake from sleep

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 114.0.1823.37
    ✔ MSVC: Visual Studio Community 2019
    ✔ rustc: 1.69.0 (84c898d65 2023-04-16)
    ✔ Cargo: 1.69.0 (6e9a83356 2023-04-12)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.16.0
    - npm: 9.5.1

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.2
    - @tauri-apps/api [NPM]: 1.3.0
    - @tauri-apps/cli [NPM]: 1.3.1

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../build
    - devPath: http://localhost:3000/
    - framework: React

Stack trace

No response

Additional context

  • issue occurs intermittently (not every time)
@r3wt r3wt added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jun 6, 2023
@amrbashir amrbashir added status: needs more info Issue needs more information, discussion or reproducible example status: needs repro This issue needs to a minimal complete and reproducible example labels Jun 6, 2023
@amrbashir
Copy link
Member

Could you share exact steps to reproduce?

@xD0135
Copy link

xD0135 commented Jun 8, 2023

I had the exact same thing happen to my sample app once but I have not been able to reproduce. I was using Tauri v1.2x at the time and I dismissed from investigating further once I upgraded to v1.3 as I thought it was a latent bug with 1.2, but seeing that OP has 1.3 I'll try to reproduce it as well.

@r3wt
Copy link
Author

r3wt commented Jun 8, 2023

@amrbashir i added repro steps, but i didn't include a sample app project to run. are you wanting me to prepare a minimalist example to repro?

@amrbashir
Copy link
Member

A minimal example is not needed for this I guess, however I left an app running and put the laptop into sleep mode overnight and when I came back it was working fine, I also tried doing a one or two minute sleep and still worked fine. I haven't been able to reproduce or figure out the cause.

@r3wt
Copy link
Author

r3wt commented Jun 9, 2023

@amrbashir ok, i suppose i can try and debug it, i just don't really know where to start so was hoping you might be able to provide me some suggestions. I am brand new with rust and have difficulty understanding the code at times. i would also be willing to do a screenshare on discord or something and we could try debugging it that way. thanks

@amrbashir
Copy link
Member

upstream issue MicrosoftEdge/WebView2Feedback#3429

@amrbashir amrbashir added status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes platform: Windows and removed status: needs more info Issue needs more information, discussion or reproducible example status: needs repro This issue needs to a minimal complete and reproducible example status: needs triage This issue needs to triage, applied to new issues labels Jun 14, 2023
@r3wt
Copy link
Author

r3wt commented Jun 14, 2023

@amrbashir thanks!

@amrbashir
Copy link
Member

Looks like upstream issue was closed, so gonna close this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: upstream This issue is blocked by upstream dependencies and we need to wait or contribute upstream fixes type: bug
Projects
Status: 📬Proposal
Development

No branches or pull requests

3 participants