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


#8

@kstacks @simon3 Please make sure you relay your responses to the previous questions to Github issue as well. This allows for better tracking/follow up when the issue is resolved. Thanks!


#9

Hey there everyone, I wanted to follow up and let you know that the Authorization Extension: Blocked Event Loop Github issue has been updated and closed.

As stated in the Github issue comment, the following solution for the issue is as follows:

To fix this issue perform the two following actions:

  1. Migrate your Auth0 tenant from Node 4 to Node 8 and then republish the Auth0 rule that is created by the Authorization Extension. Here is the documentation page that explains how to migrate your tenant to Node 8.
  2. After you have migrated to Node8, open the Authorization Extension in the dashboard. In the upper right-hand part of the page, you’ll see your tenant name. Click on your tenant name and select “Configuration” from the drop down menu. On the “Configuration” page, click the “Publish Rule” button. This will recreate your Auth0 rule to use the Node8 runtime.

I wanted to make sure I kept you in the loop on these recent events and if you have any additional questions on the matter please feel free to let us know. Thank you.


#10

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.