Skip to content

BUG | useRezizeObserver | useTemplateRef results in Set operation on key "value" failed: target is readonly #4759

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

Open
7 tasks done
OrbisK opened this issue May 20, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@OrbisK
Copy link
Collaborator

OrbisK commented May 20, 2025

Describe the bug

passing a template ref with useTemplateRef to useRezizeObserver results in

[Vue warn] Set operation on key "value" failed: target is readonly.[object Object]

Reproduction

https://playground.vueuse.org/?vueuse=13.2.0#eNp9UktP3DAQ/isjq1IWKSRS29Mqi/oQh/ZQqi23GolsMkkMjh3ZzrIQ5b8zttmHAJFL7Pke+mbGE/s+DNl2RLZkha2MGBxYdOMAslTtijNnObvgSvSDNg4mGC2u0YonvNpYNFs0MENjdA/JN3IhNK+0weREYbtSSv2wxib16mvsB1k6cmkOUlKSgqtKK+sAJaxeMRcJyuRsT3C4c0Q5Gi8SD3L1JtwCZQoLVM4ItGewuoCJK4Bo89/XH2/I6YVwhCZ4ELXrUuhQtJ2joJH0mBHu6LTGynm6j5JtSzkiMW6DaAmfpnCYOVdR70vxNN9yNVPWIo/DptHSxb10SjeAQmmHUMnSWpp/vzn/HDYA9MXmwHUIG70Dp2lXRO1oVTF9kXtxtPHRSoMlGGzICCVnB1cTjAxVamHLjcQatude4DdOPwJycinyk2QspcdA7Teize6sVvRiwjA5q3Q/CInmanCCxsfZMo7ZY2FFv0PNmRHTfb3qsLp/p35nd77G2V/K6HfI2QGjdlqkbB6+/Pcn5DyAva5HSewPQBqflqPPGGk/RlVT7BNeSPsrvFyh2mt7uaNl231TPqhnzoHPGT3bnx+0foz7JfsadLR7Nj8DVRwuCg==

System Info

System:
    OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 45.10 GB / 62.58 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 23.5.0 - ~/.nvm/current/bin/node
    npm: 10.9.2 - ~/.nvm/current/bin/npm
    pnpm: 10.7.1 - ~/.nvm/current/bin/pnpm
    bun: 1.1.42 - ~/.nvm/current/bin/bun
  Browsers:
    Chrome: 130.0.6723.69
  npmPackages:
    @vueuse/nuxt: 13.0.0 => 13.0.0 
    @vueuse/router: ^13.0.0 => 13.0.0 
    vue: ^3.5.13 => 3.5.13

Used Package Manager

pnpm

Validations

@OrbisK
Copy link
Collaborator Author

OrbisK commented May 25, 2025

@prosperxo you can take this one

@ilyaliao ilyaliao added bug Something isn't working and removed pending triage labels May 29, 2025
@cszhjh
Copy link

cszhjh commented Jun 2, 2025

Hi, I’ve encountered the same issue. However, I found that this problem only occurs in Vue 3.15.0. It has already been fixed in versions later than 3.15.0.

Related issue: vuejs/core#11795

Related changelog: https://github.com/vuejs/core/blob/main/CHANGELOG.md#351-2024-09-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants