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

NPE on dump shards #1601

Closed
bootstraponline opened this issue Feb 12, 2021 · 3 comments · Fixed by #1612
Closed

NPE on dump shards #1601

bootstraponline opened this issue Feb 12, 2021 · 3 comments · Fixed by #1612
Assignees
Labels
Milestone

Comments

@bootstraponline
Copy link
Contributor

bootstraponline commented Feb 12, 2021

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.

@pawelpasterz
Copy link
Contributor

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

@zuziaka zuziaka added P0 and removed P1 labels Feb 15, 2021
@zuziaka
Copy link
Contributor

zuziaka commented Feb 15, 2021

Marking as P0 as it's a release blocker.

@adamfilipow92 adamfilipow92 self-assigned this Feb 15, 2021
@zuziaka zuziaka added this to the Sprint 2 milestone Feb 15, 2021
@mergify mergify bot closed this as completed in #1612 Feb 18, 2021
mergify bot pushed a commit that referenced this issue Feb 18, 2021
Fixes #1601 

## Test Plan
> How do we know the code works?

When use  ```--dump-shards```, flank should create dump shard file without errors. 

## Checklist

- [X] Unit tested
- [X] Integration tests updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants