Error in Storage since build 29
-
I just rebuilt my dedicated server using scripts here and now get error in storage.log
Loading mods in 'mods'
Starting storage server
Storage listening on 21027
[127.0.0.1:43513] Incoming connection
[127.0.0.1:43514] Incoming connection
[127.0.0.1:43515] Incoming connection
[127.0.0.1:43516] Incoming connection
[127.0.0.1:43517] Incoming connection
[127.0.0.1:43518] Incoming connection
TypeError: Cannot read property 'get' of null
at dbEnvGet (/home/screeps/screeps/server/modules/storage/lib/db.js:298:47)
at Proto.apply (/home/screeps/screeps/server/modules/storage/node_modules/dnode-protocol/index.js:123:13)
at Proto.handle (/home/screeps/screeps/server/modules/storage/node_modules/dnode-protocol/index.js:99:19)
at D.dnode.handle (/home/screeps/screeps/server/modules/storage/node_modules/dnode/lib/dnode.js:140:21)
at D.dnode.write (/home/screeps/screeps/server/modules/storage/node_modules/dnode/lib/dnode.js:106:22)
at Socket.ondata (_stream_readable.js:555:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
/home/screeps/screeps/server/modules/storage/lib/db.js:50
var values = env.get(1);
^
TypeError: Cannot read property 'get' of null
at Timeout.envCleanExpired [as _onTimeout] (/home/screeps/screeps/server/modules/storage/lib/db.js:50:21)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
-
It seems your
db.json
is corrupted, it doesn’t contain the mandatoryenv
collection. Try to replace this file with the original version inmodules/storage/db.original.json
.
-
The same on Build 30
-
Oh, didn't notice comment. I tried but copied something wrong, so I will nuke the folder and start over, but that's for later.
-
Nuked folder, redownloaded screeps and everything works now.
-
Thx for the info, Artem. I was stuck with an empty db.json, and replacing it with the File from `server\node_modules\@screeps\storage\db.original.json` (using Steam) enabled me to start the server again without having to completely reinstall the game.