Skip to content

Error: Permission denied to access property "document" #1236

@Rtnd

Description

@Rtnd

Step 1: Please describe your environment

  • ZeroNet version: 0.6.0 (rev3178)
  • Operating system: Windows 10
  • Web browser: Firefox / Chrome / Tor Browser
  • Tor status: not available/always
  • Opened port: no
  • Special configuration: -

Step 2: Describe the problem:

I wanted to try and port a Javascript (VueJS) app to ZeroNet, but I got the following error:
Error: Permission denied to access property "document"
There was attempt to access an object for which you have no permission. This is likely an <iframe> element loaded from a different domain for which you violated the same-origin policy.

Is it possible to host in ZeroNet Javascript apps?

Steps to reproduce:

  1. For example, a well know example in VueJS is: https://github.com/vuejs/vue-hackernews-2.0/
  2. The production files for that project are generated by running: npm run build.
  3. Create a new ZeroNet site.
  4. Copy the generated dist folder to the new site, and add the script in index.html.
  5. Sign content.json
  6. Try to open the website.

Observed Results:

I get the following message in Firefox console:
SecurityError: Permission denied to access property "document" on cross-origin object

In Tor Browser:
Error: Permission denied to access property "document"

Additional information: There was attempt to access an object for which you have no permission. This is likely an <iframe> element loaded from a different domain for which you violated the same-origin policy.

Expected Results:

Run the application without errors.

English is not my mother tongue; please excuse any errors on my part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions