Hi Harsh,
Since the login page works locally but continuously refreshes in QA, I would first investigate the 401 Unauthorized response from /xas/ and the authentication/session handling, rather than the datasource microflow itself.
I would check the following:
/xas/ request, including its request payload, response body, cookies, and any preceding redirects. This should help identify whether the failure occurs during authentication or session initialization.LoginImage retrieval or non-persistable MiscHelper object.My first step would be to inspect the failing /xas/ request and its response. The fact that the datasource microflow never executes suggests the failure may occur before the page reaches that stage, but the network trace is needed to confirm this.
References:
Hope this helps!
The key clue here is that the datasource microflow never executes in QA, while the browser repeatedly receives 401 Unauthorized responses from /xas/.
This suggests the issue occurs during authentication or page initialization, before Mendix reaches the datasource microflow.
I would investigate the following:
1. Default Home Page vs. Sign-In Page
You mentioned that both point to your custom login page.
The Default Home Page is normally intended for authenticated users, while the Sign-In Page handles unauthenticated access.
Try configuring a separate home page for authenticated users and keeping your custom login page exclusively as the Sign-In Page.
2. Anonymous User Access
Check whether anonymous users are enabled in your project security settings.
If your custom login page depends on a datasource microflow, verify that the appropriate unauthenticated user context has permission to execute it and access the required entities.
3. Microflow and Entity Permissions
Your datasource microflow retrieves a persistent LoginImage object and associates it with an NPE (MiscHelper).
Verify that the relevant user role has:
LoginImage entity and required attributes.MiscHelper and its association.4. Investigate the /xas/ 401 Response
A 401 Unauthorized response is not necessarily the root cause, since authentication-related requests can legitimately return 401.
However, repeated 401 responses combined with continuous page reloads suggest an authentication or session initialization problem.
Check the Network tab to identify which /xas/ action fails and whether the application redirects or reloads immediately afterward.
5. Compare Local and QA Configurations
Since the application works locally, compare:
My recommendation:
Start by separating the Default Home Page from the Sign-In Page and temporarily testing a simple login page without the datasource microflow.
If the refresh loop continues, the problem is likely occurring before your page-specific logic executes.
If the simplified login page works, progressively reintroduce the datasource microflow and dynamic image to isolate the issue.