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

samples:hello-workflow-fragment:connectedDebugAndroidTest fails consistently on API 21 #582

Closed
rjrjr opened this issue Nov 9, 2021 · 5 comments · Fixed by #583 or #655
Closed
Assignees

Comments

@rjrjr
Copy link
Contributor

rjrjr commented Nov 9, 2021

I'm seeing samples:hello-workflow-fragment:connectedDebugAndroidTest fail consistently on API 21 on main as well. Digging into that.

In the meantime, we should consider this PR green.

Originally posted by @rjrjr in #577 (comment)

@rjrjr rjrjr self-assigned this Nov 9, 2021
@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 9, 2021

d9ae63cd843008652e921ea2d249da6715679446 is the first bad commit
commit d9ae63cd843008652e921ea2d249da6715679446
Author: Ray Ryan <[email protected]>
Date:   Tue Oct 5 09:36:10 2021 -0700

    Hello Leakcanary.
    
    Just plugging it in to start.
    
    Closes #472.

So it was broken by #567

@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 9, 2021

Step one, blindly updating dependencies and hoping for the best. In particular, we're on androidx.activity:activity:1.3.0, and current is 1.4.0. 🤞

@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 9, 2021

Nothing is simple. That jump requires targetSdk 31, which requires android:export=true on the activity, which leads to errors on the merge manifest:

/Users/ray/Development/square/workflow/samples/hello-workflow-fragment/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest9172710425181933134.xml Error:
        android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

which allegedly should have been fixed by LeakCanary 2.7, which we're on, and so maybe come from some other dependency's manifest, but I don't see anything amiss in samples/hello-workflow-fragment/build/intermediates/merged_manifest/debug/AndroidManifest.xml, and God I hate this.

@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 9, 2021

Disabling LeakCanary fixes it. So how did the original PR ever go green? Or any PR since then? Maybe the AVDs have been updated? I dunno.

Going to see if I can disable LC just for this particular test, and maybe hit up @pyricau for a debugging session.

rjrjr added a commit that referenced this issue Nov 9, 2021
Or more likely, b/c LeakCanary exposes an obscure bug in Jetpack
and life is just too short.

Fixes #582.
@rjrjr
Copy link
Contributor Author

rjrjr commented Nov 9, 2021

Duplicates #568, or really emphasizes it. We're not just flaky any more.

rjrjr added a commit that referenced this issue Jan 31, 2022
It was choking on API 21 w/the old Leakcanary test rules, and we've stopped using those.

Fixes #582
rjrjr added a commit that referenced this issue Jan 31, 2022
It was choking on API 21 w/the old Leakcanary test rules, and we've stopped using those.

Fixes #582
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant