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

Hi , my proplem in the import #11845

Closed
aliffhasf opened this issue Jul 14, 2022 · 12 comments · Fixed by #12493
Closed

Hi , my proplem in the import #11845

aliffhasf opened this issue Jul 14, 2022 · 12 comments · Fixed by #12493
Milestone

Comments

@aliffhasf
Copy link

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

@mikehardy
Copy link
Member

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 🤔

@david-allison
Copy link
Member

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

@pavreh
Copy link

pavreh commented Aug 10, 2022

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

@dae
Copy link
Contributor

dae commented Aug 13, 2022

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?

@pavreh
Copy link

pavreh commented Aug 13, 2022

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.

@mikehardy
Copy link
Member

@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 :-)

@dae
Copy link
Contributor

dae commented Sep 22, 2022

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?

@pavreh
Copy link

pavreh commented Sep 22, 2022

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

@dae
Copy link
Contributor

dae commented Sep 22, 2022

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?

@pavreh
Copy link

pavreh commented Sep 22, 2022

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
Copy link

pavreh commented Sep 22, 2022

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

dae added a commit to ankitects/Anki-Android that referenced this issue Sep 22, 2022
The continue statement appears to have been lost in the Kotlin
conversion.

Closes ankidroid#11845
dae added a commit to ankitects/Anki-Android that referenced this issue Sep 22, 2022
The continue statement appears to have been lost in the Kotlin
conversion.

Closes ankidroid#11845
@dae
Copy link
Contributor

dae commented Sep 22, 2022

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.

lukstbit pushed a commit that referenced this issue Sep 24, 2022
The continue statement appears to have been lost in the Kotlin
conversion.

Closes #11845
@github-actions github-actions bot added this to the 2.16 release milestone Sep 24, 2022
KendallPark pushed a commit to KendallPark/Anki-Android that referenced this issue May 30, 2023
The continue statement appears to have been lost in the Kotlin
conversion.

Closes ankidroid#11845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants