speedcontrol / nodecg-speedcontrol

NodeCG bundle to help facilitate the running of speedrunning marathons, including overlays.
MIT License
45 stars 34 forks source link

Fix timer replicants break after 100 hours #123

Closed opl- closed 2 years ago

opl- commented 2 years ago

Replicants throw on schema validation when time exceeds 100 hours. Guess how I found out...

Stack trace
warn: [nodecg/lib/server/extensions] Failed to mount nodecg-speedcontrol extension:
Error: Invalid value rejected for replicant "timer" in namespace "nodecg-speedcontrol":
        Field "time" pattern mismatch

    at Replicant.validate (/nodecg/lib/replicant/shared.js:295:12)
    at Object.set (/nodecg/lib/replicant/shared.js:174:14)
    at setTime (/nodecg/bundles/nodecg-speedcontrol/extension/timer.js:70:35)
    at Object. (/nodecg/bundles/nodecg-speedcontrol/extension/timer.js:322:5)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object. (/nodecg/bundles/nodecg-speedcontrol/extension/run-control.js:38:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at module.exports (/nodecg/bundles/nodecg-speedcontrol/extension/index.js:15:5)
    at _loadExtension (/nodecg/lib/server/extensions.js:103:37)
    at EventEmitter.module.exports.init (/nodecg/lib/server/extensions.js:32:6)
    at EventEmitter.module.exports.start (/nodecg/lib/server/index.js:310:19)
    at Object. (/nodecg/index.js:77:8)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47
warn: [nodecg/lib/server/extensions] Failed to mount esa-layouts extension:
TypeError: Cannot read property 'sendMessage' of undefined
    at new SpeedcontrolUtil (/nodecg/bundles/esa-layouts/node_modules/speedcontrol-util/dist/server/index.js:46:50)
    at Object. (/nodecg/bundles/esa-layouts/extension/util/speedcontrol.js:7:14)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object. (/nodecg/bundles/esa-layouts/extension/util/mq-logging.js:10:24)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object. (/nodecg/bundles/esa-layouts/extension/intermission-player.js:29:32)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at Object. (/nodecg/bundles/esa-layouts/extension/obs-data.js:27:31)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:94:18)
    at module.exports (/nodecg/bundles/esa-layouts/extension/index.js:26:5)
    at _loadExtension (/nodecg/lib/server/extensions.js:103:37)
    at EventEmitter.module.exports.init (/nodecg/lib/server/extensions.js:45:6)
    at EventEmitter.module.exports.start (/nodecg/lib/server/index.js:310:19)
    at Object. (/nodecg/index.js:77:8)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47