The Smart Actions were still working fine a week ago, but today we noticed that when we try to use one, the request stays in “pending” then get a 504 Response. It seems to happen on all SmartActions, on different collections.
On our staging environment there is no problem, and the code is the same.
The problem seems to come from the PermissionMiddlewareCreator. If i remove the middleware from the route, then it works again, but it’s not a viable solution.
We’re sorry to hear that you have issues with smartActions.
Is the problem still present ? We had some slow server response times around the time you created this topic and it could be the cause.
The staging environment you’re talking about, is it a remote environment or a development environment ? In development environment, the agent won’t check permissions for any action which can explain why you encountered no issue.
After looking into it a bit more, I’m failing to see any changes that we could have made in the last week causing such an issue. Moreover, looking at the calls made from your production environment there weren’t any that resulted in an error.
Is the configuration for the smartAction similar between your production and staging environments ? Can you maybe share the name of your smartAction and the collection on which it is defined ? It may help me look into it a bit more.
When executing the smartAction, is it stuck on the middleware or does it, at some point, execute the business code ? From my side I can see that the agent did call our backend to retrieve permission configurations with success.
The action name is “Upload de kbis” on the collection “Companies”, but it seems to be the same on all Smart Actions.
The request is stuck on the middleware, the business code is never called.
I just tried again and it’s still the same.
We’re glad you have been able to resolve your issue.
Thanks for coming back to us with the cause and please do not hesitate to come back to the community support if you face any other issues.