https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
compose
  • l

    Lukasz Kalnik

    08/12/2022, 9:40 AM
    Using Compose Destinations library, I pass a navigation argument and read it in ViewModel from
    savedStateHandle
    . Then I need to load data in the ViewModel based on the passed argument. Do I get some callback when the ViewModel has been navigated to? How do I perform the initial data loading based on the navigation argument?
    c
    • 2
    • 12
  • m

    MR3Y

    08/12/2022, 12:18 PM
    • https://github.com/android/animation-samples/tree/main/MotionCompose • Also, You might use
    AnimatedContent
    like : https://gist.github.com/c5inco/38e5075a883e5cc1136308bd3c44686d
    d
    c
    d
    • 4
    • 9
  • l

    Lukasz Kalnik

    08/12/2022, 1:35 PM
    Can I navigate from Compose Destinations to actions defined in an XML navigation graph? Currently I get "Navigation action/destination cannot be found from current destination". I suspect I must somehow include my old XML navigation graph into the generated Destinations nav graph. Is there an API for this?
    l
    • 2
    • 5
  • f

    Fudge

    08/12/2022, 2:34 PM
    In Compose unit testing:
    onNodeWithText("foo").assertHasClickAction() // OK
            onAllNodesWithText("foo").assertAll(hasClickAction()) // OK
            
            onNodeWithText("foo").assertExists() // OK
            onAllNodesWithText("foo").assertAll(exists()) // No exists() or similar method for assertExists()?
    Am I missing something? How do I test everything in a node collection exists?
  • a

    Andy Himberger

    08/12/2022, 4:18 PM
    I'm surprised by default keyboard navigation order, wondering if this makes sense to someone. If you have multiple focusable things in a row, I would expect default navigation order to go between the items in a row (navigate the common children of a parent) before going to the next one. Talkback navigation order does this, but keyboard tab does not.
    z
    i
    • 3
    • 5
  • m

    mattinger

    08/12/2022, 5:37 PM
    Does anyone know if there’s a way to disable the swipe away gesture on a ModalBottomSheetLayout? I can veto the change so that the sheet stays up, but id rather the user not be able to drag the content away in that case. why let them drag to dismiss if we’re just going to veto it anyway? A related question is that if i decide to allow a click outside or for them to swipe it away, is there a way to react that that?
    c
    j
    • 3
    • 10
  • s

    Stylianos Gakis

    08/12/2022, 11:16 PM
    I was pretty sure the way the snackbar works for
    Scaffold
    is that when it shows its size is added to the
    paddingValues
    provided by the
    Scaffold
    and therefore pushes the items inside a bit up when it shows so that it does not show over other items. Am I wrong in this, do I maybe not remember correctly that I’ve seen this before, or does it sound like I am doing something wrong in my implementation somehow?
    i
    z
    • 3
    • 9
  • c

    Colton Idle

    08/13/2022, 10:11 AM
    Trying to wrap my head around Intrinsics again. By default does every layout (box, col, row, etc) essentially have a height set to
    .height(IntrinsicSize.Min)
    ? If not... why not since it seems like it'd behave the same? 🤔
  • d

    deviant

    08/13/2022, 3:31 PM
    guys, what's a compose analog for this? can't find such font family in predefined
    android:fontFamily="sans-serif-condensed"
    a
    • 2
    • 2
  • j

    Ji Sungbin

    08/13/2022, 4:44 PM
    Hi, In the case of DefaultButtonElevation class, since equals is not overridden, false is returned even if two same instances are compared. But the DefaultButtonElevation class has @Stable annotation. why? According to the official documentation, stable should always return true when comparing the same two instances, so I think that equals needs to be overridden in order for DefaultButtonElevation to be stable.
    a
    • 2
    • 5
  • j

    james

    08/14/2022, 12:03 AM
    question for those who use some Material composables in their apps, yet have a fully customised colour system which does not override
    MaterialTheme
    in any way, nor share its naming system: how do you handle certain Material composables which hardcode colours and do not provide a way to override them? the only way I can think of to do this is to create a
    MaterialTheme
    and try my best to match my design system colours to the Material ones (Primary, OnPrimary, Surface, OnSurface etc).. then when I need to use a certain Material composable that doesn’t allow me to override the colour I can use
    CompositionLocalProvider
    to wrap that particular composable ☝️ this seems like it would work, but I wonder if there’s a cleaner way to achieve this?
    c
    z
    k
    • 4
    • 5
  • m

    Marko Novakovic

    08/14/2022, 9:44 AM
    what is Compose equivalent of
    LayoutManager.findFirstCompletelyVisibleItemPosition()
    ?
    v
    c
    • 3
    • 8
  • h

    hfhbd

    08/14/2022, 10:15 AM
    I have a multi module project and I want to use the classes from another module with Compose functions. For performance you could annotate the classes with @Stable or apply the compose plugin. But why does the compose plugin needs a dependency of the runtime in the classpath?
  • m

    Marko Novakovic

    08/14/2022, 10:20 AM
    RecyclerView
    inside
    AndroidView
    inside
    Column
    is not scrolling. how to make it behave like
    LazyColumn
    and scroll correctly? am trying with
    NestedScrollConnection
    but without success
    m
    • 2
    • 4
  • m

    Mehmet Peker

    08/14/2022, 12:43 PM
    Does anyone use Base Fragment approach in Jetpack Compose? I want to use it for handle loading or error state of network response by BaseViewModel.
  • s

    Sergio C.

    08/14/2022, 2:17 PM
    Hi! Can we share Kotlin Compose Multiplatform code with iOS apps?
    s
    • 2
    • 4
  • c

    Colton Idle

    08/14/2022, 5:08 PM
    I'm creating a flow out of snapshot state.
    val listFlow = snapshotFlow { appState.myList }
    viewModelScope.launch {
      listFlow.collectLatest {
    Log...
    but even when I clear the list and addAll to it, my flow doesn't get fired again (I don't see my log). Am I misunderstanding snapshotFlow, or should this work?
    s
    a
    +2
    • 5
    • 15
  • p

    PHondogo

    08/14/2022, 9:13 PM
    Hello! I've created compose application for Android and desktop. While on desktop it is running with no problem, for Android I've got
    Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.material.icons.outlined.ArrowCircleLeftKt"
    Both targets have dependency for extended material icons. What may be the problem?
    j
    y
    • 3
    • 3
  • j

    Jerry Yion

    08/15/2022, 2:48 AM
    Hi all, is there any widget like popup menu in Jetpack Compose?
    y
    • 2
    • 3
  • z

    Zoltan Demant

    08/15/2022, 3:49 AM
    Running on a release build improves performance a lot as expected. But what are the actual flags that make the difference? Im trying to create a build type thats as close to debug as possible, while having the performance of a release build (to prevent a nasty IDE/OS bug that steals a few hours a day).
    e
    s
    +3
    • 6
    • 13
  • l

    Lukasz Kalnik

    08/15/2022, 10:00 AM
    I'm using Accompanist Navigation Material for bottom sheet navigation inside a Fragment. I want to close the bottom sheet when the user navigates away from the Fragment to another Fragment (using bottom navigation bar, which is not yet in Compose). Is it at all possible with this combination of Compose and Fragment Navigation?
  • a

    Artur Schwarz

    08/15/2022, 11:13 AM
    Hi everyone! We have the following code in one of our composables:
    val appBarContentPadding = WindowInsets
        .statusBars
        .only(WindowInsetsSides.Horizontal + <http://WindowInsetsSides.Top|WindowInsetsSides.Top>)
        .asPaddingValues()
    
    val fullAppBarHeight = remember(appBarContentPadding) {
        appBarHeight + appBarContentPadding.calculateTopPadding()
    }
    At first, the statusBar Insets have proper values:
    InsetsPaddingValues(insets=(statusBars(0, *99*, 0, 0) only WindowInsetsSides(Start+Left+Top+End+Right)), density=DensityImpl(density=3.0, fontScale=1.0))
    After a configuration change (such as changing language on the phone and resuming the app) the values are wrong:
    InsetsPaddingValues(insets=(statusBars(0, *0*, 0, 0) only WindowInsetsSides(Start+Left+Top+End+Right)), density=DensityImpl(density=3.0, fontScale=1.0))
    Could this be a bug or are we doing something wrong?
    a
    • 2
    • 4
  • n

    Nikolas Alvelo

    08/15/2022, 2:48 PM
    Hey folks, We're seeing a sporadic amount of IllegalArgumentExceptions related to
    Constraints::bitsNeedForSize
    in production. It seems to be inconsistently occurring across Android 12 devices, a lot of Samsung and others. The page in question uses an Accompanist
    FlowRow
    and the child elements are either
    Row { ... }
    or
    Card { ... }
    . We never saw this issue in testing over several months, so it seems to be device-specific. Has anyone else run into this scenario and were you able to resolve it? We are using Compose compiler 1.3.0, Compose 1.2.1, Accompanist 0.25.1, Kotlin 1.7.10, compile/target 32 Stacktrace:
    Fatal Exception: java.lang.IllegalArgumentException: Can't represent a size of 508326 in Constraints
           at androidx.compose.ui.unit.Constraints$Companion.bitsNeedForSize(Constraints.kt:403)
           at androidx.compose.ui.unit.Constraints$Companion.createConstraints-Zbe2FdA$ui_unit_release(Constraints.kt:363)
           at androidx.compose.ui.unit.ConstraintsKt.Constraints(Constraints.kt:433)
           at androidx.compose.foundation.layout.SizeModifier.getTargetConstraints-OenEA2s(Size.kt:737)
           at androidx.compose.foundation.layout.SizeModifier.measure-3p2s80s(Size.kt:749)
           at androidx.compose.ui.node.ModifiedLayoutNode.measure-BRTryo0(ModifiedLayoutNode.kt:53)
    j
    u
    • 3
    • 4
  • s

    Stylianos Gakis

    08/15/2022, 3:21 PM
    Using Coil, I want to in case I got no internet or whatever to simply fill my image with a simple androidx.compose.ui.graphics.Color. Now, the .placeholder and .error function on Coil’s builder take in a
    Drawable
    , but I can’t figure out a way to get a hold of a
    Drawable
    in a simple way in Compose without going for xml drawables or something like that. Is there some API I’m missing?
    c
    a
    • 3
    • 8
  • c

    Colton Idle

    08/15/2022, 3:42 PM
    I have an image that has portions of it that are fully transparent, and then some portions that are at like 50% alpha. Is there any way to make the 50% alpha portion of the Image fully opaque but still keep the portion of the image that's fully transparent? The only thing I can think of is if there is some sort of blend mode I can do to blend my image with a fully black background or something, but I kind of don't know where to start.
    e
    • 2
    • 12
  • l

    Lokik Soni

    08/15/2022, 6:28 PM
    Why I am getting different design in two different phone of different size. According to me the green box size should be same as my circularProgress like in left image.
    d
    • 2
    • 3
  • s

    shikasd

    08/15/2022, 8:10 PM
    The spacing only applies between columns, the item content is stretched to full width You can wrap content with another transparent box and align your fixed size items inside it
    o
    v
    • 3
    • 2
  • d

    dimsuz

    08/15/2022, 10:53 PM
    I have noticed a dramatic decrease in performance after adding some very large image. I have made it large by mistake, it's actually about 6000x6000 webp image, placed in
    drawable-xxxhdpi
    , and I render it like so:
    Box(modifier = Modifier.fillMaxWidth()) {
      Image(
        modifier = Modifier.matchParentSize().padding(19.dp),
        painter = painterResource(id = R.drawable.impossibly_large_image),
      )
      Image(
        painter = painterResource(R.drawable.regular_sized_image)
      )
    }
    Both images have transparency. I have some pointer input which changes parent composable's state, but this Box is isolated in a separate composable function, not depending on any state. And I have GPU profiler on-screen spikes a quite above 16ms line (see thread for a screenshot). If i remove that "oversized image" it immediately falls below 16ms. My question is: shouldn't Compose pre-scale and somehow cache the Image? Are there some steps to encourage such caching?
    r
    r
    • 3
    • 9
  • c

    Colton Idle

    08/16/2022, 12:43 AM
    I have a Flow that's collected in my ViewModel. The Flow is actually from firestore which notifies me of updates. In my VM I update my snapshot state with the result of that Flow. My composable updates correctly. Life is good. But when I leave my app... the Flowable keeps on listening to updates. How do I do stop listening to my Flow once the app is backgrounded. It seems like it'd be easier if my flow was collected in the Composable, but there has to be a way to do this while collecting in my VM... right? Short example in thread
    e
    i
    +3
    • 6
    • 50
  • k

    K Merle

    08/16/2022, 7:49 AM
    API 23 is throwing
    java.lang.IllegalStateException: Snapshot is not open
    Anyone experienced it?
    z
    c
    +2
    • 5
    • 19
Powered by Linen
Title
k

K Merle

08/16/2022, 7:49 AM
API 23 is throwing
java.lang.IllegalStateException: Snapshot is not open
Anyone experienced it?
java.lang.IllegalStateException: Snapshot is not open
                                                                                                    	at androidx.compose.runtime.snapshots.SnapshotKt.validateOpen(Snapshot.kt:1767)
                                                                                                    	at androidx.compose.runtime.snapshots.SnapshotKt.access$validateOpen(Snapshot.kt:1)
                                                                                                    	at androidx.compose.runtime.snapshots.MutableSnapshot.apply(Snapshot.kt:709)
                                                                                                    	at androidx.compose.runtime.Recomposer.applyAndCheck(Recomposer.kt:954)
                                                                                                    	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:1283)
                                                                                                    	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:107)
                                                                                                    	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:485)
                                                                                                    	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:454)
                                                                                                    	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
                                                                                                    	at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
                                                                                                    	at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
                                                                                                    	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
                                                                                                    	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
                                                                                                    	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
                                                                                                    	at android.view.Choreographer.doFrame(Choreographer.java:603)
                                                                                                    	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:739)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                    	at android.os.Looper.loop(Looper.java:148)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
                                                                                                    	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@dcbbfad, androidx.compose.ui.platform.MotionDurationScaleImpl@f582e2, StandaloneCoroutine{Cancelling}@335c673, AndroidUiDispatcher@4eb930]
