https://discord.gg/botpress logo
After updating @botpress/webchat its not working a...
# 🤝help
f
I have multiple issues with the latest
@botpress/webchat
version. After updating from webchat v4 to v5 webchat is not initializing anymore. In the network I see
initialize
requests happening which result in
[Webhook Handler] Integration with webhook ID \"XYZ\" not found
. The clientId we are using is definitely correct and has been working before. We are using the custom built React webchat with
useWebchat
and the according React components. Other issues: - The component has no
restartConversation
property anymore. But its still in the docs https://www.botpress.com/docs/webchat/react-library/components/header/ -
useWebchat
is listed in the Typescript types as deprecated and it tells me I should switch to
WebchatProvider
But where are the docs for this?? (I asked about this already 6 month ago and still no answer) Its super frustrating that there are still no changelogs available for this npm package and that its not open source. This is just unprofessional. We are installing a black box without proper documentation here.
q
Hey @future-notebook-73286 The init error (Integration with webhook ID not found): In webchat v5, the clientId your React app passes is your Webchat integration's webhook ID. On your Webchat integration page, that's the UUID at the end of the Webhook URL. Please compare what you see there with the clientId in your code: - If it's different, update your code to this UUID -> that's the fix. 👍 - If it's already identical, then the clientId isn't the problem and I'd like to dig further. Could you share the failing request from the Network tab (full host + path)? It should be calling webchat.botpress.cloud/. On the other points, you're right and they're on us, we are currently working on releasinga a new version of the docs and things might have slipped in the meantime: - restartConversation moved off , in v5 it's provided by the provider (openConversation) and passed down to . - useWebchat is deprecated in favor of WebchatProvider + hooks (useActiveConversation, useConversations, useUser), and the migration guide unfortunately isn't published yet. Let me know the clientId comparison result 🙂
f
Thanks for the quick reply. I will check the id.
Hm I am not sure if I can follow: I took the clientId from Webchat > Features > Advanced Settings There is no webhook URL mentioned anywhere. The URL webchat is trying to request is: https://webchat.botpress.dev/[client-id]/initialize?conversationId=conv_XYZ --- Regarding the restartConversation: We are not using the WebchatProvider and yet. But useWebchat. So there seems to be no way to get the restart conversation feature back for the end user? Then I guess we are stuck with the current version until any documentation exists.
q
If you open your bot, head to the Integration hub and search for Webchat. In the configurations you'll see a webhook and the clientID is at the end.
f
Thanks founds it
q
Happy to help!
4 Views