Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Hi , my proplem in the import

Open aliffhasf opened this issue 3 years ago • 11 comments

I can't import ready-made cards when they are downloaded and I see a logo that says send error reports..

AnkiDroid Version = 2.16alpha58

Android Version = 12

Manufacturer = Xiaomi

Model = M2101K6I

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 12; M2101K6I Build/SKQ1.210908.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Mobile Safari/537.36

ACRA UUID = 5eb45ddc-4406-4e1c-a2f7-4e2a995255af

Scheduler = std2

Crash Reports Enabled = true

DatabaseV2 Enabled = true

aliffhasf avatar Jul 14 '22 07:07 aliffhasf

Hi there! Is it possible to try a newer alpha? 58 is pretty old at this point - https://github.com/ankidroid/Anki-Android/releases

If it is still happening we can look again of course - unfortunately I do not see your report in our crash database, so I'm not sure what is going on there :thinking:

mikehardy avatar Jul 19 '22 04:07 mikehardy

Is it possible for you to share the deck you're trying to import?

david-allison avatar Jul 19 '22 06:07 david-allison

Import does not work with legacy schema in the latest alpha. Import works with V16 schema. Some apkgs cause an error as in the picture below, other apkgs cause a crash. I sent a crash report. Tested apkgs were exported from AnkiDroid 2.15.6. Screenshot_20220810-162444_AnkiDroidA AnkiDroid Version = 2.16alpha76

Android Version = 12

Manufacturer = samsung

Model = SM-A225F

Hardware = mt6769t

Webview User Agent = Mozilla/5.0 (Linux; Android 12; SM-A225F Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36

ACRA UUID = 8811dfdf-46ff-4a51-bbea-195fe8c86a5f

Scheduler = std2

Crash Reports Enabled = true

DatabaseV2 Enabled = true

pavreh avatar Aug 10 '22 14:08 pavreh

I can't seem to reproduce this when building from the latest main - I tried importing a few decks with the legacy schema, and didn't get any errors/crashes. Maybe it is related to the content of your local collection? If you use one of the alternate builds to import into a fresh collection, does it make a difference?

dae avatar Aug 13 '22 01:08 dae

You mentioned it could be related to the content of the collection so I focused on it. I get the error message (as in the picture above) when I export a deck with a card with a sound tag (e.g. [sound:sound.mp3]) but media are not included during export. Steps to reproduce

  1. Use the legacy schema
  2. Have an empty collection
  3. Create a note with sound
  4. Export the deck with the note
  5. Do not tick "Include media" and do not tick "Include scheduling"
  6. Delete the note so AnkiDroid is empty
  7. Import

I will try to find exact steps to the crash too.

pavreh avatar Aug 13 '22 07:08 pavreh

@pavreh you have my continued gratitude for detailed reports and all of the testing effort, it is a huge help to the project, thank you! @aliffhasf (and pavreh) hopefully we get this fixed quickly of course :-)

mikehardy avatar Aug 13 '22 18:08 mikehardy

I created a card with '[sound:nosuchfile.mp3]' on the desktop, exported it to an apkg, then imported it into AnkiDroid with the legacy schema, and it imported ok for me. Any other ideas about how to reproduce it? Can you share a file (privately) that triggers this?

dae avatar Sep 22 '22 08:09 dae

I repeated the steps above (export from AnkiDroid - import to AnkiDroid) in alpha85 and I got the error as below. I am going to try the "export from Anki - import to AnkiDroid" later. Screenshot_20220922-111813_AnkiDroidA.png

pavreh avatar Sep 22 '22 09:09 pavreh

I found exporting from AnkiDroid was saving 0 byte files, but wasn't sure whether that was some issue with the sim I was using or some greater issue, so I tested by exporting from the desktop version and copying the file over. Sounds like it's exporting 0 byte files for you too?

dae avatar Sep 22 '22 09:09 dae

Yes, exports from AnkiDroid (legacy schema) are 0 byte files. I tried export from Anki and import to AnkiDroid Legacy and I got an error.

pavreh avatar Sep 22 '22 13:09 pavreh

There is the file which causes the error when imported to AnkiDroid 2.16alpha85 with the legacy schema. Anki-export-media-tag-added-no-media-file.zip

pavreh avatar Sep 22 '22 18:09 pavreh

Thanks pavreh. Turns out that I was testing with the wrong schema before - there are two ways to toggle it, and I'd changed one but not the other.

dae avatar Sep 22 '22 23:09 dae