Skip to content

The remote sketch cache is not invalidated #1841

Open
@kittaakos

Description

@kittaakos

Describe the problem

From here:

Renamed cloud sketch remains in the cache folder

To reproduce

  • Create a cloud sketch,
  • Open IDE2, pull the newly created cloud sketch, and open it in a new window,
  • Rename cloud sketch in the browser,
  • Pull the sketch. Nothing happens, there is an error in the console:
uncaught (in promise) Error: Not found: /rrrr_tttt.
    at CreateApi.stat (/Users/a.kitta/dev/g…t_l-bf9e6e.js:11592)
    at async CreateFsProvider.stat (/Users/a.kitta/dev/g…t_l-bf9e6e.js:11893)
    at async FileService.doResolveFile (/Users/a.kitta/dev/g…e-service_js.js:270)
    at async FileService.resolve (/Users/a.kitta/dev/g…e-service_js.js:254)
    at async CloudSketchbookTree.resolveFileStat (/Users/a.kitta/dev/g…t_l-bf9e6e.js:22416)
    at async CloudSketchbookTree.resolveChildren (/Users/a.kitta/dev/g…og_index_js.js:1924)
    at async FileNavigatorFilter.filter (/Users/a.kitta/dev/g…or-widget_js.js:988)
    at async CloudSketchbookTree.resolveChildren (/Users/a.kitta/dev/g…t_l-bf9e6e.js:24272)
    at async CloudSketchbookTree.resolveChildren (/Users/a.kitta/dev/g…t_l-bf9e6e.js:22382)
    at async CloudSketchbookTree.refresh (bundle.js:53231)
  • Sync the cloud sketchbook view. A sketch is pulled (the new cloud sketch with its new name), but the currently opened sketch is not visible in the sketchbook tree. After the pull, the current cloud sketch is dangling. The sketch with its old name remains in the cache folder under directories.data/CloudSketchbook/ArduinoCloud
  • The IDE2 is fully functional (verify, upload are OK)
  • Quit + start IDE2, the dangling sketch opens, IDE2 is working, but the sketch is not visible in the sketchbook view.

Expected behavior

The sketch cache is invalidated. If not possible, do not cache it.

Arduino IDE version

2.0.3

Operating system

macOS

Operating system version

12.5.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: cloudRelated to Arduino Cloud and cloud sketchestopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions