Re-Tails / WiseTree-frontend

1 stars 1 forks source link

Cannot create a new tree #4

Closed scott-dowell closed 2 years ago

scott-dowell commented 2 years ago

When I try and create a new tree in Team Diagrams -> Draft Diagrams -> Create New Tree, I see a toast error message that says Failed to Create New Node as per the screenshot below.

image

The login details I am using are: scott.dowell@wisetechglobal.com 9Ll7VPlK

scott-dowell commented 2 years ago

Further to this issue, I note that there is an error and associated call stack in the backend logs as follows:

2022-05-25T22:22:47.882378+00:00 app[web.1]: started resolve 2022-05-25T22:22:47.887185+00:00 app[web.1]: after new Node 2022-05-25T22:22:47.891277+00:00 app[web.1]: err 2022-05-25T22:22:47.893864+00:00 app[web.1]: Error: Node validation failed: treeId: Path treeId is required. 2022-05-25T22:22:47.893866+00:00 app[web.1]: at ValidationError.inspect (/app/node_modules/mongoose/lib/error/validation.js:48:26) 2022-05-25T22:22:47.893867+00:00 app[web.1]: at formatValue (internal/util/inspect.js:745:19) 2022-05-25T22:22:47.893867+00:00 app[web.1]: at inspect (internal/util/inspect.js:319:10) 2022-05-25T22:22:47.893868+00:00 app[web.1]: at formatWithOptionsInternal (internal/util/inspect.js:1979:40) 2022-05-25T22:22:47.893868+00:00 app[web.1]: at formatWithOptions (internal/util/inspect.js:1861:10) 2022-05-25T22:22:47.893868+00:00 app[web.1]: at console.value (internal/console/constructor.js:328:14) 2022-05-25T22:22:47.893868+00:00 app[web.1]: at console.log (internal/console/constructor.js:364:61) 2022-05-25T22:22:47.893869+00:00 app[web.1]: at resolve (/app/graphql-schema/mutationSchema.js:75:29) 2022-05-25T22:22:47.893869+00:00 app[web.1]: at runMicrotasks () 2022-05-25T22:22:47.893870+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:95:5) { 2022-05-25T22:22:47.893870+00:00 app[web.1]: errors: { 2022-05-25T22:22:47.893871+00:00 app[web.1]: treeId: ValidatorError: Path treeId is required. 2022-05-25T22:22:47.893871+00:00 app[web.1]: at validate (/app/node_modules/mongoose/lib/schematype.js:1270:13) 2022-05-25T22:22:47.893871+00:00 app[web.1]: at /app/node_modules/mongoose/lib/schematype.js:1253:7 2022-05-25T22:22:47.893871+00:00 app[web.1]: at Array.forEach () 2022-05-25T22:22:47.893872+00:00 app[web.1]: at ObjectId.SchemaType.doValidate (/app/node_modules/mongoose/lib/schematype.js:1198:14) 2022-05-25T22:22:47.893873+00:00 app[web.1]: at /app/node_modules/mongoose/lib/document.js:2567:18 2022-05-25T22:22:47.893873+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:77:11) { 2022-05-25T22:22:47.893874+00:00 app[web.1]: properties: [Object], 2022-05-25T22:22:47.893874+00:00 app[web.1]: kind: 'required', 2022-05-25T22:22:47.893875+00:00 app[web.1]: path: 'treeId', 2022-05-25T22:22:47.893875+00:00 app[web.1]: value: undefined, 2022-05-25T22:22:47.893875+00:00 app[web.1]: reason: undefined, 2022-05-25T22:22:47.893876+00:00 app[web.1]: [Symbol(mongoose:validatorError)]: true 2022-05-25T22:22:47.893876+00:00 app[web.1]: } 2022-05-25T22:22:47.893876+00:00 app[web.1]: }, 2022-05-25T22:22:47.893877+00:00 app[web.1]: _message: 'Node validation failed' 2022-05-25T22:22:47.893877+00:00 app[web.1]: }

Re-Tails commented 2 years ago

Should be fixed now with the recent changes in the back-end https://github.com/GaryGadget9/WiseTree-backend/commit/acdfc29caa0b296ed58ecadead6abfc79df2c0c0