theopolisme / hangouts-analyzer

Analyze and visualize your Google Hangouts chat history
https://theopolis.me/hangouts-analyzer
44 stars 10 forks source link

Error: Unexpected end of JSON input #1

Open gordo opened 7 years ago

gordo commented 7 years ago

When uploading the JSON file from a Google Hangouts Takeout archive today, I get the following error, "Unexpected end of JSON input".

theopolisme commented 7 years ago

Hm, interesting. How big was the file? Possibly experiencing a memory overflow issue similar to https://github.com/theopolisme/location-history-visualizer/issues/16.

gordo commented 7 years ago

The JSON file is about 340 MB.

theopolisme commented 7 years ago

Yeah, unfortunately it's a known issue that the browser can't load JSON files over 256 MB. I worked on a fix for a desktop version of the Location History Visualizer tool but have yet to port it to web - involves streaming the file for processing rather than loading it all into memory at once.

Open to a pull request, but otherwise might take a while... check out the jsonstream module on npm if you're interested!

gordo commented 7 years ago

Ah, I see. I might not be the right person for a pull request, but thanks for looking into this! Bummer, but this seems like a neat tool all the same!

theopolisme commented 7 years ago

As a temporary workaround you could always truncate the file to less than 256 MB (i.e. just remove some of the older data), then try uploading that. I'll keep you posted on this issue when I do get around to implementing a fix!