mojira.dev
MCPE-41898

Exporting MCWORLD or MCSTRUCTURE file to a OneDrive folder fails silently

When exporting a world or structure to a folder backed (synced) by OneDrive, the export fails silently and leaves an empty .MCWORLD or .MCSTRUCTURE file. Users can be unaware that the export failed, and this can result in the total loss of worlds if the backup was followed by deleting the world in-game to recover storage space.

Steps to Reproduce:
(Requires a Windows PC with access to OneDrive cloud storage)

  1. Access any world's Game settings. Scroll to the bottom and click the Export World button.

  2. In the Save As dialog, select a folder anywhere under your personal OneDrive folder. (The default path is %USERPROFILE%\OneDrive, but if you're using OneDrive to back up your Documents folder, you can select any folder under Documents in File Explorer.)

  3. Exit Minecraft.

  4. Examine the exported file in File Explorer.

Expected Results:

  • In Minecraft, you get toast messages at the start and end of the export process.

  • In File Explorer, the exported file size is >0.

Observed Results:

  • In Minecraft, no toast messages appear. The game just waits for you to do something else.

  • In File Explorer, the exported file size is 0.

Workaround

by @unknown
This problem apparently occurs only when you are exporting to somewhere in your personal OneDrive folder. If you are using OneDrive to backup your files (something you may have been encouraged to do when setting up a new PC or upgrading to Windows 11), your Desktop, Documents, and Pictures folders are probably being redirected to subfolders of the OneDrive folder and you have this problem.

One way to work around the problem is to export the world somewhere that is not inside your OneDrive folder. You can then either use that as your Minecraft world backup folder (keeping in mind that this folder itself is not backed up to offline storage anymore), or you can use File Explorer to copy it from there to the OneDrive managed folder you're used to.

Personally, I suggest the following technique to get as close as possible to the normal world backup process:

  1. As a one-time task, open your home folder (C:\Users\<username>) in File Explorer. Create a subfolder named "BackupTemp" there. Open the subfolder and create in it a shortcut to the folder in OneDrive where you want your backups to live.

  2. When it's time to back up a world, click Export World in the world settings (as usual) but in the Save As dialog, select the BackupTemp folder in your home folder. Then click Export to store the file. (Note that the game will remember this folder until you select a different one, so you probably only need to select it the first time.)

  3. Immediately afterword, click Export World in the world settings again. This time, the Save As dialog will show both your shortcut and the save file you just created. Drag the save file and drop it onto the shortcut to move it to your OneDrive folder, then cancel the Save As dialog. (You only clicked Export World again as an easy way to get to your BackupTemp folder, you don't need to actually save another copy.)

The reason this technique works is that when the game exports the world save, it repeatedly opens and closes the save file (I think). That causes a problem because OneDrive is competing with it to access the file at the same time. But when you drag and drop the file, the whole file is moved in one operation and OneDrive waits until File Manager is done before trying to copy it to the cloud.

Original description:
After exporting, Minecraft reports export successful, but file size for exported world is 0kb. This was happening on 1.8 as well. Just updated to see if it would fix it but it has not. Did not realize last three exports failed until now, tried multiple times with current world and copy of world and tried exporting to Desktop AND backup folder just in case. World size is currently 244.5MB, but this has been happening since world was around 195 MB. 

Linked issues

BDS-17783 World Export Bug Resolved BDS-17931 World export keeps saving as a 0 KB file [Bedrock] Resolved MCPE-98865 Exporting world produces empty (0KB) file. Resolved MCPE-103757 Empty Files When Exporting Minecraft World Resolved MCPE-104858 Most of the times exporting worlds corrupt Resolved

Attachments

Comments 44

Also, I was using Code Crafted texture pack as a non mandatory world pack, not global, but stopped using it. The problem still persist, is this only happening to me? 

Here is a copy of my current world folder if this helps:

https://drive.google.com/open?id=15AxpFaw0Qc4c9h8qsOTaHgTnxJP-0gJz

If anyone else has this problem, all you have to do is go to your Minecraft world folder (which you can find here according to your platform" https://help.mojang.com/customer/portal/articles/1480874-where-are-minecraft-files-stored- ) go into the folder with the random character string that contains your world so that you see the contents of the world folder, select all, and then create a zip folder archive. Name it whatever you like (like the world name) but change the .zip file extension to .mcworld and now you have a working world export.

Yep, it turns out the exported world files are just zip files with the .mcworld file extension. 

I was noticing that too

Why is this still a thing a year later? Literally every export just says 0kb. I know that the .mcworld is just a zip extension name swap and if I change it back to zip, and try to extract it'll say there's nothing there. So... needless to say I have to use this cumbersome workaround of copying the world folder in the mojang folder, renaming it, zipping it, and changing the extension to .mcworld. I just can't believe this is still a problem. You'd think this would be high priority...

34 more comments

it is bad in 1.19.81 too

Re-confirmed in 1.20.12, Win11 Home 22H2 - exported to a OneDrive-synced folder, resulting file is 0 KB. No error. 13 MB world. Onedrive is in %userprofile% and also syncs "Documents", which is where I'm trying to save. 

MOJANG: Note that this is TWO bugs in one. First, the failure itself, and not alerting the user that it failed!   The second one is actually more serious - as it easily causes data loss. 

(4 years for a data-loss bug? C'mon.)

Win10, very old install but up-to-date: Can't reproduce. File is exported successfully. Onedrive folder is on an extra mechanical drive, far away from %userprofile%. "Documents" is not re-linked/synced. 

 

I just finished testing this again in 1.20.40 and 1.20.50.22 Preview. It appears that this issue has been fixed!

Since no fix appeared on any changelog, I'm waiting for confirmation from Mojang that they're finished working on it before I resolve this report as Fixed. If anybody is still having this problem, please comment ASAP so that I don't resolve it prematurely.

The main error is still  present. Exports to OneDrive, Desktop or USB stick all fail with 0 length file size.

Microsoft Surface Pro 9 Windows 11 Home OS 22631.3155 Minecraft 1.20.62

Electronic Boy

In 1.21.0.22 preview this bug was reproduced on my device. I tried not to export it in the folder that has anything to do with OneDrive. However, no matter in which folder a world was exported, the .mcoworld file was always broken (0kb and you cannot open it).
Tried fixing and reinstalling, but nothing worked 😞

Windows 11 Pro 22H2 22621.3447
Windows Feature Experience Pack 1000.22688.1000.0
AMD A4-7210 APU with AMD Radeon R3 Graphics  1.80 GHz
RAM    12.0 GB
x86-64

William Money

(Unassigned)

724283

Confirmed

Windows

Windows 10 Home

1.18.32, 1.9.0, 1.16.20, 1.16.40 Hotfix, 1.18.2 Hotfix, ..., 1.20.12 Hotfix, 1.20.30.25 Preview, 1.20.30.24 Preview, 1.20.15 Hotfix, 1.20.30

1.20.50.23 Preview, 1.20.60.20 Preview, 1.20.50

Retrieved