Community » Posted by samsam

Error message when uploading HAR File

Hi,

I'm getting this error message when uploading my HAR file:

We couldn't process this file. Please upload a single .har file. If this is a large HAR file, you may just need to wait for your browser to finish exporting the file and try again in a few minutes. If this HAR file was exported as zero bytes from Chrome, you may want to try with Firefox and filter URLs in the Network tab before exporting. Error Details: Expected double-quoted property name in JSON at position 104100000 (line 850256 column 13)

The file I'm trying to upload is quite large (101,669 KB), as I am aiming to scrape the comments from an instagram post with ~2000 comments. I'm not exactly sure what this error message is referring to and am hoping for some help with troubleshooting why this error is occuring.

Thank you in advance for your help!

1 Comment

  • Hi Samsam, thank you for your post!

    It looks like the browser is prematurely cutting off the HAR file contents on export (resulting in a bad HAR file), as the error message suggests it can't parse the HAR file because the payload from the browser is incomplete. As you suggested, this can sometimes happen with larger HAR files that your browser can have trouble with.

    The easiest fix is to simply export multiple, smaller HAR files to prevent the browser from doing this. So I would suggest trying the following:

    1) Open up developer tools (to begin recording network traffic) and navigate to the Instagram post you want to scrape the comments of - but don't click on the post just yet or load any of the comments.
    2) Hit the "Clear" icon in the Network tab in developer tools. This will "clear" up anything the browser has previously recorded (that may be causing the issue) and should help prevent it from crashing since it will have less to record.
    3) Scroll through half of the comments, say 1,000, and then export a HAR file. Name it something like "Instagram Comments Part 1" and save it to your computer.
    4) Hit the "Clear" icon in the Network tab again (to reset the recording) and repeat the process above, scrolling through the next 1,000 Instagram comments, then export, etc...

    You can then parse the individual, smaller HAR files and later on combine the CSV output together.

    If you still want to try getting them all into one HAR file, then hitting "Clear" just before doing the scrolling may be enough to prevent the browser from crashing on HAR file export. We've also sometimes seen Firefox work a little better when exporting large HAR files, so it may be worth giving that a try as well. In the "Filter" bar in the Network tab on Firefox, it can also help if you type in the URL of the network requests with the payload in it to only export those (with the Instagram comments in them).

    Please let us know if this helps - or if you need more clarification please don't hesitate to reach out using the customer support widget (bottom right of the screen) and we can reply with more information, screenshots, etc...

    Thanks!

    By steve Moderator