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

Reactive Proxy read only issue #3424

Closed
JshGrn opened this issue Mar 15, 2021 · 6 comments
Closed

Reactive Proxy read only issue #3424

JshGrn opened this issue Mar 15, 2021 · 6 comments

Comments

@JshGrn
Copy link

JshGrn commented Mar 15, 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

@posva
Copy link
Member

posva commented Mar 15, 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 }))

@posva posva closed this as completed Mar 15, 2021
@LinusBorg
Copy link
Member

duplicate of #3024

@JshGrn
Copy link
Author

JshGrn commented Mar 15, 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...

@LinusBorg
Copy link
Member

LinusBorg commented Mar 15, 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.

@JshGrn
Copy link
Author

JshGrn commented Mar 15, 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

@rationalthinker1
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants