I’ve sent a support request, but wondering if anyone knows how to fix this issue. Yesterday while working on a makecode project about 70% of my code/blocks disappeared. Although, I can see the full code/preview in History, when I attempt to Restore/Share Copy it reverts directly back to the ‘newest’ version missing more than half my code? Here’s what the code should look like:
Sorry I should have been more clear - the second screenshot, with all the missing blocks, is what loads regardless of me trying to ‘RESTORE’ or ‘SAVE A COPY’. I have tried to SAVE COPY of several different ‘versions’ from history where the missing functions appear to no avail.
As above, I have made multiple copies of several versions. When I attempt to load those copies there are several MISSING functions - ONLY the Functions code blocks are missing however, and all other updates/changes seem fine.
Additionally - within the History View, I am unable to Download hex file at all (the Download as File button just doesn’t work - which I tried as workaround to re-Import manually.
Very frustrating to see my code but not be able to ‘rescue’ it!
Just wanted to show, specifically -
Here is the Version History showing versions from 7 Sept (although the dates show up wrong) and I’ve chosen the save at 22:22 - the preview shows no missing Functions:
As for trying to DOWNLOAD that Version from History - this option doesn’t work at all - when the Download as File button is clicked it shows the Downloaded popup - but no file is downloaded. I don’t have any issues downloading from the Main Editor (save prompt appears no issues), but it doesn’t work at all in the History section.)
@ChantelleJoy can you open up the dev tools and post any errors you see in the console when you try to restore the project here?
to open the dev tools, right click somewhere on the page other than the blocks editor and choose “inspect”, then select “console” in the window that appears.
@richard Okie Dokie - Here’s the Console messages that pops up after I click ‘Restore’ on a version that has the Functions - and then it loads without the Functions…
not sure how you got into that state (though it’s certainly a bug on our side). do you remember what you were doing before you saw the functions disappear for the first time? were you editing functions? copy and pasting them maybe? using undo/redo? any details will help me diagnose the issue.
in the meantime, i’ll work on a patch fix. we should be releasing a hotfix for the micro:bit editor later this week, but i’ll post something here when I have an update.
Sorry, just another note @richard - this got me thinking that somehow the Space Function was causing the error (which is strange since I worked on it for HOURS before any problems came up) and decide to go back to check if I could save & open a History version from before I made that Function and it did work - so sometime between making it, it working FINE for a whole day, and then something happened to cause the error. At the very least, I have retained all my other Functions but would really rather not have to rebuild this one - and also worry about it causing the same error again.
@richard I don’t think I was using Undo/Redo - although not impossible (ctrl-z maybe).
I believe I was working on one specific function (the one named ‘space’) at the time, as it was the most recently created one, and I had made all the other functions before that day.
I do use copy/cut/paste a lot - so it’s possible it happened when I had done one of those keyboard shortcuts but I can’t be certain, sorry. I was mostly editing repeat loops and other loops within the space Function. I’ve pulled up the very last save before it crashed, and can screenshot the Blocks for what it looked like at the time…hope it helps.
thanks @ChantelleJoy! i’ll mess around and see if i can get it to happen to me. in any case, even if i can’t figure out the exact cause i should be able to fix this particular issue
Hey @richard just wanted to check in on this, if you have an idea of when it might be patched? I’m stuck waiting as I don’t want to re-write code only to have it crash again.
@richard I am beyond grateful! I was just able to restore from the last saved version before it all went pear shaped. Thank you so, so, so much. I’ll share my final project once completed - as I think the forum will find it pretty neat.
Thank you again, a million times over!