Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
166 stars 125 forks source link

SquadJS "File not found" #253

Closed enderneuer closed 2 years ago

enderneuer commented 2 years ago

Description of Issue

Errors or Screenshots of Issue

Squad Information

If potentially relevant, please provide regarding the state of the Squad server at the time of error, e.g. the current layer.

System Information

When trying to launch SquadJS, the following error pops:


C:\Users\Ender\Desktop\SquadJS\node_modules\basic-ftp\dist\FtpContext.js:282
            const err = code >= 400 ? new FTPError(response) : undefined;
                                      ^

FTPError: 550 File not found
    at FTPContext._onControlSocketData (C:\Users\Ender\Desktop\SquadJS\node_modules\basic-ftp\dist\FtpContext.js:282:39)
    at Socket.<anonymous> (C:\Users\Ender\Desktop\SquadJS\node_modules\basic-ftp\dist\FtpContext.js:123:44)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on FTPTail instance at:
    at FTPTail.fetchLoop (file:///C:/Users/Ender/Desktop/SquadJS/node_modules/ftp-tail/index.js:117:14)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 550
}```
enderneuer commented 2 years ago

Temporarily fixed via removing line 165 in \SquadJS\node_modules\ftp-tail\index.js

this.fetchLoop();

ect0s commented 2 years ago
Temporarily fixed via removing line 165 in \SquadJS\node_modules\ftp-tail\index.js

this.fetchLoop();

Are you using FTP to tail your log? Because removing the fetch loop will 100% break that functionality.

Further, your original error

FTPError: 550 File not found

Shows that FTP was enabled, however, the path passed didn't exist.

enderneuer commented 2 years ago

Assuming "logReaderMode": "ftp", in the config is using FTP to tail the log, yes, I am.

SquadJS has been working without any issues so far after disabling the fetch loop.

ect0s commented 2 years ago

So this means your only seeing events from RCON because that fetch loop is how squadjs checks for updates to the log file, which fires some events.

This means any event that fires off log output will never happen on your install

enderneuer commented 2 years ago

I believe I found the issue.

I originally had the logDir set as "logDir": "/Squad-Server/SquadGame/Saved/Logs/SquadGame.log",

set to the actual file, instead of "logDir": "/Squad-Server/SquadGame/Saved/Logs", the folder.

I've updated to the latter and added the fetchLoop back, works fine now.