Auth0 Action Execution Log Returns Error "404 Not Found" During Silent Authentication
Last Updated:
Overview
A 404 error occurs when attempting to fetch Auth0 Action execution logs if a Post-Login Action triggers a redirect during a silent authentication attempt. Update the Action logic to avoid redirecting during silent authentication or handle the error in the client application to resolve this issue.
When viewing logs in the Auth0 Dashboard, the following error appears:
Error trying to fetch this log entry
A network trace reveals a 404 error on the /api/actions/executions/ endpoint with the following message:
failed to get execution from segment: Not Found
Additionally, the transaction aborts and returns an error:
External interaction required
Applies To
- Auth0
- Actions
- Silent Authentication
- Logs
Cause
The Post-Login Action pipeline triggers a redirect (for example, using api.redirect.sendUserTo()) during a silent authentication attempt (prompt=none). Because Auth0 cannot follow the redirect during silent authentication, Auth0 immediately aborts the transaction and returns an External interaction required error. Auth0 leaves the Action execution in a SUSPENDED state and never resumes it. Auth0 only writes Action Executions to the storage segment if they reach a completed state. Since the Action never completes, Auth0 does not save an execution trace, resulting in the 404 error when the Auth0 Dashboard attempts to fetch the log.
Solution
How is the 404 error resolved for Action execution logs?
Resolve the 404 error and prevent the Action from suspending during execution by implementing the following methods.
- Update the Action logic to avoid redirecting when the application detects a silent authentication request.
- Handle the error response directly in the client application by sending the user to the interactive login page.
- Add custom logging (such as
console.logstatements) within the Action code to gain visibility into the Action's execution up to the point where the Action calls the redirect.