CubeCoders / AMP

Issue tracking and documentation for AMP
https://cubecoders.com/AMP
206 stars 39 forks source link

Bedrock Pulling wrong version info #950

Closed ssfdre38 closed 9 months ago

ssfdre38 commented 9 months ago

Bug Report

System Information

I confirm:

Amp is not able to pull from the minecraft website as it might be now located in a different download url and there is a EULA checkbox and the fallback url is out of date and the version should be 1.20.41.02

linux download url https://minecraft.azureedge.net/bin-linux/bedrock-server-1.20.41.02.zip win download url https://minecraft.azureedge.net/bin-win/bedrock-server-1.20.41.02.zip

Log: [06:39:33] [Logger Info] : Starting AMP version 2.4.6.8 (Decadeus), built 01/12/2023 05:06 [06:39:33] [Logger Info] : Stream: Development / Development - built by CUBECODERS/buildbot on CCL-DEV [06:39:33] [Logger Info] : Running in a Docker environment. [06:39:33] [Logger Info] : Purging old audit logs (this may take a moment)... [06:39:33] [Logger Info] : OS: Linux / x86_64 [06:39:33] [Logger Info] : CPU: AMD EPYC-Milan Processor (4C/4T) [06:39:33] [Logger Info] : RAM: 3815MB [06:39:33] [Logger Info] : AMP Instance ID: 7827f398-92cc-4438-98ab-2133acad3b3f [06:39:33] [Logger Info] : Loaded MinecraftModule version 1.0.0.3 by CubeCoders Limited [06:39:34] [Logger Info] : Metrics publishing is enabled at udp://localhost:12820. [06:39:34] [Logger Info] : Loaded FileManagerPlugin by CubeCoders Limited [06:39:34] [Logger Info] : Loaded EmailSenderPlugin by CubeCoders Limited [06:39:34] [Logger Info] : Loaded WebRequestPlugin by CubeCoders Limited [06:39:34] [Logger Info] : Loaded LocalFileBackupPlugin by CubeCoders Limited [06:39:34] [Logger Info] : Loaded CommonCorePlugin by CubeCoders Limited [06:39:34] [Logger Info] : Licence Present: AMP Advanced Edition [06:39:34] [FileManager Notice] : No SSH keypair available for embedded server, generating new keypair... [06:39:34] [Logger Notice] : Generated new keypair with fingerprint [06:39:35] [Logger Notice] : Using keypair with fingerprint [06:39:35] [Logger Info] : SFTP Server started on 0.0.0.0:2225 [06:39:35] [Webserver Info] : Websockets are enabled. [06:39:35] [Logger Info] : Webserver started on http://127.0.0.1:8082 [06:39:35] [Logger Info] : RouterTimer@10Hz with 2 jobs started [06:39:35] [Core Info] : Checking for AMP updates... [06:39:35] [Logger Info] : Startup mode is StartApplication, SkipThisTime. [06:39:35] [Core Info] : AMP is up to date. [06:39:40] [Logger Activity] : Authentication attempt for user daniel from 127.0.0.1 [06:39:40] [Core Activity] : Authentication success [06:39:45] [Logger:Anonymous Activity] : Authentication attempt for user daniel from 127.0.0.1 [06:39:45] [Core:Anonymous Activity] : Authentication success [06:39:51] [Logger Warning] : Unable to get Bedrock version data from https://minecraft.net/en-us/download/server/bedrock [06:39:51] [Core Error] : TaskCanceledException [06:39:51] [Logger Error] : [0] (TaskCanceledException) : The operation was canceled. [06:39:51] [Core Error] : at MinecraftModule.UpdateManager.GetBedrockVersion () [06:39:51] [Core Error] : ObjectDisposedException [06:39:51] [Logger Error] : [1] (ObjectDisposedException) : Cannot access a disposed object. Object name: 'MobileAuthenticatedStream'. [06:39:51] [Core Error] : at Net.Http.HttpConnection.FillAsync () at Net.Http.HttpConnection.ReadNextResponseHeaderLineAsync (Boolean foldedHeadersAllowed) [06:39:51] [Minecraft Info] : Trying first Bedrock info fallback... [06:39:56] [Minecraft Info] : Using fallback bedrock version data... [06:39:57] [API:daniel Activity] : Updating the application. [06:39:57] [Minecraft:daniel Warning] : Tried to update, but update data is not yet available. Try later. [06:39:57] [Logger Info] : Latest Bedrock version: 1.20.11.01 [06:39:57] [Logger Info] : Updating Modpack cache for 86 modpacks... [06:40:15] [Logger Info] : Update complete. [06:40:26] [API:daniel Activity] : Updating the application.

