Microsoft MakeCode

Internet conection lost

I worked at least 2 hours in MakeCode App for Win10.
And then I decided to save my project and it says I cannot save project cause I lost my Internet connection.
No, Arcade. Its YOU lost internet connection for no-reason, my connection is fine, I checked. If I refresh my page or reopen the app - all things I did will be missed.

UPD: Reopened the App. This project even not in my proojects list. Great.

I got this error some times in Windows 10 app and in Chrome browser too. Why it happening? What should I do?

Reposted as the original thread was deleted for some reason:

This is why you need to save periodically. If you use the online version of Arcade you get GitHub integration as well. In both cases, you can just save a .png or .uf2 every time you get past a “good point.” 2 hours is way overdue for a save/commit. This has happened to all of us before and it’s not easy facing it. :frowning: Trust me. It has happened to me too not just with Arcade.

Also for the first save, you need an internet connection AFAIK because it needs to connect to the servers for it to cloud compile. After the first save/compile, then it can do all the work locally.* Also even if you don’t decide to save it should save it somewhere. When you open back up the page/app, it should be in your list of projects.


* someone please confirm this.

The big irony is I just clicked on Save btn :smiley:

Yes, usually I do it. But this time i spend most time not coding, but drawing sprites and backgrounds. And I kinda got carried away with it. And after I drawed and placed 2 scenes, I clicked “save” icon.
And something goes wrong…

1 Like

:frowning: big oof. If you go to C:\Users\<YOUR-USERNAME>\Documents\MakeCode\arcade (if you are using Windows, idk for macOS but it’s probably in the documents folder) do you see your project?

BTW, if you use the marquee tool, you can copy and paste your images into a text document and paste them back in:

1 Like

Also just realized that your are using the offline app again - the offline app should not need an internet connection.

I`m not sure. Yes, I see folder but idk is it last state.

What should I do?

Nice trick, I will notice it.

Yes, I guess for offline app its unforgivable error.
But I guess its not online at all. It could be just kind of WinApp wrapper for web page

1 Like

Well technically the offline app is just an electron application but with the compilers and everything packaged with it so it can be offline. Also, if you open main.ts in an text editor do you see your images???

My project got deleted too :frowning:

1 Like

Oh. My. God.
You saved my life, dude.

I backuped this project to another place, reimported old project to MakeCode app. And after that(while it’s running), replaced the assets.json, images.g.jres, images.g.ts, main.blocks, main.ts (not main.py!!!), pxt.json, tilemap.g.jres from backup version to current.
In some reason, replacement some files make project invisible and need to restart procedure from beginning.
But in final - I recovered all things I’ve done, except last tilemap, but it doesn`t matter, walls can be setted in manual mode :smiley:
UPD: last tilemap saved but no associated in blocks mode. So actually i recovered everything.

God bless you, you`re the best!

3 Likes

Is it in the Arcade app or online? Because if it’s the offline app maybe you could try following what Eretick did too???

1 Like

Haha thanks I always try to help other people when I can. And don’t forget if you want to please post the game on the forum :wink:

It’s not a short story :smiley:
I`m porting the game from my student, he did it in ClickTeam Fusion. So now I kind of demaking it, respriting everything from nothing, etc. For now its only half of (interactable) menu with some rooms done only.
It may be something good. But it also will be something big.
I will publish first demo after 1st level will be completed.

1 Like

is it some way or workaround to paste image from computer?

If you have a proper “Arcade image” in your clipboard and have the art editor open you can use Ctrl + P to paste.

Wait, how it suppose to be?

Ctrl+p do nothing (in offline app) or calls Print Menu (in Chrome)

Oh sorry I meant V :man_facepalming:

1 Like

I tried but it doesn`t work.
What do you mean by “a proper “Arcade image””
Well, I imported project to chrome. From Chrome, I saved img by “save as” in context menu. It downloads 32-bit bmp file.
Is it correct image?
So I opened it in… Paint.Net. Copied.
Opened the image editor in App. Used ctrl+v.
Nothing happens

You don’t save it as a standard image. You know how Arcade represents images like:

img`
. . . . . . . . . . . . . . . . 
. . . . . . . . . . . . . . . . 
. . . . . . 9 . . . 9 . . . . . 
. . . . . . 9 . . . 9 . . . . . 
. . . . . . 9 . . . 9 . . . . . 
. . . . . . 9 . . . 9 . . . . . 
. . . . . . 9 . . . 9 . . . . . 
. 9 . . . . 9 . . . 9 . . . . . 
. 9 9 . . . . . . . . . . . . . 
. . 9 . . . . . . . . . . . 9 . 
. . 9 9 . . . . . . . . . 9 9 . 
. . . 9 9 . . . . . . . 9 9 . . 
. . . . 9 9 9 9 9 9 9 9 9 . . . 
. . . . . . . . . . . . . . . . 
. . . . . . . . . . . . . . . . 
. . . . . . . . . . . . . . . . 
`

When you copy an image to the clipboard in Arcade, what get sent to the clipboard is a “text image” like above. When you do a Ctrl + V (huh I wonder which idiot said it was P) Arcade is looking for this “text image.”

Consider the following gif:

You can see the keystrokes I press at the bottom, albeit they are quite small.

Sorry for missunderstanding. This is not a problem. I asked out of topic context.
I mean if I have an IMAGE) on PC for example - background 160x120 in jpg or png, can I paste it to editor?
Or even if I will recode it to 4-bit bmp. Can I copy it from graphic editor on PC directly to make code editor?

1 Like

Yes there are tools!