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

When specifying a filepath that does not exist with additional-test-apks Flank hangs forever. #733

Closed
runningcode opened this issue Apr 22, 2020 · 7 comments
Assignees
Labels

Comments

@runningcode
Copy link
Contributor

Flank hangs forever when specifying additional-test-apks that do not exist.

Sample non-existent additional apks:

 additional-app-test-apks:
        - app: foo/bar/*.apk
          test: foo/bar/androidTest/*.apk

Here is a sample stacktrace:

java.nio.file.NoSuchFileException: foo/bar/*.apk
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.newByteChannel(Files.java:407)
        at java.nio.file.Files.readAllBytes(Files.java:3152)
        at ftl.gc.GcStorage.upload(GcStorage.kt:52)
        at ftl.run.AndroidTestRunner$resolveApks$2$invokeSuspend$$inlined$forEach$lambda$1.invokeSuspend(AndroidTestRunner.kt:76)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)
        Suppressed: java.nio.file.NoSuchFileException: /Users/no/workspace/android-listeners/features/collections/collections-data/build/outputs/apk/androidTest/debug/*.apk
                at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
                at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
                at java.nio.file.Files.newByteChannel(Files.java:361)
                at java.nio.file.Files.newByteChannel(Files.java:407)
                at java.nio.file.Files.readAllBytes(Files.java:3152)
                at ftl.gc.GcStorage.upload(GcStorage.kt:52)
                at ftl.run.AndroidTestRunner$resolveApks$2$invokeSuspend$$inlined$forEach$lambda$2.invokeSuspend(AndroidTestRunner.kt:77)
                ... 5 more
@pawelpasterz
Copy link
Contributor

Hey @runningcode ! Could you let us know which version of flank are you using? Thanks

@runningcode
Copy link
Contributor Author

Happening in 8.1.0!

@pawelpasterz
Copy link
Contributor

Since #732 has probably same root cause I'll answer here for both :) Could you verify if both happen with latest snapshot version ? There were lots of changes since 8.1.0
Hanging was (or at least should be completely :) ) solved with #657
I was also unable to reproduce bug with wildcard.

Let me know what you think

@runningcode
Copy link
Contributor Author

I just tried this on the snapshot. I passed it a non-existent file and it hung for at least 8 minutes, here is the stack trace:

java.nio.file.NoSuchFileException: bar
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:361)
        at java.nio.file.Files.newByteChannel(Files.java:407)
        at java.nio.file.Files.readAllBytes(Files.java:3152)
        at ftl.gc.GcStorage.upload(GcStorage.kt:52)
        at ftl.run.AndroidTestRunner$resolveApks$2$invokeSuspend$$inlined$forEach$lambda$2.invokeSuspend(AndroidTestRunner.kt:77)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)
        Suppressed: java.nio.file.NoSuchFileException: foo/*.apk
                at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
                at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
                at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
                at java.nio.file.Files.newByteChannel(Files.java:361)
                at java.nio.file.Files.newByteChannel(Files.java:407)
                at java.nio.file.Files.readAllBytes(Files.java:3152)
                at ftl.gc.GcStorage.upload(GcStorage.kt:52)
                at ftl.run.AndroidTestRunner$resolveApks$2$invokeSuspend$$inlined$forEach$lambda$1.invokeSuspend(AndroidTestRunner.kt:76)
                ... 5 more

@pawelpasterz
Copy link
Contributor

@runningcode
Could you double check if this is latest snapshot or let us know which version prints flank -v?
I am asking because stack trace you printed has at ftl.run.AndroidTestRunner$resolveApks$2$invokeSuspend$$inlined$forEach$lambda$2.invokeSuspend(AndroidTestRunner.kt:77)
and AndroidTestRunner was removed with commit 480cb74

If you are using CI please invalidate flank cache and rerun. Let me know about results, thanks!

@runningcode
Copy link
Contributor Author

Sorry about that. This was a bug in fladle that was not setting the version properly. It was introduced in Fladle 0.9.0 and fixed in 0.9.1.

Anyways I'm seeing this issue is fixed in the flank snapshot. Thanks!

@pawelpasterz
Copy link
Contributor

@runningcode happy to help, if you see any errors let us know. Thank you too!

@pawelpasterz pawelpasterz self-assigned this Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants