Flank: NPE on dump shards

Created on 12 Feb 2021  路  3Comments  路  Source: Flank/flank

Describe the bug

A clear and concise description of what the bug is.

NPE when running --dump-shards in the flank repo.

To Reproduce

Steps to reproduce the behavior:

  1. cd ./test_runner in the Flank repo
  2. Run flank android run --dump-shards
  3. See error
java.lang.NullPointerException: File(this).parent must not be null
    at ftl.run.DumpShardsKt.createDirectories(DumpShards.kt:74)
    at ftl.run.DumpShardsKt.saveShardChunks(DumpShards.kt:67)
    at ftl.run.DumpShardsKt.dumpShards(DumpShards.kt:29)
    at ftl.run.DumpShardsKt$dumpShards$1.invokeSuspend(DumpShards.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:32)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:113)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:71)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at ftl.Main$Companion$main$1.invoke(Main.kt:59)
    at ftl.Main$Companion$main$1.invoke(Main.kt:51)
    at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:21)
    at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:12)
    at ftl.Main$Companion.main(Main.kt:54)
    at ftl.Main.main(Main.kt)

Expected behavior

A clear and concise description of what you expected to happen.

Expected not to crash.

Details (please complete the following information):

Have you tested on the latest Flank snapshot?

Post the output of flank --version.

$ flank --version
version: local_snapshot
revision: a007f6c7fbe67f138eb41c9d0dd812b8230acabb
session id: a84d5a7a-6ebf-473d-a308-f5693e141ff3

Additional context

Add any other context about the problem here.

Bug P0

Most helpful comment

Within fix for this issue, we should also add IT for dump shards. It should verify created json

All 3 comments

https://github.com/Flank/flank/pull/1557
https://github.com/Flank/flank/pull/1557/files#diff-fe7cc4b5e4bb0f11c6d4fd904bb1288ad61f3586eb258cf0916de6d8a86205a6R74

Within fix for this issue, we should also add IT for dump shards. It should verify created json

Marking as P0 as it's a release blocker.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bootstraponline picture bootstraponline  路  6Comments

Sloox picture Sloox  路  3Comments

miguelslemos picture miguelslemos  路  3Comments

bootstraponline picture bootstraponline  路  6Comments

bootstraponline picture bootstraponline  路  4Comments