Error raised when migrating to Converged Platform

Problem statement

After migrating to Converged Platform (Layer0), the authentication flow has started failing. The tenant logs contain the following error message:

Guardian - ExtensibilityImplementationError on my-hook-name: Unexpected undefined error response payload from
 extension URL https://webtask-router.my-tenant.auth0.com/api/run/my-tenant/RANDOMSTRING, 
missing / invalid .message or .statusCode: {"code":500,"message":"node module \"module@version\" is not currently available"}

Symptoms

  • Signup/Login failures without changing the logic of Hooks and Actions.
  • Error message with the exception ExtensibilityImplementationError

Troubleshooting

The error message ‘node module “module@version” is not currently available’ indicates that the specified NPM module is not available in the Webtask execution environment at the execution runtime.

Also, the Hook name in the error message suggests this issue is happening in the Hook execution.

Cause

During the migration to Converged Platform, some Node modules were missing from the Webtask environment, which caused these errors to be returned.

Solution

This issue can be fixed by reimporting the node module to the Hook that errors out.

Import the modules by following the steps given below.

  1. Navigate to Auth Pipeline → Hooks in your Auth0 Dashboard
  2. Select the hook to edit and click on the pencil icon on the right side to bring up the Hook editor.
  3. In the Hook editor, click on the Wrench icon in the top left corner
  4. Click on NPM Modules
  5. Check if it shows the list of NPM Modules required in the Hook code. If not, please click on the Add Module button to import them to your Hook execution environment.