What you will find in this tip:
Context
The Powell support team has requested that you generate a HAR file to investigate a bug.
Here’s a tip on how to create one and an explanation of what a HAR file is.
What is the HAR file?
A HAR (HTTP Archive) file is a log of network requests and responses made by a browser, used for troubleshooting performance and debugging issues.
The HAR file can be generated by the most recent browsers like Google Chrome or Edge Chromium, and it logs all network calls made on your page during its lifetime.
This file will help us to audit the error you are encountering. We will use this file to investigate your issue.
How to generate it?
To generate the HAR file, you'll need to follow the below steps :
Required first steps
In incognito mode
- Open a new window in incognito mode on your browser. You should only have one window in incognito mode at a time.
⚠️ Using Chrome's Incognito mode?
By default, Chrome blocks third-party cookies in Incognito mode.
Powell relies on third-party cookies for authentication. If they're blocked, you may experience issues such as:
- Graph Webparts not loading
- Other unexpected behaviors
To enable third-party cookies:
- Go to your intranet site
-
In the address bar (the top left) click on the eye icon
- Set the Third-party cookies toggle to on.
Once this is done, you can continue with the next steps.
- Open the browser developer tool by right-clicking and choosing "inspect" or press F12 on your keyboard.
- Enable the sensitive data mode by following the process of the part Allow to generate HAR with sensitive data
- Check the "Disable cache" box that you will find in the Network tab.
- Enable the option "Preserve log" that you will find in the Network tab.
- Finally, clear the browser cache before capturing the HAR file by following the process of our article Browser cache.
- You're now ready to create your HAR file, you can directly go to the Capture your HAR file part.
In normal mode
We recommend using your browser's incognito mode to capture the HAR file. However, if that's not possible, follow these steps:
- Open a window of your browser.
- Open the browser developer tool by right-clicking and choosing "inspect" or press F12 on your keyboard.
- Enable the sensitive data mode by following the process of the part Allow to generate HAR with sensitive data
- Finally, clear the browser cache before capturing the HAR file by following the process of our article Browser cache.
- You can also use the "clear button" in the tab network of the developer tool.
- You're now ready to create your HAR file, you can directly go to the Capture your HAR file part.
Allow to generate HAR with sensitive data
This part is essential to get the content of the network call that will permit the Powell support team to analyze your behavior. If you don't do this and keep the sanitized mode, the team may not have all the needed information and will not be able to analyze correctly your behavior. To enable it, you need to:
- Go to the developer tool settings.
- Ensure that the "Allow to generate HAR with sensitive data" option is enabled in the Preferences > Network section of the settings. If it is disabled, please enable it.
Capture your HAR file
- Be sure to follow the Required first steps, otherwise, your HAR file may miss some required information.
- Log in to your SharePoint site from your browser page with an account that can reproduce the behavior encountered. Ensure that the developer tool remains open on the network tab throughout the entire procedure.
- Do the steps to reproduce the error. Ensure that the developer tool remains open on the network tab throughout the entire procedure.
- Check the network tab. You will see all the calls made on your page during the reproduction steps.
- Right-click on one of the lines and select "Copy" > "Copy all as HAR (with sensitive data)".
- Open a notepad file and paste the content you just copied.
- Save it as a .txt file (or a .har file) and upload it to your Powell support ticket.
- If the file exceeds 50MB, you may need to compress it into a ZIP file.
- If the ZIP file still exceeds 50MB after you compressed it, ask for a link to upload your file to a designated OneDrive folder in your Support ticket.
Is my Har file complete?
Make sure to follow the Required first steps.
A simple way to verify if your HAR file is complete is to open the Network tab in the developer tools and search for the term "Authenticate".
You should come across something like:
If you're using Teams or another browser where this tool isn't available, you can use an external tool like "Fiddler" to capture all network traces on your computer.
This allows you to record network activity, including traces from the Teams Windows app. Here's a tip on how to use it: How to use Fiddler.
Analyze your file
To learn how to analyze your file, check out our Advanced troubleshooting tip Analyze network traces (HAR file).