z

Zach Klippenstein (he/him) [MOD]

08/16/2022, 11:38 PM
Which version of compose, and can you share a minimal repro case?
k

K Merle

08/17/2022, 5:40 AM
Version
1.2.1
, compiler
1.3.0
, Kotlin
1.7.10
I literally don't know when it happens, I just tried API 23, and it just breaks, API 24 works. Removing
StateFlows
from
ViewModels
makes bug go away. There isn't anything in particular special about those, as I've done it hundreds of times.
c

Colton Idle

08/17/2022, 3:33 PM
If you have some reproducible code you could share I can try to repro on my end. lmk
k

K Merle

08/18/2022, 5:45 AM
Thanks a lot Colton. As it happens only on API 23, not even 24, for now I'll focus on some other stuff and come back to this some time later on. It's a companies project and we are 2 months into the development of the project.
z

Zach Klippenstein (he/him) [MOD]

08/18/2022, 3:51 PM
Cc @Chuck Jazdzewski [G] in case this rings any bells for him
c

Chuck Jazdzewski [G]

08/18/2022, 3:58 PM
I haven't seen anything similar. It appears something is applying the snapshot early. I am uncertain what could cause this.
k

K Merle

08/18/2022, 3:59 PM
There are already some issues on Google search about it, none of these helped atm.
c

