Smart Actions suddenly Failing

Hi All -

We are suddenly experiencing failures of a Smart Action. It was functioning yesterday and there have been no changes since then on our side.

Here is the error thrown in the console:

UnhandledPromiseRejectionWarning: Error: Impossible to retrieve the smart action at endpoint /forest/actions/<smart action name>?timezone=<timezone> and method POST

And the full trace from the console, as well:

Jun  2 16:06:56 ip-10-0-10-247 web: POST /forest/actions/<smart action name>/hooks/load 200 130 - 7.818 ms
Jun  2 16:06:57 ip-10-0-10-247 web: GET / 200 10026 - 0.649 ms
Jun  2 16:06:58 ip-10-0-10-247 web: GET / 200 10026 - 0.617 ms
Jun  2 16:07:08 ip-10-0-10-247 web: OPTIONS /forest/actions/<smart action name>?timezone=<timezone> 204 0 - 0.183 ms
Jun  2 16:07:08 ip-10-0-10-247 web: (node:3616) UnhandledPromiseRejectionWarning: Error: Impossible to retrieve the smart action at endpoint /forest/actions/<smart action name>?timezone=<timezone> and method POST
Jun  2 16:07:08 ip-10-0-10-247 web: at PermissionMiddlewareCreator._getSmartActionInfoFromRequest (/var/app/current/node_modules/forest-express/dist/middlewares/permissions.js:59:15)
Jun  2 16:07:08 ip-10-0-10-247 web: at PermissionMiddlewareCreator._getPermissionsInfo (/var/app/current/node_modules/forest-express/dist/middlewares/permissions.js:72:23)
Jun  2 16:07:08 ip-10-0-10-247 web: at _callee$ (/var/app/current/node_modules/forest-express/dist/middlewares/permissions.js:102:43)
Jun  2 16:07:08 ip-10-0-10-247 web: at tryCatch (/var/app/current/node_modules/regenerator-runtime/runtime.js:63:40)
Jun  2 16:07:08 ip-10-0-10-247 web: at Generator.invoke [as _invoke] (/var/app/current/node_modules/regenerator-runtime/runtime.js:293:22)
Jun  2 16:07:08 ip-10-0-10-247 web: at Generator.next (/var/app/current/node_modules/regenerator-runtime/runtime.js:118:21)
Jun  2 16:07:08 ip-10-0-10-247 web: at asyncGeneratorStep (/var/app/current/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
Jun  2 16:07:08 ip-10-0-10-247 web: at _next (/var/app/current/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
Jun  2 16:07:08 ip-10-0-10-247 web: at new Promise (<anonymous>)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/forest-express/dist/middlewares/permissions.js:130:23
Jun  2 16:07:08 ip-10-0-10-247 web: at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/route.js:137:13)
Jun  2 16:07:08 ip-10-0-10-247 web: at Route.dispatch (/var/app/current/node_modules/express/lib/router/route.js:112:3)
Jun  2 16:07:08 ip-10-0-10-247 web: at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/express/lib/router/index.js:281:22
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.process_params (/var/app/current/node_modules/express/lib/router/index.js:335:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/index.js:275:10)
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.handle (/var/app/current/node_modules/express/lib/router/index.js:174:3)
Jun  2 16:07:08 ip-10-0-10-247 web: at router (/var/app/current/node_modules/express/lib/router/index.js:47:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
Jun  2 16:07:08 ip-10-0-10-247 web: at trim_prefix (/var/app/current/node_modules/express/lib/router/index.js:317:13)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/express/lib/router/index.js:284:7
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.process_params (/var/app/current/node_modules/express/lib/router/index.js:335:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/index.js:275:10)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/express/lib/router/index.js:635:15
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/index.js:260:14)
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.handle (/var/app/current/node_modules/express/lib/router/index.js:174:3)
Jun  2 16:07:08 ip-10-0-10-247 web: at router (/var/app/current/node_modules/express/lib/router/index.js:47:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
Jun  2 16:07:08 ip-10-0-10-247 web: at trim_prefix (/var/app/current/node_modules/express/lib/router/index.js:317:13)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/express/lib/router/index.js:284:7
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.process_params (/var/app/current/node_modules/express/lib/router/index.js:335:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/index.js:275:10)
Jun  2 16:07:08 ip-10-0-10-247 web: at /var/app/current/node_modules/express/lib/router/index.js:635:15
Jun  2 16:07:08 ip-10-0-10-247 web: at next (/var/app/current/node_modules/express/lib/router/index.js:260:14)
Jun  2 16:07:08 ip-10-0-10-247 web: at Function.handle (/var/app/current/node_modules/express/lib/router/index.js:174:3)
Jun  2 16:07:08 ip-10-0-10-247 web: at router (/var/app/current/node_modules/express/lib/router/index.js:47:12)
Jun  2 16:07:08 ip-10-0-10-247 web: at Layer.handle [as handle_request] (/var/app/current/node_modules/express/lib/router/layer.js:95:5)
Jun  2 16:07:08 ip-10-0-10-247 web: (node:3616) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)```

I do have an additional error log from /nginx/error.log that I’m happy to share via DM.

Hi @yeti182,

Thank you for sharing your issue with us, could you please share with me your project name, the agent type and version you’re using (forest-express-sequelize, forest-express-mongoose, forest-rails)?

Also the smart action definition would be of some help :pray:

Thank you

Thanks, @lamatt_v. I just messaged you with all of those details.

Hi @yeti182,

Looking at the info you sent in PM, it seems that you’re using the latest beta version of forest-express-sequelize. As it is a beta version, some things are quickly evolving to maintain this version stable.

We recently released a v8.0.0-beta.4 that should correct the issues you’re facing currently. do not hesitate to come back if ever you’re facing other issues with your beta version

Thanks, @lamatt_v. I’ll update to the latest v8 beta. Looks like there are breaking changes, and I’ll work with our account exec to get the details.

1 Like

Hello @yeti182,

Let me know when you have fresh news on this topic :wink:
I’ll be happy to help.

Thanks!

Hi @adriguy - thanks for checking in! Updating to the latest beta fixed everything right up. I appreciate your help!

2 Likes