Tuncion / vscode-fivem-resource-manager

A Visual Studio Code integrated FiveM Resource Manager - Easily restart any resource on your server
GNU General Public License v3.0
6 stars 1 forks source link

Doesn't Refresh Resources #21

Closed BillChirico closed 2 months ago

BillChirico commented 3 months ago

Hello,

I'm trying to refresh my resources using this tool, but it doesn't actually refresh or restart them. I'm using localhost with a password. There's no errors and it says in VS Code that it was refreshed, but it actually isn't.

Also, is there a way to support automatic refresh on saving a file in the resource?

Thanks

Mathu-lmn commented 3 months ago

After reading the code, the refresh button simply detects new resources, but it doesn't actually performs the refresh command

BillChirico commented 3 months ago

@Mathu-lmn Is this for the top level button or the button next to each resource that you hover over?

Tuncion commented 3 months ago

Hi @BillChirico,

will test it again for myself. Did you get any errors in the logs?

BillChirico commented 3 months ago

Hi @BillChirico,

will test it again for myself. Did you get any errors in the logs?

No errors at all, connects fine, displays resources correctly, and when restarting it says it was successful.

Tuncion commented 3 months ago

Hi again,

I have tried to reproduce the error, but without success. As soon as I press the following button: image

After that I see the following in my server console: image image

My Setup was:

ip:port: localhost:30120 password:

Password is the value defined in your cfg file for convar rcon_password

In conclusion, the RCON connection from VSCode to FxServer is not working. But I can't tell you why with the current information. My first thought was firewall but on localhost it is unlikely

BillChirico commented 3 months ago

Hi again,

I have tried to reproduce the error, but without success. As soon as I press the following button:

image

After that I see the following in my server console:

image

image

My Setup was:

ip:port: localhost:30120

password:

Password is the value defined in your cfg file for convar rcon_password

In conclusion, the RCON connection from VSCode to FxServer is not working.

But I can't tell you why with the current information. My first thought was firewall but on localhost it is unlikely

Maybe it's because I wasn't providing a port and/or didn't have a recon password set in the config. I feel like in that case it should've thrown a connection error, but it properly displayed all of my resources.

Tuncion commented 3 months ago

Hi @BillChirico,

you need to set the rcon password in the config, otherwise your FxServer will not open a RCON connection. The reason why it displayed all resources without rcon is because the resource data comes from endpoint /info.json (See line 24 in resources.js)

Tuncion commented 3 months ago

But I agree a better display when the connection does not exist would be better