Auth0 Login fails with ""The script timed out. Possible reasons: your script is taking more than 5 seconds to execute or you are not calling the callback function.""

Error Msg: “The script timed out. Possible reasons: your script is taking more than 5 seconds to execute or you are not calling the callback function.”

We’ve spent a fair amount of time googling, only to find that this error isn’t on google yet. We are also unsure as to what this “callback” function is and know that login takes less than 4 seconds to fail.

We’re using the pre-signup hook, and suspected that, maybe, the callback function in question was the callback returned from the hook, but that’s done correctly and removing the hook doesn’t seem to fix the message.

Any suggestions as to what we could try in order to fix this?

The source of an error such as that one will likely be a hook, a rule or a custom database script as those are the most common extensibility points where you have to provide your own code and where that code needs to comply with a certain contract, in this case, it needs to call the callback function before a certain timeout.

You said you disabled the hook and the error persisted so I would also recommend you to check if you have any rules and if yes do a similar quick test by disabling all rules. The case of custom database scripts is a bit more complex because they are not optional and you can’t test anything without actually calling them so in this case you should review each one to see if they call the necessary callback function in every possible code path.

The problem was that I had a blank rule that I didn’t realize existed - that was throwing everything off.

The problem was that I had a blank rule that I didn’t realize existed - that was throwing everything off.