This is a generic error message, so everyone that gets the error won't have the same problem. However, using the methods described below could help find other problems as well.
The project files for the MINDSTORMS programming software are just ZIP files and can be opened with standard ZIP file tools. For Scratch-based software like EV3 Classroom, this file contains 3 files, one of which is scratch.sb3
. The scratch.sb3
file is another ZIP file and can be extracted as well. Inside of the scratch.sb3
are two files, one of which is project.json
. This is the actual project code file.
This file contains minified JSON that is hard to read, but modern code editors like Visual Studio Code contain tools to automatically format the file in a more readable way. Once this is done, an experienced coder can use their intuition to look for anomalies in the file.
The JSON file contains a top-level object with 4 sections, "targets"
, "monitors"
, "extensions"
and "meta"
. The contents of these sections will depend on the project, but in general, "targets"
contains an array of two objects, one where "isStage": true
and one where "isStage": false
. The former looks to be default Scratch stuff that isn't used and the latter is the bulk of the project file. The "monitor"
section will be empty unless you have monitors (variable value watchers) set up in your project. The "extensions"
section contains a list of the different block types used in your project and "meta"
is some more default Scratch stuff.
I was able to find the issue with the file provided by noticing that in the "targets"
section, there were two "isStage": true
and two "isStage": false
objects. So it appears that somehow two versions of the project got saved in the same file. I was able to recover the projects by making two copies of the original file. In one, I deleted the second two targets and in the other I deleted the first two targets. I used a diff tool to compare the contents of these and they similar but not identical, so I deduced that they are two versions of the same project. I then updated the ZIP files with the modified project.json
and was able to open the projects in the EV3 Classroom software.