mowolf / ChatAnalyzer

Java script webapp that analyzes your WhatsApp Chat history locally on your machine.
https://chatanalyzer.moritzwolf.com
Other
208 stars 41 forks source link

Error Loading English conversation #1

Closed suramrit closed 6 years ago

suramrit commented 6 years ago

redirected here from reddit

When trying to open a .txt English conversation, Im getting the following error. Cannot read property 'message' of undefined at analyze.js:77

SebRut commented 6 years ago

I get the same issue with a german conversation, my messages have the folling format: "01.02.2016, 15:59 - NAME: MESSAGE"

tintinmaster commented 6 years ago

It doesn't work either for me. I am German but I have my phone on English. Maybe thats why it doesn't work too. So I think you can test with english files just by changing your phone language.

Edit: I got following Error Messages on the Developer Tools:

analyze.js:77 Uncaught TypeError: Cannot read property 'message' of undefined at displayContents (analyze.js:77) at FileReader.reader.onload (analyze.js:41)

Uncaught TypeError: Cannot read property 'top' of undefined at t (freelancer.min.js:1) at freelancer.min.js:1 at freelancer.min.js:1

My messages are formated like this: 31/12/2014, 21:15 - tintinmaster: Lorem ipsum

mtuit commented 6 years ago

If your format is like this: DD/MM/YYYY, HH:MM - Name: Message, then you can use the quick work-around I wrote to fix this in my fork (https://github.com/mtuit/ChatAnalyzer). My code is only compatible with this format. @mowolf Feel free to use it when you want to add support for multiple formats (also fixed some bugs).

daanhaitsma commented 6 years ago

@mtuit My export has that format, but I get the same error using your repo

andtos90 commented 6 years ago

I also developed a similar solution to the @mtuit, you can find it here: https://github.com/andtos90/ChatAnalyzer. With more examples in different languages this could be solved easily

mtuit commented 6 years ago

@daanhaitsma That's odd. The following (small) test file should work and is in the same format. Could you try if this file works for you? testWhatsappGesprek.txt

mowolf commented 6 years ago

I am currently updating the code. Will work soon!

mowolf commented 6 years ago

Fixed it and added support to all the formats mentioned in the reddid thread. In case your format does not work please open another issue!