Subscribe on changes!

Reactive Proxy read only issue

avatar
Mar 15th 2021

Version

3.0.7

Reproduction link

https://codesandbox.io/s/vue-composition-api-example-forked-j5dej?file=/src/App.vue

Steps to reproduce

Include twilio-video and set a localvideotrack to reactive state

See here: https://codesandbox.io/s/vue-composition-api-example-forked-j5dej?file=/src/App.vue

What is expected?

The set state to be reactive

What is actually happening?

I am getting an error setting the state in Chrome and Firefox.

Error from Chrome: Uncaught (in promise) TypeError: 'get' on proxy: property 'dimensions' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '#' but got '[object Object]')


Upgrading old Vue 2 project from scratch unfortunately run into issue with proxy

avatar
Mar 15th 2021

Please boil down the problew without external dependencies like twilio-video. You likely need to use

import { markRaw } from 'vue'
markRaw(await createLocalVideoTrack({ video: true }))
avatar
Mar 15th 2021

duplicate of #3024

avatar
Mar 15th 2021

@posva I cannot believe I overlooked that when it quite clearly states in clear english re complex third party classes.

@LinusBorg I see it, but it doesn't look like it is in a hurry to be merged in

markRaw has solved this painful issue for me... thank you...

avatar
Mar 15th 2021

it doesn't look like it is in a hurry to be merged in

opening another issue for it won't make it happen any quicker on its own ;) We just have a full plate and need to prioritize

Good you have a workaround now, though.

avatar
Mar 15th 2021

it doesn't look like it is in a hurry to be merged in

opening another issue for it won't make it happen any quicker on its own ;) We just have a full plate and need to prioritize

Good you have a workaround now, though.

Completely understandable, thank you

avatar
Jul 25th 2022

Just to add to this. Avoid placing complex objects in a reactive object. 3rd party plugin in an object doesn't need to be reactive.