Troubleshooting UI / permission issues can prove difficult when Support don't see the same behavior that you observe. An HTTP Archive (HAR) can often help here.
A HAR file is a JSON log of the web browser's HTTP interaction with a site. This can often expose errors that aren't otherwise displayed in the UI, or timescales that can demonstrate performance issues. It also exposes the API responses from the CircleCI platform that can help to understand the root cause of UI issues or unexpected behaviour.
Here are some instructions on how to create a HAR file for:
Chrome / Chromium based browsers:
- Navigate to the page you wish to record
- Navigate to menu (β°) > More Tools > </> Developer Tools
- Select the Network tab
- Check the Preserve Log checkbox
- Select the Stop Recording (π₯) button to stop logging
- Select the Clear (π«) button to clear the current log
- Select the Record (β«) button to start recording
- Refresh the page or perform the task to record the events
- Select the Export HAR (β) button to download and save the HAR file
Note: Modern Chromium browsers will sanitize the logs. However, if you need to do this manually you can follow these instructions: Removal of User Information
Firefox:
- Navigate to the menu (β°) > More Tools > Web Developer Tools
- Select the Network tab
- Select the Network Settings (β) button > Persist Logs
- Select the pause (βΈοΈ) button to pause recording
- Select the waste basket (ποΈ) to clear the log
- Select the play button (βΆοΈ) to start recording
- Refresh the page or perform the task to record the events
- Click the Network Settings (β) button > Save All As HAR
- Follow instruction on Removal of User Information
Safari:
- Enable the Developer menu:
- Click on Safari menu > Settings... > Advanced > Show features for web developers
- Select Develop (menu) > Show Web Inspector
- Select the Menu (β°) button > ensure Preserve Log is checked
- Select the waste basket (ποΈ) to clear the log
- Refresh the page or perform the task to record the events
- Click Export to download and save the HAR file
- Follow instruction on Removal of User Information
Removal of User Information
HAR files can contain sensitive user information and we recommend sanitizing the HAR file after recording.
Cloudflare provide a cloud-based tool to remove sensitive information from a HAR file:
https://har-sanitizer.pages.dev/
If you prefer, you can use the following steps to remove them manually.
Automated Removal of User Information Using jq
If you have jq
installed you can use it to remove user information. Run the following command:
jq '
(.. | objects | select(has("name") and (.name == "ring-session" or .name == "Set-Cookie" or .name == "Cookie"))) |= del(.value)
' path_to_your_file.har > new_file.har
Replace path_to_your_file.har
with the path to your HAR file. This command will create a new HAR file named new_file.har
with the sensitive data removed.
Manual Removal of User Information
- Open the HAR file with a text editor
- Search for
ring-session
,Set-Cookie
, andCookie
- Find the associated
value
field for each instance and delete its content. Be careful not to delete the entire object or any surrounding syntax. - Save the HAR file.
Comments
Article is closed for comments.