Error: "Cannot convert undefined or null to object"

Overview

Users cannot log in due to the error:

Cannot convert undefined or null to object

This error can be found on the auth0 dashboard logs.

Solution

This error is a javascript error, and it is likely to be produced in one of the extensibility points. For this, please check the customizations at:

  • Actions
  • Rules
  • Hooks
  • Custom database scripts

This error points towards most probably a variable in the code that is “undefined” or null. Also, it indicates that the code is being used to convert it to an object. For example, a code like this would raise this particular javascript error:

Object.entries(undefinedOrNullVariable).reduce(…)