hexparrot/mineos-node

No profiles are available & Papermc missing

helomen opened this issue · 11 comments

I wanted to install MineOS again after a year break.
When I start MineOS, it takes about 5 minutes until the server jars/packs are ready for download. Unfortunately, the source of Papermc is always missing.

mineos_01

mineos_02

  1. My MineOS installation only takes a few seconds to download the list of profiles. The times taken depend on your machine and internet connection and should only occur after a restart, this is due to the fact that the profiles are loaded on first run every time it restarts. I have thought about adding a DB to store profiles details and update adhoc or on schedule but hasn't progressed past a thought.

  2. Looks like paper changed their API at some point.

New API looks like this -
https://papermc.io/api/v2/projects/paper/versions/1.17.1/builds/388/downloads/paper-1.17.1-388.jar
No latest build by the quick perusal I had so will require a little bit more of a tinker, but I don't want to put the time in to it at the moment.

Thanks for the quick reply. And thanks for the papermc link. Once I have downloaded the file, what do I need to do to make it available for selection as a profile under Server Actions in the dropdown? Currently I have created a folder papermc in the %minecraft%\profiles directory and copied the jar file in there. Unfortunately, I can't get any further here.

I changed /usr/games/minecraft/profiles.d/paperspigot.js to use 'https://papermc.io/api/v2/projects/paper' as the URL. It seems the actual download URL still works from the v1 API (?), but I needed to use the v2 endpoint for the base URL to get it to show up in the web UI. https://papermc.io/api should also take you to the v2 API endpoint descriptions if you're curious.

// var async = require('async');
var path = require('path');
var fs = require('fs-extra');
var profile = require('./template');

exports.profile = {
  name: 'Paper',
  request_args: {
    url: 'https://papermc.io/api/v2/projects/paper', // <- NEW URL HERE
    json: true
  },
  handler: function (profile_dir, body, callback) {
    var p = [];

    try {
      for (var index in body.versions) {
        var version = body.versions[index];
        var item = new profile();

        item['id'] = 'Paper-{0}-latest'.format(version);
        item['group'] = 'papermc';
        item['webui_desc'] = 'Latest Paper build for {0}'.format(version);
        item['weight'] = 0;
        item['filename'] = 'paperclip.jar'.format(version);
        item['url'] = 'https://papermc.io/api/v1/paper/{0}/latest/download'.format(version);
        item['downloaded'] = fs.existsSync(path.join(profile_dir, item.id, item.filename));
        item['version'] = version;
        item['release_version'] = version;
        item['type'] = 'release'

        p.push(item);
      }
    } catch (e) { console.log(e) }
    callback(null, p);
  } //end handler
}

Well, I ended up doing the work. You'll need to download/copy the profile file/s from my pull request (raw versions) and also in the terminal do a 'npm install --save axios' as root in /usr/games/minecraft, providing you have a standard install. Restart the server and paper, waterfall and travertine should load up.

This won't fix your profiles taking a while to reload but it should (in my testing) give you paper, waterfall and travertine.

I'm completely at a loss here. How do you download and install the updated files? Is there a way to do an installation refresh?

I'm running MineOS on a DietPi install and was hoping to install of the 1.18 Paper experimental builds. But when I tried to download the individual files that were changed and replace the old ones in my MineOS instance, I see no way to do so.

I'm completely at a loss here. How do you download and install the updated files? Is there a way to do an installation refresh?

I'm running MineOS on a DietPi install and was hoping to install of the 1.18 Paper experimental builds. But when I tried to download the individual files that were changed and replace the old ones in my MineOS instance, I see no way to do so.

I know this probably isn't the solution you're looking for, but I've just been manually downloading Paper into my server's directory (/var/games/minecraft/servers/<your_server>/) and then it should show up to be selectable in the web UI after a refresh. You'll have to restart your server to use it. You can download jars via the command line with wget, e.g. wget https://papermc.io/api/v2/projects/paper/versions/1.18/builds/48/downloads/paper-1.18-48.jar

I know this probably isn't the solution you're looking for, but I've just been manually downloading Paper into my server's directory (/var/games/minecraft/servers/<your_server>/) and then it should show up to be selectable in the web UI after a refresh.

I downloaded the latest 1.18 experimental build from PaperMC via the web and placed the file in my MineOS server directory (which has a different filepath because it's on DietPi) using SFTP. Although I can select the file (instead of paperclip.jar) on the server's page in the MineOS GUI, I'm a bit apprehensive about firing it up because the file size is only half (31MB) the size of paperclip.jar (62MB).

So I think I'd rather wait until I can update using the conventional method, but that will mean updating these .js files somehow in MineOS to regain access to the profiles.

I downloaded the latest 1.18 experimental build from PaperMC via the web and placed the file in my MineOS server directory (which has a different filepath because it's on DietPi) using SFTP. Although I can select the file (instead of paperclip.jar) on the server's page in the MineOS GUI, I'm a bit apprehensive about firing it up because the file size is only half (31MB) the size of paperclip.jar (62MB).

If it's any consolation, my Paper jar (1.18 build 36) is 32.33 MB. I've been playing on it and its been fine. You could always make a dummy server and put in the Paper jar to test it there first. Based on https://papermc.io/downloads, the 1.17 versions seem to be around 60MB but the 1.18 versions are around 33MB.

If it's any consolation, my Paper jar (1.18 build 36) is 32.33 MB. I've been playing on it and its been fine.

That worked—many thanks!

For those encountering this same issue and who'd like a step by step:

  1. Download the latest 1.18 build from https://papermc.io/downloads
  2. Create a brand new server if you'd rather not (yet) risk updating an existing one to 1.18
  3. With the server stopped, place that downloaded 1.18 .jar file in the same folder as your desired server
  4. Refresh the server list in the MineOS GUI
  5. On the server detail page in the GUI, select the .jar file you downloaded under the "runnable .jar" drop-down menu.
  6. Start the server
  7. Enjoy 1.18

Looking forward to a more polished fix; but for now, this is perfect for getting our family MC server on 1.18.

I'm hitting this as well, at the moment the only valid profiles I have are imagicalmine, nukkit, and spigot. Even the vanilla Mohjang offerings are not available this way.

It does look though like I can just grab the 1.18 jar from the MC site and drop that in /var/games/minecraft/servers/server_name/ and see it on the dropdowns.

No profiles are showing up for me with the latest commit.