Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "Error when syncing media data java.io.IOException" when syncing media files with "🔊" emojis in the file name? #8148

Closed
1 task
sudomain opened this issue Mar 7, 2021 · 4 comments

Comments

@sudomain
Copy link
Contributor

sudomain commented Mar 7, 2021

EDIT: I emailed the deck author, "The AnKing", and they've agreed to remove the Unicode character from the names of the affected media files for this deck. It's no longer an issue for this specific deck, though the problem may arise for other decks.

Reproduction Steps
  1. On desktop Anki, download and import AnKing Step 1 V9 Step 2 V4 with Media.apkg from Google drive. Which I found from this reddit comment

  2. After import completes, initiate sync from desktop to ankiweb

  3. After sync completes, initiate sync from ankiweb to AnkiDroid

  4. During the sync process, there will be an error similar to this:
    Screenshot_2021-03-06-17-43-19

  5. Decide you can live without that .jpg file, so open your file manager on desktop, delete the problem file, check media, and sync again.

  6. This time when pulling from ankiweb, you'll get the same error about a different file:
    Screenshot_2021-03-06-23-14-48

  7. Since these are different .jpg files, the byte sequence error must be triggered by something in common with both files. Take a guess that it's the "🔊" in the file name

  8. On desktop, open your file manager and find all files in collection.media containing "🔊". Delete them, check media, sync from desktop to ankiweb.

  9. On the sync from ankiweb to AnkiDroid, there will no longer be an issue.

Expected Result

I'm not sure if there's anything AD can really do. I thought I'd document this error because I couldn't find anything about strange unicode code point such as 🔊(U+1F50A) in file names. I didn't make the deck, but afaict there's no real need for it to contain such emojis in the name of .jpg files. I'm hoping to point the deck maintainers to this issue and request they change the file names.

Actual Result

See screenshots above.

Debug info

Refer to the support page if you are unsure where to get the "debug info".

AnkiDroid Version = 2.14.3

Android Version = 7.0

ACRA UUID = 0417c1bf-8871-4e84-9233-cfea8e42b734

Scheduler = std

Crash Reports Enabled = false

Research

Enter an [x] character to confirm the points below:

  • [ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • [ x ] I have checked the manual and the FAQ and could not find a solution to my issue
  • [ x ] I have searched for similar existing issues here and on the user forum
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
@sudomain sudomain closed this as completed Mar 7, 2021
@NicoWeio
Copy link
Contributor

NicoWeio commented Mar 7, 2021

I'd suggest leaving the issue open, then. Even if it's not supposed to work, we should at least add an understandable error message.

@github-actions
Copy link
Contributor

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@sudomain
Copy link
Contributor Author

I found #5192 on a related search, and just thought I'd connect the two issues because they seem related. fwiw, one of the fixes introduced in desktop 2.1.45 includes:

"Strip invalid unicode from filenames in media check"

Hopefully this means the unicode causing this issue, and hopefully desktop will expand to:

  1. when the user adds media in the note editor
  2. when the user syncs (thus preventing the issue on ankidroid)

@dae
Copy link
Contributor

dae commented Aug 31, 2023

If it happens after an 2.17 alpha is put out, please let us know.

@dae dae closed this as completed Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants