I got "Cannot set property 'execution' of undefined" after new users signup

When new users signup my app receives an error from auth0 with the text Cannot set property 'execution' of undefined .
In the logs can be seen:

"connection": "xxxxxxxx-db",
    "error": {
      "message": "Cannot set property 'execution' of undefined",
      "oauthError": "access_denied",
      "type": "oauth-authorization"
    }, ...

I need help figuring out from what side is the error. I tested signups some time ago and was working fine. My deployment has:

  • An Angular app (a SPA application configured on the Tenant)
  • A rails API (an API configured on the Tenant)
  • An Custom DB connection as user account source at migration state. (Login and GetUser scripts working)

Login with existing users is working fine, also other operations like forgot password, change password, MFA.

I didn’t receive anything relevant on the API logs (a rails app) but just a request to the end-point required by the DB connection at import mode, which returns null data because is a new user.

Any ideas where I can be looking?

UPDATE 1: When I use the option “Try connection” inside Auth0 tenant, I receive the same behaviour, OK for previous users, and Error for recent sign-ups.

My client is on a “Developer Pro” subscription, which recently shows me has not available the external DB feature, however, we are using the scripts to use the import mode, temporarily; also the old users are being imported correctly, it’s the new users the one isn’t working. Could be this a license issue? I think not :thinking:

Hey @nils , this could happen if a rule doesn’t send the context back when calling callback(). For example, calling callback(null) instead of callback(null, user, context). Can you verify if this is the case?

1 Like

Ok, working on it…thanks!..
It’s definitely a rule, I disabled it and it works. Checking parameters now on all calls.

1 Like

Glad you have sorted it out!

Confirmed, there was a rule with one path ending with a callback call without the user and context parameters, callback(null) instead of callback(null, user, context) precisely with new users. Thanks, @thameera.

1 Like

Thanks for sharing it with the rest of community!

1 Like