voiceflow / react-chat

React-based chat widget for conversations powered by Voiceflow
https://voiceflow.github.io/react-chat/
73 stars 95 forks source link

`Error: notImplemented` when calling createTranscript #76

Open mepc36 opened 1 year ago

mepc36 commented 1 year ago

Hi, I ported this @voiceflow/demo-react-chat app found here from vite to Next.js. I then migrated it into my app. Currently, it's throwing this error:

index.es.js:10276 Uncaught (in promise) Error: not implemented
    at _D.createTranscript (index.es.js:10276:1)
    at DD.createTranscript (index.es.js:10364:1)
    at B (index.es.js:14940:1)
    at Object.reply (index.es.js:14955:1)
    at handleSend (Demo.js:37:15)
    at onSend (index.es.js:9535:1)
    at onKeyPress (index.es.js:9454:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
    at invokeGuardedCallback (react-dom.development.js:4277:1)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
    at executeDispatch (react-dom.development.js:9041:1)
    at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
    at processDispatchQueue (react-dom.development.js:9086:1)
    at dispatchEventsForPlugins (react-dom.development.js:9097:1)
    at eval (react-dom.development.js:9288:1)
    at batchedUpdates$1 (react-dom.development.js:26140:1)
    at batchedUpdates (react-dom.development.js:3991:1)
    at dispatchEventForPluginEventSystem (react-dom.development.js:9287:1)
    at dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay (react-dom.development.js:6465:1)
    at dispatchEvent (react-dom.development.js:6457:1)
    at dispatchDiscreteEvent (react-dom.development.js:6430:1)

It happens whenever I send a message to the chatbot. It seems like maybe a typing error?

This is my @voiceflow/react-chat version:

"@voiceflow/react-chat": "^1.46.1"

I will report back with more info.

mepc36 commented 1 year ago

This is the createTranscript function throwing the error. Not sure why it's calling this function if it's explicitly not been implemented:

  async feedback() {
    return Promise.reject(new Error("not implemented"));
  }
  getPublishing() {
    return Promise.reject(new Error("not implemented"));
  }
  createTranscript() {
    return Promise.reject(new Error("not implemented"));
  }

This makes me wonder if creating a transcript is functionality that I have to manually implement on my side in the bot designer? I tried to Google for docs about that though and found none.

mepc36 commented 1 year ago

Commenting out the return state of createTranscript fixed this problem. That's not a solution, but it does confirm that this line is the offender. I think we just have to not call m.createTranscript on line 14962.

mepc36 commented 1 year ago

Error log:

Screenshot 2023-10-04 at 2 02 11 PM

effervescentia commented 1 year ago

Hi there @mepc36 👋 sorry for not responding to your issue sooner

The error you're experiencing is expected in demo-react-chat because the transcript saving functionality has not been setup as part of that demo. It should not negatively affect the chat experience, but transcripts will not be saved or viewable through https://creator.voiceflow.com.

We are working on a fix now and should shortly update the demo to have transcript saving setup correctly. I'll update you here when that is available. Thank you for your bug report!