Skip to content

404 page crashes in development mode #2166

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

Closed
dewanshDT opened this issue Mar 17, 2023 · 5 comments
Closed

404 page crashes in development mode #2166

dewanshDT opened this issue Mar 17, 2023 · 5 comments

Comments

@dewanshDT
Copy link
Collaborator

Details about the bug:

the 404 page always crashes in development mode making it annoying for the developer to work with the application.

  • p5.js version: any
  • Web browser and version: MS Edge
  • Operating System: windows
  • Steps to reproduce this: just refresh in a non-existing route, or it sometimes happens automatically

image

@dewanshDT dewanshDT mentioned this issue Mar 17, 2023
4 tasks
@lindapaiste
Copy link
Collaborator

lindapaiste commented Mar 18, 2023

I personally have not experienced this. It may have to do with the server/database not being set up on your end. There are a few issues and PRs regarding whether it's possible to develop the frontend without having to setup mongodb:

I also think it's weird that the 404 page is rendered on the server and I opened an issue about that:

This is what I see:
Screenshot 2023-03-17 21 27 51
It doesn't crash, but I also don't get a random sketch displayed like it's supposed to. Looking at the code, that must mean that I'm in the else branch on line 143. Which I guess means that User.findOne({ username: 'p5' } did not find a user for me? Definitely worth digging into more to see what's actually going on.

edit: It seems like in my database I have no p5 user and in your database you have a p5 user with 0 sketches.

@dewanshDT
Copy link
Collaborator Author

yeah, I don't have anything in my MongoDB database, It's running locally, and connected tho. that's why it's crashing due to 0 sketches. In this PR I just added default values to the arguments which prevented it from crashing even without any sketches. what do you think should I close It? @lindapaiste

@dewanshDT dewanshDT reopened this Mar 18, 2023
@lindapaiste
Copy link
Collaborator

Not sure. You've made me realize that I'm missing the p5 examples in my local db so now I'm re-reading the docs on setting up the development environment. I think neither of us did step 10 properly.

@dewanshDT
Copy link
Collaborator Author

dewanshDT commented Mar 19, 2023

Ohh thanks! I've never thought that before
edit: it still crashes after that though 🤔

@raclim
Copy link
Collaborator

raclim commented Jul 11, 2023

Hey, thanks for all of your thoughts on this! After thinking about it, I don't think this specific issue is something we'll focus on for now, since as mentioned earlier, I feel that this might be tied to some mishaps in setting up the dev environment. Maybe some updates to the installation documentation might need to be made, but I think this might be something to revisit later in the future!

@raclim raclim closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants