Local Server Bugs



  • Number one: when I first installed the server, I would get this error repeatedly in the server GUI. Restarting Steam fixed it, but it's a bit confusing why that should be so. A better error message than "initAPI() failure" would probably be sufficient.

    Loading mods from "D:\SteamLibrary\steamapps\common\Screeps\server\mods\mods.json"
    Connecting to storage
    Starting CLI server
    STEAM_KEY environment variable is not found, trying to connect to local Steam client
    Error: greenworks.initAPI() failure
    at Object.startServer (D:\SteamLibrary\steamapps\common\Screeps\server\modules\backend\lib\game\server.js:95:19)
    at common.storage._connect.then.then (D:\SteamLibrary\steamapps\common\Screeps\server\modules\backend\lib\index.js:16:28)
    at _fulfilled (D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:796:13)
    at D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:604:44
    at runSingle (D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:137:13)
    at flush (D:\SteamLibrary\steamapps\common\Screeps\server\modules\common\node_modules\q\q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

     

    Number two: periodically, I see these errors. Best guess: sometimes the loader doesn't load the entire source file before trying to execute it.

    [7:32:29 PM]Script execution has been terminated: Unknown system error
    [7:32:29 PM]Script execution has been terminated: Unknown system error
    [7:33:04 PM]SyntaxError: Unexpected token )
    at Object.module.exports.loop (main:120:9)
    at __mainLoop:1:52
    at ContextifyScript.Script.runInContext (vm.js:35:29)


  • I'm also getting this bug:

    STEAM_KEY environment variable is not found

    Restarting doesn't seem to help in my case. Running on Linux



  • Mine might be a bit different, here is the full output:

    Loading mods from "/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/mods/mods.json"
    Connecting to storage
    Starting CLI server
    STEAM_KEY environment variable is not found, trying to connect to local Steam client
    Error: Steam client is not running
    at Object.startServer (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/backend/lib/game/server.js:125:19)
    at common.storage._connect.then.then (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/backend/lib/index.js:16:28)
    at _fulfilled (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:796:13)
    at /home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:604:44
    at runSingle (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:137:13)
    at flush (/home/bonzai/.local/share/Steam/steamapps/common/Screeps/server/modules/common/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

     



  • I do have the steam client running by the way