Problem:
This error appears when you try to open the HAR file shared by the user.
When we try to open the HAR file or Drag the HAR file to Chrome or any browser, the file shows in the download section as below but we are not able to open it.
When we try to drag and drop the HAR file to the browser Network Tab Dev tool we get the below error. The same issue occurs when you try to open the same file on the user's machine.
Failed to load HAR file with following error: SyntaxError: Unexpected token ' ', " "... is not valid JSON
Note: If we try to open the HAR file in Incognito mode it will not help either.
Solution:
This issue occurred due to the user's network firewall restrictions.
If the user is connected through the company VPN/ Network and getting this issue it means the company firewall has some network restriction and they are not allowing to download the network-related information with the HAR file.
In that case, the user will need to connect with his personal network, reproduce the issue and collect the HAR log.