Skip to content
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

Cache Remains and Crash the New Project #133

Open
munusshih opened this issue May 25, 2022 · 7 comments
Open

Cache Remains and Crash the New Project #133

munusshih opened this issue May 25, 2022 · 7 comments
Labels
bug:bug: Something isn't working

Comments

@munusshih
Copy link
Contributor

munusshih commented May 25, 2022

Describe the bug
The new project might constantly crash and the whole site will go blank if you try to interact with it. This is probably caused by the remaining local storage cache. Since you have opened another project and interacted with the sidebar before in the custom preset, it remembers the cache will crash your new project that has the same project name or function name (unsure) if the parameters don't match.

To Reproduce
Steps to reproduce the behavior:

  1. Go create and run dev for any project using the default project name and function name
  2. Play with its sidebar in the custom preset
  3. Close this first project
  4. Now create another project using the default project name and function name in a different folder
  5. Play with its sidebar in the custom preset
  6. See the error

Expected behavior
The site will go completely blank with error messages in the console stating that some of the sidebar values are null

Screenshots

Screen.Recording.2022-05-25.at.2.45.10.PM.mov

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: chrome
  • Version: 2.0.0-beta.7

Additional context
Local Cache Memory Related.

@munusshih munusshih added the bug:bug: Something isn't working label May 25, 2022
@fdoflorenzano
Copy link
Contributor

Hey @munusshih ! Could you please share at least part of the erros stacks that you get with this?

Also, I think you added the incorrect video.

@fdoflorenzano
Copy link
Contributor

@munusshih I was able to recreate an error. Not with the DSI logo maker though, but with same named functions in different projects. Can you specify the name of the functions you interacted with in DSI logo maker and in the new project? Because from what I remember, the name of functions should be enough to tell local storage apart. If they are called differently, maybe the issue was with another project, or it's another issue all together.

@munusshih
Copy link
Contributor Author

@fdoflorenzano Thanks for pointing that out. Lemme update my post.

@munusshih
Copy link
Contributor Author

No come to think of it I name all of them with the default project name my-project and default function name my-function but in different folders. Maybe that's why?

@fdoflorenzano
Copy link
Contributor

@munusshih Unless you also find that somehow using the DSI maker project before affected the run, it may be just that. If you can post the error stack in a comment either way, I would appreciate it.

@munusshih
Copy link
Contributor Author

I've done some different combinations and surprisingly was unable to recreate the error even with the same function name in different folders.... but these are the error stacks

  • The above error occurred in the component
  • Uncaught TypeError: Cannot read properties of undefined (reading "hasOwnProperty")

@lucasdinonolte
Copy link
Contributor

This could really be about the same function name. The function name is used to generate the params' cache key in localStorage. So you could run in situations where mechanic loads an incompatible version of the cached params into a function that has the same name as the function that cached those values.

If this is the cause of this #140 should fix it 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:bug: Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants