Flow page bugs empty page

when open flow page show empty the others page works
this is the log
STACK TRACE
botpress | SyntaxError: Unexpected token { in JSON at position 9887
botpress | at JSON.parse ()
botpress | at ScopedGhostService. (/snapshot/build-linux/out/bp/core/services/ghost/service.js:0:0)
botpress | at Generator.next ()
botpress | at fulfilled (/snapshot/build-linux/out/bp/core/services/ghost/service.js:0:0)
botpress | at tryCatcher (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/util.js:16:23)
botpress | at Promise._settlePromiseFromHandler (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:547:31)
botpress | at Promise._settlePromise (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:604:18)
botpress | at Promise._settlePromise0 (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:649:10)
botpress | at Promise._settlePromises (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:729:18)
botpress | at _drainQueueStep (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:93:12)
botpress | at _drainQueue (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:86:9)
botpress | at Async._drainQueues (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:102:5)
botpress | at Immediate.Async.drainQueues [as _onImmediate] (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:15:14)
botpress | at runCallback (timers.js:696:18)
botpress | at tryOnImmediate (timers.js:667:5)
botpress | at processImmediate (timers.js:649:5)
botpress | at process.topLevelDomainCallback (domain.js:121:23)
botpress | 11:22:10.520 FlowService Could not load flows [SyntaxError, Unexpected token { in JSON at position 9887]

and this is the log when start chat by open chat

Error: Flow not found.", Bot: zakty, Flow: error, Node: N/A
botpress | at DialogEngine._findFlow (/snapshot/build-linux/out/bp/core/services/dialog/dialog-engine.js:0:0)
botpress | at DialogEngine. (/snapshot/build-linux/out/bp/core/services/dialog/dialog-engine.js:0:0)
botpress | at Generator.next ()
botpress | at fulfilled (/snapshot/build-linux/out/bp/core/services/dialog/dialog-engine.js:0:0)
botpress | at tryCatcher (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/util.js:16:23)
botpress | at Promise._settlePromiseFromHandler (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:547:31)
botpress | at Promise._settlePromise (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:604:18)
botpress | at Promise._settlePromise0 (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:649:10)
botpress | at Promise._settlePromises (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/promise.js:729:18)
botpress | at _drainQueueStep (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:93:12)
botpress | at _drainQueue (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:86:9)
botpress | at Async._drainQueues (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:102:5)
botpress | at Immediate.Async.drainQueues [as _onImmediate] (/botpress/modules/.cache/module__f21b22cdb91304a860852bb6a0972f4eed394f43a241bc9a33d90818ff44b497/node_production_modules/bluebird/js/release/async.js:15:14)
botpress | at runCallback (timers.js:696:18)
botpress | at tryOnImmediate (timers.js:667:5)
botpress | at processImmediate (timers.js:649:5)
botpress | at process.topLevelDomainCallback (domain.js:121:23)
botpress | 11:26:42.719 Launcher Unhandled Rejection [TypeError, Cannot read property ‘Symbol(Symbol.iterator)’ of undefined]
botpress | STACK TRACE
botpress | TypeError: Cannot read property ‘Symbol(Symbol.iterator)’ of undefined
botpress | at Storage.getCategories (/botpress/modules/.cache/module__b5eeccd47d8eccbc55767de9fcb2fe7fce0264ec4274d13c5a2726a33896be16/dist/backend/storage.js:312:55)
botpress | 11:28:42.636 Launcher Unhandled Rejection [TypeError, Cannot read property ‘Symbol(Symbol.iterator)’ of undefined]
botpress | STACK TRACE
botpress | TypeError: Cannot read property ‘Symbol(Symbol.iterator)’ of undefined
botpress | at Storage.getCategories (/botpress/modules/.cache/module__b5eeccd47d8eccbc55767de9fcb2fe7fce0264ec4274d13c5a2726a33896be16/dist/backend/storage.js:312:55)


and this is the console log of browser
ypeError: Cannot read property ‘replace’ of undefined
at e.pushFlowState (web.0481d5fc7643151ba490.js?f7d4b1c65b4740393a72:77)
at e.componentDidUpdate (web.0481d5fc7643151ba490.js?f7d4b1c65b4740393a72:77)
at Ua (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at za (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100
at Object.t.unstable_runWithPriority (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:92)
at Au (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at Ou (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at Su (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at wu (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at Ka (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at Object.enqueueSetState (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:100)
at u.w.setState (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:108)
at u.s.onStateChange (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:9)
at Object.notify (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:9)
at e.t.notifyNestedSubs (commons.6edce0726d6528667a4a.js?f7d4b1c65b4740393a72:9)

Hi @mahmoudeldawy

It seems there is an invalid JSON somehow.

Please share your bot, or try to reproduce a minimal shareable one, or you can build Botpress and put try/catch around the offending area to know which JSON is that.

Once identified, the root cause should be determined and handled accordingly

hi @asashour
i found the issue its always happen with wrong edit when you try to put new {node , choice}
the UI bugs and edit Wrong the flow.Json



botLink

this the bot before fix it check it

Hi @mahmoudeldawy

Thanks for info.

I downloaded the Bot, fixed the file and added a new node to the construction flow, but the issue didn’t happen again.

Which Botpress version do you use? And does this always happen when you edit this construction flow, or sometimes. What about other flows? If you can make a video to reproduce it, it would be even better.

I guess we need to know the steps, to reproduce this invalid JSON locally, so the root cause is isolated.

hi @asashour
Thanks for the follow-up
botpress version v12_1_6-linux-x64 i use it on mac os catalina with docker & use botpress-v12_2_0-darwin-x64
same issue with different version & and platform
it`s happen t when you delete builtin_single-choice from content page and i think it happen when you change skill name with name already exist in the same flow the bot update the transitions with first one has same name
there is another bugs but i can handle it if you need short video or screen shot with another bugs please inform me

@mahmoudeldawy

Please upgrade to 12.6.0, the issues could possibly have be fixed.

Also, for others to fix something, it has to be reproducible, so please make a video, or provide the exact steps to execute.