ScreepsMods / screepsmod-mongo

Replace LokiJS with MongoDB and Redis
MIT License
24 stars 9 forks source link

When screepsmod-mongo is enabled, no javascript are eval. #13

Closed Drayan closed 6 years ago

Drayan commented 6 years ago

As i said in the title, when I enable the mod on my private server, everything seams to work fine (no error in console or logs), but no javascript can be executed either in the console, or scripts.

tedivm commented 6 years ago

Did you remember to reset the database? If you don't call the "resetAllData" function lots of bad things happen.

Drayan commented 6 years ago

@tedivm Yes of course, multiple times. I did this : 1) start mongod & redisd. 2) start screeps server 3) cli system.resetAllData() - in mongod the request are shown. 4) restart screeps server 5) login with the client, everything work (I create the account, etc). 6) can't input any javascript, but tick advance.

By the way, I'm on windows.

jamiehoward430 commented 6 years ago

Hi,

I have the same issue, also on windows, I also tried to import an old db and had the same issue

npm version 6.2.0 node version 8.11.3

Lots of the below errors in enginemain.log,

Unhandled rejection: ReplyError: ERR wrong number of arguments for 'lpush' command
    at parseError (C:\npmserver\node_modules\redis-parser\lib\parser.js:193:12)
    at parseType (C:\npmserver\node_modules\redis-parser\lib\parser.js:303:14)
jamiehoward430 commented 6 years ago

Hi,

Just got it working, make sure you use redis version 3.0.503

AlinaNova21 commented 6 years ago

I'm closing this as its likely an issue with out of date versions of software (redis, mongo, node, etc). I've also updated the README with newer minimum requirements. Older versions might work, but those are the minimum versions I actively test/support currently. In the cases of redis/mongo, newer is usually better for performance. For node, sticking to the currently supported LTS is the best bet.