Anki-Android
Anki-Android copied to clipboard
[BUG]: "Not at top of the queue" error message when there is a deck is already open in App and the user open one through the Deck Picker Widget.
Checked for duplicates?
- [X] This issue is not a duplicate
Does it also happen in the desktop version?
- [X] This bug does not occur in the latest version of Anki
What are the steps to reproduce this bug?
- open ankidroid
- open a deck A
- go back to android home
- from the widget open a deck b
- press back
Expected behaviour
Closing the reviewer. Either going back to the deck picker or to android home.
Actual behaviour
You go back to deck A. But if you try to review, you get "Not at top of the queue" error message.
Debug info
AnkiDroid Version = 2.19alpha12-debug (862d98f07c76db50d4b56d8e166cb82b2fd6d2bb)
Backend Version = 0.1.40-anki24.06.3 (24.06.3 d678e39350a2d243242a69f4e22f5192b04398f2)
Android Version = 14 (SDK 34)
ProductFlavor = amazon
Manufacturer = Google
Model = sdk_gphone64_x86_64
Hardware = ranchu
Webview User Agent = Mozilla/5.0 (Linux; Android 14; sdk_gphone64_x86_64 Build/UE1A.230829.036.A2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.136 Mobile Safari/537.36
ACRA UUID = 6e047a69-354f-4375-9401-03fd88994cab
FSRS Enabled = false
Crash Reports Enabled = false
(Optional) Anything else you want to share?
No response
Research
- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the manual and the FAQ and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing
Note that it already occurs when you have two shortcuts to two distinct decks
Hello, could I be assigned to this please.
@leobugeja You don't need to ask usually. If you have an idea how to fix it, or at least investigate, you can just state you'll work on it. There are not so many devs that we need to manage who does what
The problem appears to be that when using the shortcut to open deck review, that activity gets put ontop of the previous deck's review activity and when using the back button to close the top activity, updateCardAndRedraw does not get called (which inturn skips setting the current card) on the previous/old review activity and so we get the error not at top of queue.
@Arthur-Milchior, I can see two solutions:
- On a back press call
updateCardAndRedrawfor the previous/old activity. - When using a shortcut or widget to open a deck (or alternatively on back press during a review activity), close other review activities so on the back press, the user is navigated to home rather than to another review session.
Please close other reviewer activity. We are not expected to support multiple reviewer opened simultaneously
I'm reopening this isse because it regressed. I don't know why. @leobugeja if you have any idea why, it'd be great.
AnkiDroid Version = 2.21alpha4-debug (2a909fe00fbcf42ffc681d880835eeb869f86a9a)
Backend Version = 0.1.48-anki24.11 (24.11 c47638ca36f99dd4f3b81ae82d964aec66e392e0)
Android Version = 15 (SDK 35)
ProductFlavor = full
Manufacturer = Google
Model = Pixel 8 Pro
Hardware = husky
Webview User Agent = Mozilla/5.0 (Linux; Android 15; Pixel 8 Pro Build/AP4A.241205.013; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.200 Mobile Safari/537.36
ACRA UUID = fdcf88b0-dd09-4269-a69d-5ea7cdfdde39
FSRS = 1.4.3 (Enabled: false)
Crash Reports Enabled = false
Also I guess next time we colse it we should really have some test to avoid a new regression
I think I figured out what went wrong.
We don't open the reviewer directly anymore. We open the IntentHandler. It's a distinct activity, so addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK) won't clear it
Hello 👋, this issue has been opened for more than 3 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
Came across this myself as well.
Debug info:
AnkiDroid Version = 2.20.1 (e32a82c33646807ea19623c9c88be38965bc07e6)
Backend Version = 0.1.48-anki24.11 (24.11 c47638ca36f99dd4f3b81ae82d964aec66e392e0)
Android Version = 13 (SDK 33)
ProductFlavor = play
Manufacturer = OnePlus
Model = IV2201
Hardware = mt6877
Webview User Agent = Mozilla/5.0 (Linux; Android 13; IV2201 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.115 Mobile Safari/537.36
ACRA UUID = a9fbcbbe-fb1f-43fe-9575-39915fdfc027
FSRS = 1.4.3 (Enabled: true)
Crash Reports Enabled = true
The steps to reproduce seem to be the same as the original post, but here is my description for completeness:
- Make sure you have the AnkiDroid widget with two different decks A and B
- Start doing reviews for A
- Go back to home screen via home button
- Press B on widget
At this point, Anki should have opened again with B
- Press back
At this point, you should see deck A again
- Review card, including grading ==> Error: not at top of queue
Hope this is useful.
TL;DR: Cannot reproduce on newest beta
As suggested by @mikehardy , I tried to reproduce after updating to the beta.
I updated by signing up to the beta on Google Play, installing the update, cleaning the cache, and then restarting my phone.
Debug info:
AnkiDroid Version = 2.21.0beta4 (3b5489b76c7aa9944f5d62212fa3e09aca35941d)
Backend Version = 0.1.54-anki25.02.7 (25.02.7 98253c81cb3c4d203acec48d6eae6b488bf484d0)
Android Version = 13 (SDK 33)
ProductFlavor = play
Device Info = OnePlus | OnePlus | OP555BL1 | IV2201EEA | IV2201 | mt6877
Webview User Agent = Mozilla/5.0 (Linux; Android 13; IV2201 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.115 Mobile Safari/537.36
ACRA UUID = a9fbcbbe-fb1f-43fe-9575-39915fdfc027
FSRS = 2.0.3 (Enabled: true)
Crash Reports Enabled = true
I cannot reproduce the error anymore, in the sense that
- Press back
At this point, you should see deck A again
does not seem to apply anymore. Instead, pressing back at that point returns one to the deck overview.
I tried to mess around a bit by manually going from that point to the different decks, but I didn't seem to be able to reach that error anymore.