sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
76.8k stars 3.98k forks source link

[Svelte 5.0.0-next.121 + Bits-UI] Blank UI and SSR issues #11449

Closed raulfdm closed 2 weeks ago

raulfdm commented 2 weeks ago

Describe the bug

I'm not quite sure what happens, but using bits-ui + svelte@5.0.0-next.121 starts breaking while with 5.0.0-next.120 it works.

https://github.com/sveltejs/svelte/assets/12464600/18b8454e-ee79-458d-99c2-43a15b2cdc09

Reproduction

https://github.com/raulfdm/svelte5-bug-bits-ui

Logs

[svelte] hydration_mismatchHydration failed because the initial UI does not match what was rendered on the server
Uncaught (in promise) TypeError: Cannot destructure property 'elements' of 'getCtx9(...)' as it is undefined.
    at Menu_trigger (bits-ui.js?v=7b87a2de:28631:21)
    at Object.fn (chunk-PDGKK6TR.js?v=7b87a2de:136:44)
    at execute_reaction_fn (chunk-HYHRNWW7.js?v=7b87a2de:1054:22)
    at execute_effect (chunk-HYHRNWW7.js?v=7b87a2de:1171:20)
    at create_effect (chunk-HYHRNWW7.js?v=7b87a2de:368:7)
    at branch (chunk-HYHRNWW7.js?v=7b87a2de:449:10)
    at Object.fn (chunk-PDGKK6TR.js?v=7b87a2de:132:17)
    at execute_reaction_fn (chunk-HYHRNWW7.js?v=7b87a2de:1054:22)
    at execute_effect (chunk-HYHRNWW7.js?v=7b87a2de:1171:20)
    at create_effect (chunk-HYHRNWW7.js?v=7b87a2de:368:7)

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 758.30 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/Library/pnpm/node
    npm: 10.2.4 - ~/Library/pnpm/npm
    pnpm: 8.15.4 - ~/Library/pnpm/pnpm
    bun: 1.1.6 - ~/.bun/bin/bun
    Watchman: 2024.03.25.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 124.0.6367.119
    Edge: 121.0.2277.128
    Safari: 17.4.1
  npmPackages:
    svelte: 5.0.0-next.121 => 5.0.0-next.121

Severity

blocking an upgrade

AdrianGonz97 commented 2 weeks ago

This issue was fixed in https://github.com/sveltejs/svelte/pull/11438 and released as part of 5.0.0-next.123

WhyAsh5114 commented 2 weeks ago

This issue was fixed in #11438 and released as part of 5.0.0-next.123

Yep, can confirm, was experiencing this a few hours ago, and it's working now

dummdidumm commented 2 weeks ago

-next.123 fixed this

raulfdm commented 2 weeks ago

Fixed indeed. Thank you! 🙌