Error Saving Project

I tried to save my project but got this error:

  1. What browsers show this problem?
  2. Please share an example project (if possible).
  3. Describes the steps to reproduce this issue.
    Try to save a project
  4. What does Snap! currently do?
    Give an error
  5. What should Snap! do instead?
    Save the project to Snap!Cloud

can you give me the project file so I can test it out and see if I can find out what's wrong?

Hold on, it only happens with projects called "Test"

when I saved a project a project as "test" or "Test" it works fine

Huh, the project is simple, I just made it to test a very simple script.

ok, what's the script?

It was
when I receive (Hello World!)
say [Hello World!]

huh, I tried it and saved it as "Test", saved just fine

So, am I understanding correctly that this isn't a crisis, such as a term project in a class being lost?

@bromagosa Can this be a transient caused by the cutover? It's apparently not reproducible.

@spaceflyer234, did you previously have a project named Test that you deleted, maybe?

Yes, I do believe I did.

I deleted my project that was called Test (forgot to delete it when I was trying to replicate this bug) and then saved a project as Test, saved just fine.

Huh, weird.

Just fixed it now :slight_smile:

Yay! What was the issue?

Y did it occur then?

TLDR; because of dependent relationships in the database.

We don't delete projects immediately, just mark them as deleted just in case the user deleted them accidentally and wants to recover them later.

When you save a project under the name of a previously deleted one, the latter gets deleted for good to make room for the new one. Since these deleted projects had either been remixed or added to collections before being deleted, the system could not delete them without first removing them from the collection they belonged to, or removing their reference(s) in the remix table.

I had just forgotten about these cases, so the system was trying to delete a project without first fixing these reference issues, and failed.

Oh, makes since.