Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Servers arent Saved #122

Closed
tgwaste opened this issue Jul 25, 2020 · 12 comments
Closed

Custom Servers arent Saved #122

tgwaste opened this issue Jul 25, 2020 · 12 comments

Comments

@tgwaste
Copy link

tgwaste commented Jul 25, 2020

Load App
Add Server
Close App
Reopen App
Server Gone

version: Minecraft_Bedrock_Launcher_0.0.175_macOS_10.12.0.dmg

@mqualizz
Copy link

mqualizz commented Oct 6, 2020

This seems to be due to an invalid path (according to opensnoop -ve) -- note the errant /com.mojang.minecraftpe:

2020 Oct  5 23:54:28   501  33566 mcpelauncher-cli  -1   2 /Users/mqualizz/Library/Application Support/mcpelauncher//com.mojang.minecraftpe/games/com.mojang/minecraftpe/external_servers.txt 
2020 Oct  5 23:54:28   501  33566 mcpelauncher-cli  29   0 /Users/mqualizz/Library/Application Support/mcpelauncher/minecraftpe/DownloadTemp/download_state.json 
2020 Oct  5 23:54:28   501  33566 mcpelauncher-cli  -1   2 /Users/mqualizz/Library/Application Support/mcpelauncher//com.mojang.minecraftpe/games/com.mojang/minecraftpe/menu_load_lock 
2020 Oct  5 23:54:28   501  33566 mcpelauncher-cli  -1   2 /Users/mqualizz/Library/Application Support/mcpelauncher//com.mojang.minecraftpe/games/com.mojang/minecraftpe/catalog_info.json 

@ChristopherHX
Copy link
Owner

ChristopherHX commented Oct 6, 2020

In my opinion this is a valid path /Users/mqualizz/Library/Application Support/mcpelauncher//com.mojang.minecraftpe/games/com.mojang/minecraftpe/external_servers.txt equals to /Users/mqualizz/Library/Application Support/mcpelauncher/com.mojang.minecraftpe/games/com.mojang/minecraftpe/external_servers.txt. It saves for me on GNU/Linux and macOS as of 0.1p4 if you havent already this files you might never added a server.
The com.mojang.minecraftpe helps me to avoid including the android packagename in libc-shim.

This issue is technically fixed, because you see the game doesn't tries to open /data/data/com.mojang.minecraftpe/games/com.mojang/minecraftpe/external_servers.txt anymore, which doesn't exist on non Androids.
creating /data/data with user permissions would have worked with the 0.1.175 dmg.

@mqualizz
Copy link

mqualizz commented Oct 6, 2020

Oddly, the folder "com.mojang.minecraftpe" doesn't exist for me. I do have
/Users/mqualizz/Library/Application Support/mcpelauncher/games/com.mojang/minecraftpe/

Screen Shot 2020-10-06 at 3 16 49 PM

@ChristopherHX
Copy link
Owner

Doesn't the game creates ~/Library/Application Support/mcpelauncher/com.mojang.minecraftpe if it doesn't exists.
I want to seperate internalstorage ( ~/Library/Application Support/mcpelauncher/com.mojang.minecraftpe) vs. externalstorage ( ~/Library/Application Support/mcpelauncher)
You may have a different opinion about this change, but it is better than broken internal storage.

@mqualizz
Copy link

mqualizz commented Oct 6, 2020

:-) I'm not telling you what is the right way or wrong way (I don't know the answer to that). I'm just reporting my observations.

I deleted the mcpelauncher folder, and started up the launcher, signed into xboxlive and added a server. The com.mojang.minecraftpe folder was not created. (this is with 0.1p4 and bedrock 1.16.40.02)

@ChristopherHX
Copy link
Owner

ChristopherHX commented Oct 6, 2020

Thats weird, I have no idea why it shouldn't work for you.
Can you trace mkdir calls of the launcher? (if any)
I will try sometime to delete the whole mcpelauncher data folder to see what happens.

I changed it here, to rewrite the path of a lot of io functions
minecraft-linux/libc-shim@c683322#diff-fa3895dfab4a048c142452bedf3b850c

Does it work if you create that folder manually?

@mqualizz
Copy link

mqualizz commented Oct 6, 2020

I'll snoop it later and give you the results (kids need attn atm).

@mqualizz
Copy link

mqualizz commented Oct 7, 2020

I can't see anything trying to create the folder. mcpelauncher-ui-qt creates Application Support/mcpelauncher/ with (empty) subfolders profiles and versions. After downloading 1.16.40.02, mcpelauncher-client runs, and the rest of the folders are created. I don't see it trying to create com.mojang.mcpelauncher, but I do see it trying to access files therein a few times. Is it possible to launch mcpelauncher-client directly from the command line? I'd like to try that with a dtrace, to see if I can spot it trying to create the folder.

@mqualizz
Copy link

mqualizz commented Oct 7, 2020

So, creating a com.mojang.minecraftpe folder inside of Application Support/mcpelauncher partially fixes the issue -- we can save servers again. But, the external_servers.txt which is stored in Application Support/mcpelauncher/games/com.mojang/minecraftpe does not get copied over (so, users lose their currently existing servers). Maybe that's something that mcpelauncher-ui-qt should take care of? Both creating the com.mojang.minecraftpe folder, and, when it does create it, copy at least options.txt and external_servers.txt (if they exist) into it.

@ChristopherHX
Copy link
Owner

  • On my development / Laptop Linux XPS13 5.4.0-33-generic #37-Ubuntu the folder is created automatically.
  • On my older Laptop from 2012
    • 5.4.0-40-generic Ubuntu => not created by the game, like on your mac.
      • Creating the folder => then internal storage is working
    • macOS Mojave without latest update => created by the game

Migration has very low priority, still to many bugs to get released so far.
The changelog only mentions a few of them.

@ChristopherHX
Copy link
Owner

Hmm I found the problem, the games tries to mkdir /data and gives up if it doesn't exists.

@ChristopherHX ChristopherHX added this to the v0.1.0 milestone Oct 9, 2020
@ChristopherHX
Copy link
Owner

I assume this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants