These are chat archives for reactioncommerce/reaction
WebSocket connection to 'ws://localhost:3000/websocket’ failed
@aldeed Do you have any idea what would cause this when importing email templates on startup?
TypeError: Cannot read property 'clean' of null at Object.Importer.object (server/api/core/importer.js:452:44) at Object.Importer.template (server/api/core/importer.js:318:15) at Assets.find.forEach.t (server/api/core/templates.js:278:27) at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1099:16) at Cursor.(anonymous function) [as forEach] (packages/mongo/mongo_driver.js:879:44) at Hooks.Events.add (server/api/core/templates.js:274:8) at /home/contact/bundle/programs/server/npm/node_modules/@reactioncommerce/hooks/dist/main.js:71:14 at Array.reduce (<anonymous>) at Object.Hooks.Events.run (/home/contact/bundle/programs/server/npm/node_modules/@reactioncommerce/hooks/dist/main.js:70:22) at Object.init (server/api/core/core.js:72:18) at startup (server/startup/index.js:42:12) at Function.time (/home/contact/bundle/programs/server/profile.js:309:28) at /home/contact/bundle/programs/server/boot.js:427:13 at /home/contact/bundle/programs/server/boot.js:472:5 at Function.run (/home/contact/bundle/programs/server/profile.js:510:12) at /home/contact/bundle/programs/server/boot.js:470:11
The line that's causing this is
const cleanedModifier = collection.simpleSchema(importObject).clean() (l. 421) in
/server/api/core/importer.js. This seems to be a Simple Schema thing but I can't say for sure. Would appreciate your insights here.
Tracker.autorunloop. Any ideas how to debug this?
compose.jsit looks like a previous prop object does not triple equal a current props object... looks like I'm writing my own
shouldUpdatefunction. I'm curious why we don't see this more often?
cleanerror would be because
.simpleSchema(doc)is supposed to return the attached collection but either no collection is attached or multiple collections are attached and none of them has a selector that matches
importObject. Assuming that schemas are correctly being attached, the
Templatescollection has 3 of them and you'd get back
importObject.typeis something other than "email", "template", or "react". So make sure the
typeof all your templates being imported is set to one of those.