Chuck Jazdzewski [G]

08/20/2022, 12:06 AM
Like @Zach Klippenstein (he/him) [MOD] said, if you have a repro case that would be very helpful.
m

mruno

08/26/2022, 9:16 PM
We are also seeing this in our app, same versions of everything. Only seems to come up in tests (Firbase Test Lab, NexusLowRes api 23), I haven't seen a production report with this error yet.
It is also not something that happens every test execution. It's flaky.
c

Chuck Jazdzewski [G]

08/26/2022, 9:17 PM
What is the test doing?
m

mruno

08/26/2022, 9:21 PM
One that I see flake often is on a line where we call painterResource inside a recycler view adapter via a composeview. The test is just asserting things are on screen and navigating around, nothing too fancy
We use painterResource to load a vector drawable
While it's composing the vector painter, when it calls setContent it throws the error
c

Chuck Jazdzewski [G]

08/26/2022, 9:26 PM
Can you 1) create a bug for this (https://goo.gle/compose-feedback), 2) Attach the stack trace of the crash, 3) at least a sketch of the test or code of the test itself if it is not privileged 4) include the information of the test lab failure (such as NexusLowRes api 23) or any other descriptions where you are seeing this failure. We have heard other reports of similar failures but we have not been able to reproduce this locally in order to track this down. Any help you can give would be greatly appriciated.
m

mruno

08/29/2022, 6:52 PM
Are there any debug traces or logs which we might be able to generate and then share with the bug report?
c

Chuck Jazdzewski [G]

08/30/2022, 4:41 PM
No. The runtime doesn't have any logging. I rely on runtime asserts for such things and I suspect that I missed an assert. A reproducible test case here would be helpful even if it is flakey.
m

mruno

08/30/2022, 4:43 PM
Got it, we're trying to get that created
View count: 35