P5.js-web-editor: Attempted to save stale version of project

Created on 9 Apr 2020  路  5Comments  路  Source: processing/p5.js-web-editor

Nature of issue?

  • Found a bug

Details about the bug:

  • Web browser and version: Chrome Version 80.0.3987.149 (Official Build) (64-bit)
  • Operating System: Win 10
  • Steps to reproduce this bug: Unclear

When I worked on a previously saved sketch, I noticed it cannot be saved. Neither using [Ctrl + s] nor via the menu. Recording network traffic, I saw that the following request failed:
image

with message
"Attempted to save stale version of project."

Most dangerously, no error is shown. Likely, a user will not notice that the saving failed.

Note: After refreshing the page (and losing any unsaved changes), the sketch can now be saved.

medium bug

Most helpful comment

Got the point causing this issue ( issue is with the axios error handling, axios wrap the server response for error in its own error object check this (https://github.com/axios/axios#handling-errors) , so we need to extract server response for error from the axios error, this problem is in the whole application, will create a pr which will fix all this issues.

All 5 comments

Welcome! 馃憢 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

Thanks for reporting! I'm sorry this happened. There's some code to protect you if you have multiple different versions of a sketch open, but there's some bugs with it that have been hard to track down.

This has come up in the context of #1337, as to support love collaboration features would involve first upgrading how sketch updates are saved.

I have done some investigation over this and found that we already have the stale project error handling code. But still no message is displaying, checking where we are going wrong. Will update you soon.

Got the point causing this issue ( issue is with the axios error handling, axios wrap the server response for error in its own error object check this (https://github.com/axios/axios#handling-errors) , so we need to extract server response for error from the axios error, this problem is in the whole application, will create a pr which will fix all this issues.

i'm not sure if #1404 fixes this, but it certainly helps!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aferriss picture aferriss  路  4Comments

BlinfoldKing picture BlinfoldKing  路  3Comments

aferriss picture aferriss  路  5Comments

slowizzm picture slowizzm  路  4Comments

GaurangTandon picture GaurangTandon  路  4Comments