https://kotlinlang.org logo
#compose
Title
# compose
t

Tolriq

02/24/2022, 5:57 PM
So asking again for some advice on how to debug / repro a Compose issue with keyboard. Randomly without any text composable anywhere when returning to the app from home the keyboard will open. When it happens closing the keyboard, going home, returning to the app will bring back the keyboard again. I have no idea what I can observe / could generate that to try to build a repro 😞
To complement if I go in a place that has a text field and show then hide the keyboard from there then the issue is fixed and won't be back until a random time / return.
i

Illustrator

02/25/2022, 1:17 AM
Yups, I also face this issue
t

Tolriq

02/25/2022, 5:57 AM
@Zach Klippenstein (he/him) [MOD] Sorry to ping you but you are the expert on that matter and if I open an issue without a repro it won't go anywhere.
c

Colton Idle

02/27/2022, 10:16 AM
What Android OS are you using? I feel like I've seen this open in bugtracker as a general android 12 issue and actually nothing to do with compose. edit: not saying that your issue is the same thing, but curious if youve only seen it on 12.
i

Illustrator

02/27/2022, 10:23 AM
I have experienced it on android 9 and 12
👍 1
t

Tolriq

02/27/2022, 10:25 AM
Same 10 and 12 and never with 12 on my other apps. Do you have a link to that thread in case there's hints ?
z

Zach Klippenstein (he/him) [MOD]

03/01/2022, 4:16 PM
So you haven't been able to reproduce reliably? Are you working in a public codebase we could try using? Please file a bug either way so we can track this
i

Illustrator

03/01/2022, 4:21 PM
That's an open source project but It's in development as of now.
t

Tolriq

03/01/2022, 4:30 PM
On my side source is closed, but yes can't reproduce reliably else I'd have reported already. I'll open the issue later without a repro first then and link it here so that @Illustrator can share it's code if it's reproducible. As far as I can tell, this may happen randomly if at some point I use the IME action that will navigate away so remove the parent composable and close the keyboard. Maybe some race that leave some state internal to compose.
Copy code
keyboardActions = KeyboardActions(onSend = {
 keyboardController?.hide()
 viewModel.navigate()})
For the moment that would be my only explanation but this could be something completely different.
z

Zach Klippenstein (he/him) [MOD]

03/01/2022, 4:33 PM
Thanks. Feel free to file now and link the project later
Your race explanation sounds plausible, maybe we missed a dispose action somewhere or something. Please include that information in the bug!
t

Tolriq

03/01/2022, 5:09 PM
On parenting duty but will in a few hours.
👶 1
@Zach Klippenstein (he/him) [MOD] As expected no reaction on the issue except asking me to build a repro ignoring my ask about hints about how to make that repro ... Since the issue is worse with the last compose version I'd really like if you could help to build that repro. This is the last really annoying bug that I'd like to fix before going to prod.
z

Zach Klippenstein (he/him) [MOD]

04/11/2022, 6:11 PM
As someone pointed out in that ticket, I’m guessing it’s the same issue as https://issuetracker.google.com/227218393
t

Tolriq

04/11/2022, 6:34 PM
@Zach Klippenstein (he/him) [MOD] I'm not sure 😞 When trying to build a small repro switching to the next screen did keep the keyboard but hiding it then returning to the app did not show the keyboard again. But since then some other users have posted some repro maybe there's hints in them ?
And that keyboard not hidden things appeared in alpha 6 the keyboard showing again issue appeared before (but it's 100% repro now with alpha 6/7)
z

Zach Klippenstein (he/him) [MOD]

04/11/2022, 6:37 PM
I just got back from vacation, still trying to figure out what is going on this week, but i’ll add this to my personal backlog
💯 1
❤️ 1
t

Tolriq

04/11/2022, 6:40 PM
Thanks but take time to get back, first day after 2 weeks is hard 😛
@Zach Klippenstein (he/him) [MOD] pinging here seeing the other users comment on the issue. So the issue is not fixed it's back to random and back to fixable by showing the keyboard then hiding it.
@Zach Klippenstein (he/him) [MOD] ping again since you are here, can you please reopen https://issuetracker.google.com/issues/221895355 it's not fixed it's back to the initial random state.
z

Zach Klippenstein (he/him) [MOD]

05/16/2022, 4:49 PM
re-opened
❤️ 1
t

Tolriq

05/16/2022, 5:01 PM
The app is now released so if you can give me
some pointer I might find time to work on finding a repro.
z

Zach Klippenstein (he/him) [MOD]

05/16/2022, 5:03 PM
No worries, hoping to be able to repro and fix with the existing info
t

Tolriq

05/16/2022, 5:05 PM
Thanks, that and a mem leak in derivedStateOf are the last 2 impacting compose bugs, but so far, nearly all works nicely and performant. Very nice work to all the team even if you joined after 🙂
z

Zach Klippenstein (he/him) [MOD]

05/16/2022, 5:07 PM
is there a bug for that derivedStateOf leak? I just searched and don’t see anythikng
t

Tolriq

05/16/2022, 5:09 PM
Yes https://issuetracker.google.com/issues/230168389 it's handled by Chuck, the title is LazyColumn as I thought it was that first. And already half of it fixed.
👍🏻 1
@Zach Klippenstein (he/him) [MOD] Sorry to ask here and to you but do you think you can help having https://issuetracker.google.com/issues/227218386 properly attributed and triaged? Since it's text you probably know the proper core team. Thanks.
z

Zach Klippenstein (he/him) [MOD]

05/24/2022, 4:16 PM
Looks like it’s already been assigned to the right team
t

Tolriq

05/24/2022, 4:24 PM
:( 10 years of fighting to be 100% crash free session on Core Vitals down to ugly 99.9% because of it :( It's usually a bad sign when no reaction or triaging. Anyway thanks for looking at it.
But checking again, it's in the right category, but still assigned to the external triager, so not sure they even see it as to be handled.
z

Zach Klippenstein (he/him) [MOD]

05/24/2022, 5:54 PM
It’s assigned to an internal team alias, seems like the right one
t

Tolriq

05/24/2022, 5:57 PM
Ok thanks, only seeing an... and so many bad memory with an... asking over and over things without reading that I now fear those 2 letter.
c

Colton Idle

05/24/2022, 6:50 PM
100% crash free? Congrats! Keep filling bugs. We'll get back to 100 💪
t

Tolriq

05/24/2022, 6:51 PM
100% crash free / 100% ANR free on that app since 5 years approx 🙂 App on store since 10 years, was a hard challenge to reach 🙂 (And of course this is due to Play Console rounding 😛 it's impossible to be really at 100%)
🎉 1
2 Views