Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with implemented executeBlockActionHandler after updating RocketChat docker to latest version #801

Open
thelazyindian opened this issue Sep 11, 2024 · 1 comment

Comments

@thelazyindian
Copy link

Usecase:

Omnichannel chatbot using botpress and rocket chat.

Previous RC version: v6.6.6
Current RC version: v6.12.0

Botpress Connector: https://github.com/mrsric/botpress-connector

Error at line: https://github.com/mrsric/botpress-connector/blob/main/handler/ExecuteLivechatBlockActionHandler.ts#L23

Directly logging context.getInteractionData() shows this output https://katb.in/qerixenexuj but while accessing the individual properties in the above line from context.getInteractionData(), all of them returning null/undefined

This issue is specifically happening after I updated Rocket Chat to the latest version.

Error:

[
  "{\"stack\":\"TypeError: Cannot read properties of undefined (reading 'id')
    at HM.run (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:20:848395)
    at $M.executeLivechatBlockActionHandler (eval at wrapAppCode (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/construct.ts:56:10), <anonymous>:20:852719)
    at handleUIKitInteraction (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/uikit/handler.ts:71:41)
    at handleApp (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/handlers/app/handler.ts:33:16)
    at requestRouter (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/main.ts:73:26)
    at main (file:///app/bundle/programs/server/npm/node_modules/@rocket.chat/apps-engine/deno-runtime/main.ts:112:22)
    at eventLoopTick (ext:core/01_core.js:183:11)\",\"message\":\"Cannot read properties of undefined (reading 'id')\"}"
]

RocketChat AppsEngine CLI version: 1.11.1

Solutions that I Tested (none worked):

  1. Added missing implementation for class IUIKitLivechatInteractionHandler in BotpressConnectorApp.ts
  2. RC Apps CLI ver upgraded from 1.11.0->1.11.1
  3. Updated @rocket.chat/apps-engine devDep version from 1.25.0 to 1.44.0 and also downgraded to 1.17.0
  4. Uninstalled and clean installed app in rocket chat.
@dudanogueira
Copy link

hi @thelazyindian !

I got a fixed version here: https://github.com/dudanogueira/Rocket.Chat.Botpress.OmnichannelConnector.App/releases/tag/0.0.10

The problem is that interactionData has moved places. Not sure if it was a breaking change or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants