Skip to content

Saving doesn't work properly #1591

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

Open
patfr opened this issue Aug 31, 2020 · 13 comments
Open

Saving doesn't work properly #1591

patfr opened this issue Aug 31, 2020 · 13 comments

Comments

@patfr
Copy link

patfr commented Aug 31, 2020

Nature of issue?

  • Found a bug

Details about the bug:

  • Web browser and version: Chrome version 84.0.4147.110
  • Operating System: ChromeOs version 84.0.4147.110
  • Steps to reproduce this bug: Open the web editor make a new project and save it then open a new tab and insert the URL for the project and add /index.html to the end now the new tab will show your project but only the version the project was when you saved it for the first time
@welcome
Copy link

welcome bot commented Aug 31, 2020

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.

@debajitdeb11
Copy link

@patfr Hi, I have just done the same on my browser but the save option is working fine for me

@catarak
Copy link
Member

catarak commented Sep 3, 2020

Thanks for reporting! I think this is a cacheing issue rather than a saving issue. The solution would be similar to how #1234 was fixed—adding a header so that the endpoint doesn't get cached ever.

@m-e-l-u-h-a-n
Copy link

m-e-l-u-h-a-n commented Dec 15, 2020

Hi, @catarak can I try to fix this issue!
I am able to reproduce it, so can I try to fix it out?

@catarak
Copy link
Member

catarak commented Dec 15, 2020

@m-e-l-u-h-a-n yes! you can go ahead and work on this issue 😄

@m-e-l-u-h-a-n
Copy link

m-e-l-u-h-a-n commented Dec 17, 2020

@catarak I followed the dev-setup installation from develop/developer_docs/installation.md but when I start the development server using npm start and open it in browser, it opens fine. But I am not able to login in to the dev server the page is stuck as it is and no logs/errors are there in the console. I have development setup on:
OS: Ubuntu 20.04
Mongo Db Atlas, and manual method(not github login) for login.
I has signed up using manual(email password) method, and can see the new user created in Mongo Db compass.
Can you please guide me over what could be the problem?
Sorry for reaching out from here as I could not find any community channel for the project. I found one slack channel link from Gsoc page but it allows login/signup only if one has @processing.org email address.

EDIT: Also tried the github login but it does not redirects to the Authorization Callback URL after authenticating.

@catarak
Copy link
Member

catarak commented Dec 17, 2020

If you look at the API request for login (like in the Network developer tools) when you submit your username/password, is there an error code or does it return a 200 code?

@m-e-l-u-h-a-n
Copy link

m-e-l-u-h-a-n commented Dec 17, 2020

Yes it did return a response code of 200 but, it also returned me following TypeError in the console:

image for error

Upon looking at line 66 in actions.js as suggested by the error console, I saw that execution did reached the catch block, because error.response was tried to be accessed their. Is it some bug, or am I proceeding in some wrong direction?

@catarak
Copy link
Member

catarak commented Dec 17, 2020

Thanks for looking into this! I'm able to reproduce the same error. I believe it was introduced by #1707—will try to fix this now.

@catarak
Copy link
Member

catarak commented Dec 17, 2020

Okay, I was actually able to figure this out! Turns out it's not an issue with #1707, it's an issue with the npm library mongo-connect and mongodb+srv urls. I'm going to open a PR and fix this!

@m-e-l-u-h-a-n
Copy link

Thanks, @catarak for a really quick fix 😄 !

@m-e-l-u-h-a-n
Copy link

@catarak I have checked for this issue and was not able to reproduce it in development mode. Although I can still reproduce it in the editor.p5js.org website. A summary of what I tried out(In my development server):

  • After login I created a sketch and saved it's version-1(initial save).
  • Then in another tab I opened the sketch's url along with /index.html appended to it.
  • And then I made changes to my sketch in previous tab, and saved next version of the sketch and in another(one more new) tab I repeated step 2 and changes were in sync with the latest version of the project.
  • I tried saving many further versions and found that every time I repeated step-2 it was in sync with the latest version of the sketch.
    I also did same with different windows of my browsers, and the results were same.
    If I am following the pathway described in the issue to reproduce it, I think this issue is probably resolved in development mode.

@catarak
Copy link
Member

catarak commented Feb 12, 2021

This must have something to do with caching via Cloudflare 😕

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

No branches or pull requests

5 participants