KZGlobalTeam / gokz

GOKZ SourceMod Plugins
https://gokz.org
GNU General Public License v3.0
66 stars 14 forks source link

Updater does not work #171

Closed zealain closed 3 years ago

zealain commented 4 years ago

Original report by zer0.k (Bitbucket: zer0k_z, ).


http://updater.gokz.org/v2/plugins/ returns 403.

Error logs:

L 10/07/2020 - 14:10:20: Update available for "GOKZ Core" (gokz-core.smx). Current: Null - Latest: 2.10.0
L 10/07/2020 - 14:10:20:   [0]  Source available at https://bitbucket.org/kztimerglobalteam/gokz
L 10/07/2020 - 14:10:50:   [0]  URL: http://updater.gokz.org/v2/plugins/gokz-core.smx
L 10/07/2020 - 14:10:50:   [1]  Destination: addons\sourcemod\plugins/gokz-core.smx.temp
L 10/07/2020 - 14:10:50:   [2]  SteamWorks error (status code 403). Request successful: True

http://updater.gokz.org/v2/gokz-core.txt is still accessible however.

zealain commented 4 years ago

Original comment by Sikari (Bitbucket: Sikari, GitHub: Sikari).


That path looks wrong, are you by any chance using a non standard sourcemod path/installation?
The URL should be pointing to http://updater.gokz.org/v2/addons/sourcemod/plugins/gokz-core.smx, which works.

zealain commented 4 years ago

Original comment by zer0.k (Bitbucket: zer0k_z, ).


I’m not sure how using a non standard sourcemod path even possible. It’s just the usual csgo/addons/sourcemod setup. This was on a windows server if that helps.

zealain commented 4 years ago

Original comment by zer0.k (Bitbucket: zer0k_z, ).


The base URL for updater is http://updater.gokz.org/v2/.

In the forum post,

It checks from UPDATE_URL = http://website.com/myplugin/updatefile.txt, this would obtain the path which is "Path_SM/plugins/myplugin.smx". Then it downloads the plugin fromhttp://website.com/myplugin/plugins/myplugin.smx.

So if I were to download gokz-core for example I would check it from UPDATE_URL = http://updater.gokz.org/v2/gokz-core.txt, obtain the gokz-core path which is Path_SM/plugins/gokz-core.smx, then download it from http://updater.gokz.org/v2/plugins/gokz-core.smx.

I assume it would however place the downloaded plugin in the correct folder though, addons/sourcemod/plugins/gokz-core.smx.

zealain commented 3 years ago

Original comment by zer0.k (Bitbucket: zer0k_z, ).


Seems to be working with the latest version now, closing.

zealain commented 3 years ago

Original comment by zer0.k (Bitbucket: zer0k_z, ).


Finally double checked, this doesn't seem to work. For gokz-quiet.smx, updater's ParseSMCPathForDownloadreturns/plugins/gokz-quiet.smx, which will be combined with the prefix https://updater.gokz.org/v2

The result is...

L 09/09/2021 - 18:27:06: Error downloading update for plugin: oldgokz\gokz-chat.smx
L 09/09/2021 - 18:27:06: [0] URL: http://updater.gokz.org/v2/plugins/gokz-chat.smx
L 09/09/2021 - 18:27:06: [1] Destination: addons\sourcemod\plugins/gokz-chat.smx.temp
L 09/09/2021 - 18:27:06: [2] SteamWorks error (status code 403). Request successful: True

zealain commented 3 years ago

Original comment by Sikari (Bitbucket: Sikari, GitHub: Sikari).


Just double checked with KZTimer’s updater setup and that indeed seems to be how they’re supposed to be done:

Updater file: https://updater.kztimerglobal.com/KZTimerGlobal.txt
While the plugin lives at https://updater.kztimerglobal.com/plugins/KZTimerGlobal.smx.

The files on the GOKZ updater are prefixed with /addons/sourcemod/, I'm not quite sure when this breakage happened..

zealain commented 3 years ago

Original comment by zer0.k (Bitbucket: zer0k_z, ).


Also, not specifically a GOKZ thing, but there should be a note somewhere that tell people not to put GOKZ plugins in non-default folders if they have Updater installed.

Downloaded GOKZ plugins will be put at addons/sourcemod/plugins, so if server owners put them at, for example, addons/sourcemod/plugins/gokz/, they will have duplicate plugins in two folders. I only found out about this the hard way.

zealain commented 3 years ago

Original comment by Sikari (Bitbucket: Sikari, GitHub: Sikari).


Hey, sorry for taking time with this, I believe I’ve made changes to remedy this issue, let us know if it doesn’t.

/cc @zealain, keep the above in mind when doing updates; that is directories under `/addons/sourcemod/` should go to the root instead.

zealain commented 3 years ago

Original comment by Sikari (Bitbucket: Sikari, GitHub: Sikari).


Resolved, files should now be in the correct places.