KnugiHK / WhatsApp-Chat-Exporter

A customizable Android and iOS/iPadOS WhatsApp database parser that will give you the history of your WhatsApp conversations in HTML and JSON. Android Backup Crypt12, Crypt14, Crypt15, and new schema supported.
https://wts.knugi.dev/
MIT License
584 stars 85 forks source link

[BUG] Not supported WhatsApp internal message #90

Closed mruepp closed 3 weeks ago

mruepp commented 6 months ago

Describe the bug I did an Iphone Backup (unencrypted) and was able to extract the Chats. The Photos/Videos show up inline, but some messages does not show with error message: Not supported WhatsApp internal message See screenshot 1 and see corresponding html code screenshot 2

Screenshot 2024-03-08 at 17 29 17

Screenshot 2024-03-08 at 18 00 46

To Reproduce

Steps to reproduce the behavior: Export the chats as in the README

Thanks for providing such a valuable tool.

KnugiHK commented 6 months ago

Hi. Can you show me the corresponding message in WhatsApp?

mruepp commented 6 months ago

Should be this. But the time is off (10:20 in html vs 11:43 in chat) it is a Video I can not start... Screenshot 2024-03-11 at 18 39 47

mruepp commented 6 months ago

Also, btw, is there a way to implement lazy loading? I have chats back to 2014, they are 100-200MB large HTMLs which are nearly unable to load...

KnugiHK commented 6 months ago

Also, btw, is there a way to implement lazy loading? I have chats back to 2014, they are 100-200MB large HTMLs which are nearly unable to load...

There is no lazy loading but you can use --size 0 to split the chat into multiple files.

mruepp commented 6 months ago

Thank you, is there documentation of --size? --size 0 is kind of counterintuitive. What does it mean?

KnugiHK commented 6 months ago

Thank you, is there documentation of --size? --size 0 is kind of counterintuitive. What does it mean?

> wtsexporter --help
...
  --size [SIZE], --output-size [SIZE], --split [SIZE]
                        Maximum (rough) size of a single output file in bytes, 0 for auto

Any suggestions are welcome!

KnugiHK commented 6 months ago

Btw, docs are either located in the Wiki or in the help menu.

jonx commented 5 months ago

I'm not a web developer but I did some quick research and maybe all we need to get the lazy loading is add a tag to the images as documented here: https://www.w3schools.com/tags/att_img_loading.asp Only Safari doesn't handle this tag.

<img src="Media/Profile\33610007857-1665000879.thumb" loading="lazy" class="avatar">

jonx commented 5 months ago

Also while commenting on things that I don't really know, maybe you could consider using the base tag in your HTML? Maybe you have a reason not to use it or maybe it's just me but my links are pretty long like this: <a href="AppDomainGroup-group.net.whatsapp.WhatsApp.shared/Media/Profile\6590002603-1700006881.thumb"><img src="AppDomainGroup-group.net.whatsapp.WhatsApp.shared/Media/Profile\6590002603-1700006881.thumb" onerror="this.style.display='none'" class="avatar"></a> with the base tag like this: <base href="AppDomainGroup-group.net.whatsapp.WhatsApp.shared/"> you should be able to shorten the URLs to this: <img src="Media/Profile\33610007857-1665000879.thumb">

KnugiHK commented 3 months ago

Should be this. But the time is off (10:20 in html vs 11:43 in chat) it is a Video I can not start...

Since you confirmed the video cannot be played, the file in your iPhone probably got corrupted. In this case, I believe it is an isolated case and not the fault of the exporter. Could you find more instances on real media but unspported?

KnugiHK commented 3 weeks ago

If further evidence indicates that the issue is caused by the exporter, please feel free to reopen this issue.