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

Fix "Permission denied to access property "__v_isRef" on cross-origin object" #597

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

nWacky
Copy link
Contributor

@nWacky nWacky commented Jan 2, 2024

Issue reproduction

example page: https://vue-socials.vercel.app/?path=/docs/share-sdevto--default (commit a8cd6c7)

  1. click on a share button
  2. close the popup window
  3. click on a share button again

In Chrome console, there will be two errors:

Uncaught DOMException: Failed to read a named property '__v_isRef' from 'Window': Blocked a frame with origin "https://vue-socials.vercel.app" from accessing a cross-origin frame.

Uncaught DOMException: An attempt was made to break through the security policy of the user agent.

In Firefox a DOMException overlay will be shown. There will be an error in the console:

DOMException: Permission denied to access property "__v_isRef" on cross-origin object

The issue occurs because vue is trying to add reactivity properties to shareDialog.
shareDialog is a cross origin window, and browsers throw an error when doing so

Changes

  • moved shareDialog and shareDialogCloseIntervalId to a non-reactive dialog object in BaseSocial.ts
  • updated IBaseSocialDataOptions

Copy link

vercel bot commented Jan 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vue-socials ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 2, 2024 4:06pm

@thekamilRiaz
Copy link

thekamilRiaz commented Jan 17, 2024

@webistomin would you please check because i am also getting this error
ev

@webistomin
Copy link
Owner

Please excuse the delay. I'll release it tomorrow🙏

@webistomin webistomin merged commit b919b9f into webistomin:main Jan 18, 2024
3 checks passed
@webistomin
Copy link
Owner

Fixed in v2.0.5

@beocaca
Copy link

beocaca commented Jan 23, 2024

Hello @webistomin
Thank you for your contribution.
Could you fix this issue in vue-socials@1 . that would be fantastic!

@webistomin
Copy link
Owner

Hello @webistomin Thank you for your contribution. Could you fix this issue in vue-socials@1 . that would be fantastic!

I'll try to find time 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants