Failure to submit code for ranking


#1

Currently none of my code changes are being persisted in Greed. It appears it is having issues with the level.session call.

http://codecombat.com/db/level.session/some_session_id

[{"message":"invalid type: null (expected number/string)","code":0,"dataPath":"/matches/165/opponents/0/totalScore","schemaPath":"/properties/matches/items/properties/opponents/items/properties/totalScore/type","subErrors":null,"stack":"Error: invalid type: null (expected number/string)\n  at new ValidationError (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:1188:12)\n  at ValidatorContext.createError (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:176:9)\n  at ValidatorContext.validateType (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:559:14)\n  at ValidatorContext.validateBasic (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:529:19)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:410:19)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at ValidatorContext.validateArrayItems (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:723:21)\n  at ValidatorContext.validateArray (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:656:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:413:11)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at ValidatorContext.validateArrayItems (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:723:21)\n  at ValidatorContext.validateArray (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:656:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:413:11)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at Object.api.validateMultiple (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:1308:12)\n  at LevelSessionHandler.module.exports.Handler.validateDocumentInput (/home/ubuntu/codecombat/server/commons/Handler.coffee:364:15)\n  at LevelSessionHandler.module.exports.Handler.saveChangesToDocument (/home/ubuntu/codecombat/server/commons/Handler.coffee:404:19)\n  at /home/ubuntu/codecombat/server/commons/Handler.coffee:248:10\n  at LevelSessionHandler.module.exports.Handler.doWaterfallChecks (/home/ubuntu/codecombat/server/commons/Handler.coffee:380:12)\n  at /home/ubuntu/codecombat/server/commons/Handler.coffee:246:8\n  at Promise.<anonymous> (/home/ubuntu/codecombat/server/commons/Handler.coffee:373:9)\n  at Promise.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)\n  at Promise.EventEmitter.emit (events.js:95:17)\n  at Promise.emit (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)\n  at Promise.fulfill (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)\n  at Promise.resolve (/home/ubuntu/codecombat/node_modules/mongoose/lib/promise.js:108:15)\n  at Promise.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)\n  at Promise.EventEmitter.emit (events.js:95:17)\n  at Promise.emit (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)\n  at Promise.fulfill (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)\n  at /home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1393:13\n  at model.Document.init (/home/ubuntu/codecombat/node_modules/mongoose/lib/document.js:250:11)\n  at model._done (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:59:24)\n  at _next (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:52:28)\n  at fnWrapper (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:159:8)\n  at model.module.exports (/home/ubuntu/codecombat/server/levels/sessions/LevelSession.coffee:19:3)\n  at model._next (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:50:30)\n  at model.proto.(anonymous function) [as init] (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:96:20)\n  at completeOne (/home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1391:10)\n  at Object.cb (/home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1150:11)\n  at Object.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mquery/lib/utils.js:137:16)\n  at Object._onImmediate (/home/ubuntu/codecombat/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31)\n  at processImmediate [as _immediateCallback] (timers.js:330:15)\n"},{"message":"invalid type: null (expected string)","code":0,"dataPath":"/matches/165/opponents/0/name","schemaPath":"/properties/matches/items/properties/opponents/items/properties/name/type","subErrors":null,"stack":"Error: invalid type: null (expected string)\n  at new ValidationError (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:1188:12)\n  at ValidatorContext.createError (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:176:9)\n  at ValidatorContext.validateType (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:559:14)\n  at ValidatorContext.validateBasic (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:529:19)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:410:19)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at ValidatorContext.validateArrayItems (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:723:21)\n  at ValidatorContext.validateArray (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:656:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:413:11)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at ValidatorContext.validateArrayItems (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:723:21)\n  at ValidatorContext.validateArray (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:656:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:413:11)\n  at ValidatorContext.validateObjectProperties (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:786:21)\n  at ValidatorContext.validateObject (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:737:11)\n  at ValidatorContext.validateAll (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:414:11)\n  at Object.api.validateMultiple (/home/ubuntu/codecombat/node_modules/tv4/tv4.js:1308:12)\n  at LevelSessionHandler.module.exports.Handler.validateDocumentInput (/home/ubuntu/codecombat/server/commons/Handler.coffee:364:15)\n  at LevelSessionHandler.module.exports.Handler.saveChangesToDocument (/home/ubuntu/codecombat/server/commons/Handler.coffee:404:19)\n  at /home/ubuntu/codecombat/server/commons/Handler.coffee:248:10\n  at LevelSessionHandler.module.exports.Handler.doWaterfallChecks (/home/ubuntu/codecombat/server/commons/Handler.coffee:380:12)\n  at /home/ubuntu/codecombat/server/commons/Handler.coffee:246:8\n  at Promise.<anonymous> (/home/ubuntu/codecombat/server/commons/Handler.coffee:373:9)\n  at Promise.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)\n  at Promise.EventEmitter.emit (events.js:95:17)\n  at Promise.emit (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)\n  at Promise.fulfill (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)\n  at Promise.resolve (/home/ubuntu/codecombat/node_modules/mongoose/lib/promise.js:108:15)\n  at Promise.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)\n  at Promise.EventEmitter.emit (events.js:95:17)\n  at Promise.emit (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)\n  at Promise.fulfill (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)\n  at /home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1393:13\n  at model.Document.init (/home/ubuntu/codecombat/node_modules/mongoose/lib/document.js:250:11)\n  at model._done (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:59:24)\n  at _next (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:52:28)\n  at fnWrapper (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:159:8)\n  at model.module.exports (/home/ubuntu/codecombat/server/levels/sessions/LevelSession.coffee:19:3)\n  at model._next (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:50:30)\n  at model.proto.(anonymous function) [as init] (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/hooks/hooks.js:96:20)\n  at completeOne (/home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1391:10)\n  at Object.cb (/home/ubuntu/codecombat/node_modules/mongoose/lib/query.js:1150:11)\n  at Object.<anonymous> (/home/ubuntu/codecombat/node_modules/mongoose/node_modules/mquery/lib/utils.js:137:16)\n  at Object._onImmediate (/home/ubuntu/codecombat/node_modules/newrelic/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:177:31)\n  at processImmediate [as _immediateCallback] (timers.js:330:15)\n"}]

The subsequent http://codecombat.com/queue/scoring request fails with: There was an error submitting the game to the queue:You are unauthorized to submit that game to the simulator


#2

Sorry about this! It should be fixed now.