Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.48k stars 682 forks source link

Reuse media option causes assets to not load in Firefox #1155

Closed Prosopho closed 10 months ago

Prosopho commented 10 months ago

Version

v2.42.3 (all versions should be affected.)

Flavor

GUI (Graphical User Interface), CLI (Command-Line Interface)

Platform

Windows 10

Export format

HTML

Steps to reproduce

Server Invite: discord.gg/vSepQdHcNh

Channel id: 1067204769237700638

CLI Options: DiscordChatExporter.Cli.exe export -c "1067204769237700638" -t "YourToken" -o "C:\Tests\No-mic" --media --reuse-media --media-dir "C:\Tests\No-mic\Assets\"

The assets load on both GUI & CLI when --reuse-media is removed. This is especially problematic when exporting larger servers where there are tons of assets reused across different channels.

GUI Options: image

Details

Checklist

Tyrrrz commented 10 months ago

Can you inspect the URLs to see why they're broken? For example, what does Image attachment in the second export point to?

Prosopho commented 10 months ago

Can you inspect the URLs to see why they're broken? For example, what does Image attachment in the second export point to? image

I found that adding file:/// in front of the asset paths made them load in FF. Chrome/chromium didn't seem to have any difference. image

Easy to mass replace in Notepad++ so it's not really a big deal for me to replace them. If i didn't select an media export path, they'd load. image

Tyrrrz commented 10 months ago

Hmm the src appears to point to a file in the C:/Games/... path, but your export and assets are both in C:/Tests/...?

Prosopho commented 10 months ago

Hmm the src appears to point to a file in the C:/Games/... path, but your export and assets are both in C:/Tests/...?

That's not too relevant since the commands in the issue were copypasted from the terminal and the testing in general was pretty messy.

The "non-working" version was with the reuse assets exported to games/test with it getting them from the assets folder in games/discord/pixelgunx/assets.

The "working" version was without re-use media and Asset path in games/test2 The last screenshot was the "working" version without re-use media and media path like mentioned.

1st & 2nd ss were from the games/test export with reused media pointing to the pixelgunx/assets folder.

I hope this cleared up things enough.

Tyrrrz commented 10 months ago

I was not able to reproduce this issue in Chrome (works fine) and I don't have Firefox to test.

Prosopho commented 10 months ago

I was not able to reproduce this issue in Chrome (works fine) and I don't have Firefox to test.

The issue only affects FF, not chrome. Chrome was always fine to begin with.

Tyrrrz commented 10 months ago

Oh, so the issue is that Firefox needs file:/// to work?

Prosopho commented 10 months ago

Oh, so the issue is that Firefox needs file:/// to work?

Exactly.

Tyrrrz commented 10 months ago

Try the latest CI build and tell me if it works

Prosopho commented 9 months ago

Try the latest CI build and tell me if it works

Both CLI and GUI work.