ssfdre38 commented 9 months ago

Mike fixed Fall back got updated to latest version and windows can pull from minecraft.net but linux is unable to and is using the fall back

IceOfWraith commented 9 months ago

Even once the fall back is fixed, I'd like to keep this open as a reminder to review the setup and find out why it's not grabbing from the site directly.

ssfdre38 commented 9 months ago

oh im keeping it open for that reason and going to add Mike's comment from discord for reference

p0t4t0sandwich commented 9 months ago

Piggybacking off Mike's message, I wonder if changing the user agent to look like a windows machine would make a difference, or if it's just something they've done to the Linux binary download. I wonder why they'd do such a thing

ssfdre38 commented 9 months ago

wouldn't that pull the windows version and download the .exe file and not the linux bash file?

IceOfWraith commented 9 months ago

No, they're two different links. It just is a "trick" to make the web server think you're on Windows downloading a Linux file.

p0t4t0sandwich commented 9 months ago

No. The Windows/Linux have two separate download thingos. Also not a bash script, it's a full binary.

ssfdre38 commented 9 months ago

but you know what im talking about

IceOfWraith commented 9 months ago

I can't say I do.

ssfdre38 commented 9 months ago

if switching the user agent to mimic a windows env on amp to download the bedrock version, wouldn't amp just pull the windows files and not the linux files since amp is thinking that your using a windows env. i might be thinking too much into it.

IceOfWraith commented 9 months ago

You didn't read what we said in response to that. Regardless, it's not the solution I don't think.

p0t4t0sandwich commented 9 months ago

Nothing to do with AMP's internals, the user agent is just a string that sends client env/OS info to a web server. Proper solution would be for M$ to play nice

ssfdre38 commented 9 months ago

Been worked on a bit by iceofwraith, still trying to see what is going on. Windows installs of amp get correct versions but Linux version of Amp doesn't. Still investigating

ssfdre38 commented 9 months ago

Work around in place for now. Use docker or have curl install on Linux os for now. Letest build on dev branch. Left open by request of iceofwraith

PhonicUK commented 9 months ago

Fixed in latest build

IceOfWraith commented 9 months ago

There is a new issue with this. Since it's actually connecting to Microsoft, but not getting proper data returned, it exposed another bug that wasn't there before. Development has a work around for that, but instead I'd like to make an input that users can manually specify a version if none is found.

ssfdre38 commented 9 months ago

For Bedrock Users that is experiencing problems with updating bedrock to the latest version ang getting 1.17.10.04 or something else. Please try this. This is a temp fix till we can fix it There is a fix in the Development branch of AMP

For Linux User: SSH into your server and go to your amp user with: sudo su -l amp Then we are going to switch your bedrock instance to Development branch: ampinstmgr switch instancename Development replacing instancename with the actual name of the instance in AMP. then we are going to update your instance with ampinstmgr upgrade instancename

For Windows Users (10/11/server): Login to your server with the user that you installed amp on then open CMD and run this command: ampinstmgr switch instancename Development replacing instancename with the actual name of the instance in AMP. then we are going to update your instance with ampinstmgr upgrade instancename

For both if update fails: If that doesn't work go to https://www.minecraft.net/en-us/download/server/bedrock and download it manually and place that file on your server using the File Manager or SFTP in that instance. Then just start it up. Be sure to not update again or it will replace it with the old version still!

This is a Temp fix till we can get it fixed and released to Mainline release. For any new bugs with Bedrock, Please post here with your logs so we can look for them.

ssfdre38 commented 9 months ago

libssl.so error after fix will get the correct bedrock version after fix wrong version will need the updated version added to the bedrock version box after fix.

this is what ive been seeing on discord helping people. just a note to add on here for people to see

IceOfWraith commented 9 months ago

That's not a proper sentence so I'm not sure what you're saying. All they need to do is wait until the release Wednesday. Then update AMP and inside the instance. If they want a fix now they switch to development.

ssfdre38 commented 9 months ago

Fixed and will be released on 2.4.7

Evinsta commented 7 months ago

install will only get Version: 1.20.50.03 but clients are on 1.20.60 and Amp version v2.4.8

IceOfWraith commented 7 months ago

install will only get Version: 1.20.50.03 but clients are on 1.20.60 and Amp version v2.4.8

Have you restarted the instance or created a scheduled time task that checks for updates being available?