Skip to content
New issue

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

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

Already on GitHub? # to your account

[i18n] App crashes from parse errors due to incomplete file saves #1115

Closed
5 tasks done
breadgrocery opened this issue Oct 27, 2024 · 0 comments · Fixed by #1114
Closed
5 tasks done

[i18n] App crashes from parse errors due to incomplete file saves #1115

breadgrocery opened this issue Oct 27, 2024 · 0 comments · Fixed by #1114
Labels
bug Something isn't working

Comments

@breadgrocery
Copy link
Contributor

Describe the bug

Editor autosave (triggered by delays or loss of focus) may save incomplete files if a user pauses to think or switches tabs, leading to parse failures in updateLocalizations during HMR. Uncaught errors in updateLocalizations then cause the whole app to crash, which is undesirable.

Reproduction

Saving incomplete locale files during dev crushes the whole app.

Steps to reproduce

  1. Run pnpm dev to start the app
  2. Modify and save incomplete locale files (.yaml files for example) which would cause parse error
  3. The app crushes

System Info

System:
  OS: Windows 10 10.0.19043
  CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
  Memory: 10.65 GB / 15.86 GB
Binaries:
  Node: 20.15.0 - D:\nodejs\node.EXE
  npm: 10.8.3 - D:\nodejs\npm.CMD
  pnpm: 9.12.2 - ~\AppData\Local\pnpm\pnpm.CMD
  bun: 1.1.32 - ~\.bun\bin\bun.EXE
Browsers:
  Edge: Spartan (44.19041.1266.0), Chromium (127.0.2651.74)
  Internet Explorer: 11.0.19041.1566
npmPackages:
  wxt: workspace:* => 0.19.13

Used Package Manager

pnpm

Validations

@breadgrocery breadgrocery added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label Oct 27, 2024
@aklinker1 aklinker1 added bug Something isn't working and removed pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug labels Nov 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants