[ 
https://issues.apache.org/jira/browse/RANGER-5625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krishna Chaitanya Muttevi updated RANGER-5625:
----------------------------------------------
    Attachment: image-2026-06-01-15-06-32-861.png

> User Sync UI fails to render when POST /xusers/ugsync/auditinfo returns 
> invalid "null" strings for syncTime and lastModified
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-5625
>                 URL: https://issues.apache.org/jira/browse/RANGER-5625
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 3.0.0
>            Reporter: Krishna Chaitanya Muttevi
>            Priority: Major
>         Attachments: image-2026-06-01-15-06-02-094.png, 
> image-2026-06-01-15-06-32-861.png
>
>
> When invoking the {{POST /xusers/ugsync/auditinfo}} API with an empty 
> {{fileSyncSourceInfo}} object in the payload, the backend serializes the 
> missing date values as the string literal {{"null"}} (e.g., {{{}"syncTime": 
> "null"{}}}) instead of a valid JSON {{null}} or omitting the field entirely. 
> While the backend successfully logs the audit, navigating to the UI's "Audits 
> > User Sync" tab and attempting to view the sync details causes the 
> application to crash with an "Oops! Something went wrong..." error.
> This indicates an improper backend serialization strategy for empty 
> properties, compounded by a missing frontend fallback or type-check within 
> the "Sync Details" modal component when parsing dates.
> *Steps to Reproduce:* Create a new user sync audit entry with an empty 
> {{fileSyncSourceInfo}} payload:
> _curl -X POST "http://localhost:6080/service/xusers/ugsync/auditinfo"; \ -H 
> "Content-Type: application/json" -iu admin:***** \ -d '\{ "syncSource": 
> "Unix", "noOfNewUsers": 0, "noOfNewGroups": 20, "noOfModifiedUsers": 10, 
> "noOfModifiedGroups": 0,"fileSyncSourceInfo": { }}'
> _
> _Backend returns 200 OK, logging the event._
> Verify backend state via API response: The API responds with string literals 
> for the timestamps instead of valid dates or standard JSON nulls: \{{{}
> {"fileName":"null", "syncTime":"null", "lastModified":"null"}
> {}}}.
> Observe the UI behavior:
>  # Navigate to *Audits* > {*}User Sync{*}.
>  # Locate the recently generated Unix sync event in the table.
>  # Click the "eye" icon under the *Sync Details* column.
> *Expected Behavior:*
> The backend should automatically populate the missing timestamp fields with 
> the current event time. The {{syncSourceInfo}} object should return valid 
> date strings, for example: \{{{}
> {"fileName":"null", "syncTime":"2026-05-05T05:31:13Z", 
> "lastModified":"2026-05-05T05:31:13Z"}
> {}}}. In the UI, clicking the "Sync Details" icon should successfully open 
> the modal and display these generated dates without crashing the interface.
> *Actual Behavior:* The API serializes the missing properties as the string 
> {{{}"null"{}}}. The UI attempts to parse this string as a valid Date object, 
> throwing an unhandled exception that crashes the React component tree and 
> forces the user to an "Oops! Something went wrong..." error screen.
>  
>  
> when we open the view sync details in ui:
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to