Auth0 Home Blog Docs

Auth0 Management API: Error Getting Nested Groups - Blocked Event Loop

auth0
management-api

#1

Hello- I am receiving an intermittent 500 response when attempting to retrieve nested groups using the auth0 management api.

requested path:
groups/{groupId}/nested

Seemingly this error occurs at random. Occasionally, the request succeeds and nested groups are returned. When there is an error, it is consistently this error:

Auth0: Error Getting Nested Groups.Group:<guid deleted from error text> Response: { "code": 500, "error": "Script generated an unhandled asynchronous exception.", "details": "Error: Blocked event loop", "name": "Error", "message": "Blocked event loop", "stack": "Error: Blocked event loop\n at :1:38\n at nextTickCallbackWith0Args (node.js:489:9)\n at process._tickDomainCallback (node.js:459:13)" }

Please advise on how to proceed and let me know if more information is required.


#2

I’m experiencing similar issue when associating a user with a role:

PATCH /users/<user-id>/roles

[ "<role-id1>", "<role-id-n>" ]

#3

Same issue as above…


#5

Hello everyone! Is everyone using the Auth0 Authorization extension here? If so, we’ve seen this blocked event loop before and it’s a ongoing challenge with the Authorization extension as detailed here in this Github issue:

If you could please answer the following questions here in this thread as well in the Github issue thread. It will allow us to further gain traction on eliminating this hurdle:

  • What version of the extension you are using?
  • What is your storage type (extension storage vs S3) and approximate storage size?
  • Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
  • What endpoints are causing the error? e.g. /policy , /login , group/roles management?

Thank you in advance!


#6
  • What version of the extension you are using?
    2.5
  • What is your storage type (extension storage vs S3) and approximate storage size?
    Extension
  • Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
    We’re currently in development and a very small team at that, have 2 active users at any time with ~10 users total in the system. 3 roles.
  • What endpoints are causing the error? e.g. /policy , /login , group/roles management?
    GET /users/{userId}/roles

#7
  • What version of the extension you are using?
    2.4. I see 2.5 is available, but have not upgraded yet.

  • What is your storage type (extension storage vs S3) and approximate storage size?
    Extension Storage

  • Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
    Users: 350
    Total # of Overall Groups, Including Top-Level and Nested: 1,400.
    Nesting represents organizational divisions in our use case. One parent group can have many nested child groups.
    Roles: 1

  • What endpoints are causing the error? e.g. /policy , /login , group/roles management?
    GET groups/{groupId}/nested