# Oops, something went wrong trying to convert your code

**URL:** https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159
**Category:** Arcade
**Created:** [February 4, 2020, 10:32pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159 "2020-02-04T22:32:16Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Alexis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexis/32/576_2.png) [@Alexis](https://forum.makecode.com/u/Alexis)
#### Post date: [February 4, 2020, 10:32pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/1 "2020-02-04T22:32:17Z")

</div>

One day, I was working on a platformer game based on “Jumpy Platformer”(in blocks). I switched in Javascript and it just happened that it said “Oops, something went wrong trying to convert your code.” I didn’t write or do anything. What should I do to fix this and prevent this from happening again.

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [February 5, 2020, 12:33am UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/2 "2020-02-05T00:33:48Z")

</div>

This sounds like a bug. Would you mind sharing your project?

---

<div class="post-metadata">

### Author: ![Alexis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexis/32/576_2.png) [@Alexis](https://forum.makecode.com/u/Alexis)
#### Post date: [February 5, 2020, 10:42pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/3 "2020-02-05T22:42:17Z")

</div>

Here’s my project :

> **[Mike's Adventure](https://arcade.makecode.com/47893-04333-07134-39157)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [February 5, 2020, 11:55pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/4 "2020-02-05T23:55:07Z")

</div>

This is a bug on our end; the issue is that in the call to `scene.onOverlapTile()` you passed an image literal (`img`...` `) instead of something of the form `mytiles.tile1`.

To workaround this issue you should always declare images that you want to use in tile blocks inside of that namespace with a name of the form `tile#` where # is a positive integer. For example,

```typescript
namespace myTiles {
    //% blockIdentity=images._tile
    export const tile0 = img`
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
    `
    //% blockIdentity=images._tile
    export const tile1 = img`
        e d f . . . . . . . . . . f e d
        e d f f f f f f f f f f f f e d
        e d d d d d d d d d d d d d e d
        e d e e e e e e e e e e e e e d
        e d f f f f f f f f f f f f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f f f f f f f f f f f f e d
        e d d d d d d d d d d d d d e d
        e d e e e e e e e e e e e e e d
        e d f f f f f f f f f f f f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
        e d f . . . . . . . . . . f e d
    `
}

```

I’ve opened an issue for this here: [https://github.com/microsoft/pxt-arcade/issues/1738](https://github.com/microsoft/pxt-arcade/issues/1738)

And here is a version of your code that goes back to blocks:

> **[Mike's Adventure](https://arcade.makecode.com/45538-70600-73659-32611)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Sorry that you ran into this!

---

<div class="post-metadata">

### Author: ![Alexis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexis/32/576_2.png) [@Alexis](https://forum.makecode.com/u/Alexis)
#### Post date: [February 5, 2020, 11:56pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/5 "2020-02-05T23:56:14Z")

</div>

Thanks for such a fast response!

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [July 6, 2024, 7:35pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/6 "2024-07-06T19:35:18Z")

</div>

@richard I’m not good at javascript and all of this is really confusing. It would help me and other collaborators on my project if this was fixed can you please simplify it more or just do it for one tile so I know how to do it? here is the link [https://arcade.makecode.com/S65687-46887-31913-85979](https://arcade.makecode.com/S65687-46887-31913-85979)

Thanks

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [July 8, 2024, 4:34pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/7 "2024-07-08T16:34:19Z")

</div>

@platformermaster your issue is different than this one and has nothing to do with tiles. Actually, I have no idea how your project ended up in this state. For some reason your blocks.xml file was completely empty, which should never happen. Did you manually try to add a blocks file to the project by chance? If not, do you remember what you were doing when this problem started?

In any case, here’s your fixed project:

> **[Microsoft Survival (beta)](https://arcade.makecode.com/82362-99207-02133-15039)**
>
> Made with ❤️ in MakeCode.

For documentation purposes, here’s how I fixed this problem (though I’ve never seen anyone else run into this scenario):

> **Summary**
>
> Note that theses instructions will **almost definitely** NOT fix your issue if you are getting the “Oops, something went wrong trying to convert your code” message. These are only the instructions for @platformermaster’s specific issue.
> 
> To fix this issue:
> 
> 1. I downloaded the project using [the makecode cli](https://github.com/microsoft/pxt-mkc)  
> `makecode download https://arcade.makecode.com/S65687-46887-31913-85979`
> 2. I opened the project in a text editor and pasted the [default project XML](https://github.com/microsoft/pxt-arcade/blob/master/libs/blocksprj/main.blocks) into main.blocks and saved the file
> 3. I reshared the project with the cli  
> `makecode share`

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [July 8, 2024, 4:44pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/8 "2024-07-08T16:44:14Z")

</div>

Thanks, this helped a lot finally I’ll be able to work on my project with my collaborators. I don’t think I was messing around with the files until I had the problem and I think I was working on ore generation. Keep in mind other collaborators would work on the project too so maybe one of them did something. But I don’t really know.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [July 8, 2024, 5:26pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/9 "2024-07-08T17:26:22Z")

</div>

This will be helpful as I’ve gotten an empty blocks.xml file before several times. No clue how they happen though, it’s usually during a GitHub commit where something gets screwed up…

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [July 8, 2024, 5:31pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/10 "2024-07-08T17:31:25Z")

</div>

hmmmm sounds like @platformermaster was also using github… that might be the culprit somehow.

@UnsignedArduino next time it happens can you note the commit hash when it happened and send me a link?

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [July 14, 2024, 5:45pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/11 "2024-07-14T17:45:39Z")

</div>

@richard It happened again and I tried to follow your tutorial but I couldn’t understand what to download and what to put the link into. It would be great if you could do your magic again or if you could simplify the tutorial. Thanks (Here’s the link [https://arcade.makecode.com/S11902-81129-28491-76909](https://arcade.makecode.com/S11902-81129-28491-76909))

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [July 15, 2024, 6:38pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/12 "2024-07-15T18:38:32Z")

</div>

@platformermaster

> **[Microsoft Survival WORKING BLOCKS - Copy](https://arcade.makecode.com/83242-01674-15360-85194)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)
#### Post date: [July 15, 2024, 8:48pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/13 "2024-07-15T20:48:42Z")

</div>

Ok, I need to know how the simulator is blue RIGHT NOW! This could change EVERYTHING…

---

<div class="post-metadata">

### Author: ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)
#### Post date: [July 15, 2024, 9:32pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/14 "2024-07-15T21:32:35Z")

</div>

[[Tutorial] How to Change the Simulator Color - Arcade / Help - Microsoft MakeCode](https://forum.makecode.com/t/tutorial-how-to-change-the-simulator-color/27571)

Thats a tutorial from @Brohann where I found it from. Just know that you should make a backup before attempting.

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [July 15, 2024, 10:51pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/15 "2024-07-15T22:51:19Z")

</div>

Thank you @richard can you teach me how to do it? (I know you said up above but I cant figure it out)

---

<div class="post-metadata">

### Author: ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)
#### Post date: [July 16, 2024, 12:08am UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/16 "2024-07-16T00:08:03Z")

</div>

@platformermaster I am working on a fix for this, so hopefully it won’t be a problem much longer. that being said, I wrote up some instructions below. I do not recommend following them unless you have some experience with using Command Line tools

> Note: this is something you’ll only be able to do from a windows, linux, or macos computer (not ios, android, or a chromebook).

1. Install [Node.js](https://nodejs.org/en/download/package-manager)
2. Install [Visual Studio Code](https://code.visualstudio.com/download)
3. Open up a terminal  
a. On Windows, this will be called Command Prompt  
b. On MacOs and Linux, this will be called Terminal
4. Run this command to install the MakeCode CLI:  
`npm install -g makecode`
5. Run this command to create a new directory  
`mkdir my-project`
6. Run this command to enter that directory:  
`cd my-project`
7. Download your project using this command:  
`makecode download https://arcade.makecode.com/S11902-81129-28491-76909`
8. Open the directory using Visual Studio Code:  
`code .`
9. Open the main.blocks file in the left-hand pane and paste this code into it:

```auto
<xml xmlns="http://www.w3.org/1999/xhtml">
  <variables></variables>
  <block type="pxt-on-start" x="0" y="0"></block>
</xml>

```

10. Save the file
11. Reshare the project using this command:  
`makecode share`
12. This should create a new share link that lets you decompile once again

---

<div class="post-metadata">

### Author: ![RobbyZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/robbyzero/32/17188_2.png) [@RobbyZero](https://forum.makecode.com/u/RobbyZero)
#### Post date: [July 16, 2024, 2:36am UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/17 "2024-07-16T02:36:03Z")

</div>

I might be able to do this. I have all the necessary tools. So if this happens again in the project I should be able to fix it.

---

<div class="post-metadata">

### Author: ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)
#### Post date: [July 17, 2024, 5:10am UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/18 "2024-07-17T05:10:42Z")

</div>

thanks

---

<div class="post-metadata">

### Author: ![BlueGoat11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bluegoat11/32/18040_2.png) [@BlueGoat11](https://forum.makecode.com/u/BlueGoat11)
#### Post date: [November 12, 2024, 7:00pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/19 "2024-11-12T19:00:00Z")

</div>

This just happened to me - my tab closed while committing and my project is stuck on JS ☹

---

<div class="post-metadata">

### Author: ![sylvancircle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sylvancircle/32/15811_2.png) [@sylvancircle](https://forum.makecode.com/u/sylvancircle)
#### Post date: [November 14, 2024, 7:01pm UTC](https://forum.makecode.com/t/oops-something-went-wrong-trying-to-convert-your-code/1159/20 "2024-11-14T19:01:13Z")

</div>

In case you’re still investigating more possible causes for this issue happening, I ran into it recently trying to manage a conflicting merge within MakeCode Arcade. It went roughly like this:

1. Checked out repo and made conflicting edits on multiple local copies
2. Attempt to git merge within MakeCode Arcade, UI got angry and spit out a PR
3. Manually merged the PR via GitHub

You can see the blocks deleting PR here:

> <https://github.com/AlexSzeto/achievement-hunter/pull/1/files#diff-928c74cc9bd58fc365d06430115c76fee5902c15ab52227066bc8b91d5bada39>
>
> Automatically created from MakeCode.
