Skip to content

Cannot access local files upon revisiting page #592

@its-all-waves

Description

@its-all-waves

Tool

Hardware Simulator

Interface

Website (https://nand2tetris.github.io/web-ide)

To Reproduce

  • visit /chip route
  • click Settings > Select a Projects Folder
  • allow "Edit File" permissions when prompted by browser
  • observe that local files can be opened and edited successfully
  • close tab/window
  • revisit /chip route
  • click OK on alert: "Please grant permissions to use your local projects folder"
    • observe console error:
      • Uncaught (in promise) NotAllowedError: The request is not allowed by the user agent or the platform in the current context.
  • observe that selecting any HDL from the dropdown does not load the file
    • observe console error:
      • Uncaught (in promise) NotAllowedError: Failed to execute 'getDirectoryHandle' on 'FileSystemDirectoryHandle': The request is not allowed by the user agent or the platform in the current context.
  • observe that even selecting from 'Builtin' files does not load the file
  • observe that disabling Chromium extensions does not fix the issue
  • observe that granting browser Full Disk Access (macOS Privacy & Security settings) does not fix the issue

Additional Observations

  • sometimes when having this issue...
    • Settings > Select Projects Folder...
      • is disabled
      • is active, but does not show the file picker when clicked
        • on click --> console error:

          stack: "AbortError: Failed to execute 'showDirectoryPicker' on 'Window': The user aborted a request."
          code: 20
          message: "Failed to execute 'showDirectoryPicker' on 'Window': The user aborted a request."
          name: "AbortError"
          

Workaround

Start over, entirely (this works only once per visit to /chip route):

  • in Arc (Chromium) dev tools, press CMD+SHIFT+P (control pallete) > Clear Site Data (including third-party cookies)
  • close tab/window
  • revisit /chip route
  • click Settings > Select a Projects Folder
  • allow "Edit File" permissions when prompted by browser
  • observe that local files can be opened and edited successfully

System

macOS Ventura 13.7.2
Arc Browser 1.108.0 (66882) / Chromium Engine Version 139.0.7258.128

Metadata

Metadata

Assignees

No one assigned

    Labels

    Local FSLocal File System issues are specific and a big issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions