twilio / flex-webchat-ui-sample

Twilio Flex Web Chat UI Sample
31 stars 28 forks source link

Failed to initialize Flex Web Chat TypeError: Cannot read property 'logLevel' of undefined #7

Closed Martin-1997 closed 4 years ago

Martin-1997 commented 4 years ago

When I follow the guide (cloning the repository and running npm install), I get some warnings and errors about deprecated packages. If I update all the packages using ncu -u and run npm install again, at least the errors are solved, but some warnings are still there. WhenI run npm start, the server ist starting and I can see the background logo in the browser, but there is no chat appearing. When I check the browsers console I see the following error logs:

Uncaught SyntaxError: Unexpected token '<'

and

index.js:1 Failed to initialize Flex Web Chat TypeError: Cannot read property 'logLevel' of undefined at twilio-flex-webchat.prod.js:137 at tryCatch (runtime.js:45) at Generator.invoke [as _invoke] (runtime.js:271) at Generator.prototype.<computed> [as next] (runtime.js:97) at g (twilio-flex-webchat.prod.js:137) at a (twilio-flex-webchat.prod.js:137) at twilio-flex-webchat.prod.js:137 at new Promise (<anonymous>) at Function.n (twilio-flex-webchat.prod.js:137) at Function.<anonymous> (twilio-flex-webchat.prod.js:137) at new App (App.js:12) at constructClassInstance (react-dom.development.js:14204) at updateClassComponent (react-dom.development.js:18413) at beginWork$1 (react-dom.development.js:20186) at beginWork$$1 (react-dom.development.js:25756) at performUnitOfWork (react-dom.development.js:24698) at workLoopSync (react-dom.development.js:24671) at performSyncWorkOnRoot (react-dom.development.js:24270) at scheduleUpdateOnFiber (react-dom.development.js:23698) at updateContainer (react-dom.development.js:27103) at react-dom.development.js:27528 at unbatchedUpdates (react-dom.development.js:24433) at legacyRenderSubtreeIntoContainer (react-dom.development.js:27527) at Object.render (react-dom.development.js:27608) at Module../src/index.js (index.js:12) at __webpack_require__ (bootstrap:785) at fn (bootstrap:150) at Object.1 (registerServiceWorker.js:117) at __webpack_require__ (bootstrap:785) at checkDeferredModules (bootstrap:45) at Array.webpackJsonpCallback [as push] (bootstrap:32) at main.chunk.js:1

Can anybody help me?

ruipfreis commented 4 years ago

Hey Martin,

this error happens when the configuration is not being loaded. Have you created your own cofiguration under public/assets/webchat-appConfig.js, by cloning public/assets/webchat-appConfig.sample.js??

Martin-1997 commented 4 years ago

Thank you, that worked!