How to fix "Project is either corrupt or missing"

I was busy on a v7 project. Hit Start in Desktop Browser … nothing happened. (I have been working on it for hours with no issues with Deploy).

I then thought let me exit Appstudio and restart. By answering Yes or No to save project it does not exit.

Next I ended Appstudio from Windows Task Manager.

Then when reopening it gives Project is either corrupt or missing. (It is not missing all there)

Firstly how can I recover my project and secondly why did this happen.

Many Thanks

Yikes - this should never happen. Any chance you can zip up the project folder so I can have a look?

You might have to go to a backup. Since Version 7 saves the project as separate files, you will still be able to copy code modules, etc. from the damaged project. All is not lost!

Let’s work directly on this one - it will be faster.

This happened to me a few times in version 6.x. In those cases the entire project was lost. So version 7.x should be more secure in being able to recover without a backup. It always/only happened when a Save got “stuck”. When this happened the SDK became unresponsive and the only way out was using the task manager to kill the program. I would look at what happens during a Save and also (and this is just a guess) see if doing an all code Search prior might be related. I’ve had strange things happen after a search, but very rare and un-reproduceable.

You’re right - while these events are extremely rare, we can do a lot more to fix things when they do happen in Version 7.

The project has been repaired. We’re tearing apart the code to figure out how this could have happened.

I reported something like this in November 2018. Following is a copy of the thread. I could solve it this way. Maybe this does help here as well:

Thank you - this is helpful.

George Henne
gh@nsbasic.com

On Nov 3, 2018, at 6:50 PM, Bernd Sommer <bsommer@bsommer.de> wrote:

PS 2:

… and in folder “Elements” of the corrupt project both input1 and input2 json were missing.

I copied the missing control(s) from the repeated project to the folders and the before mentioned file (only input2 missing) of the corrupt project. Now it could be opened again.

What was the fix for this?

We made some changes to AppStudio 7.2.1 to prevent this from happening. Make sure you’re up to date!

First off, I am on 7.0.4.0. I will look at updating…
For anyone else n this situation, here is how I fixed it.
I explored the directory of the form/elements I was making changes in. I went to the highest level json file and checked the children and confirmed all child json files existed and continued down the chain until I found a missing json file. I removed that child from the json file and saved. That allowed me to bring the project up and rebuild from there. Luckily for me, I was working on containers that had html code in them which I was able to recover from the index.html file.