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

Improve error message reporting #656

Closed
bootstraponline opened this issue Mar 8, 2020 · 2 comments · Fixed by #780
Closed

Improve error message reporting #656

bootstraponline opened this issue Mar 8, 2020 · 2 comments · Fixed by #780
Assignees
Milestone

Comments

@bootstraponline
Copy link
Contributor

As reported on Slack:

Peter Farlow: My team uses Bitrise to run test lab UI test on Android via flank. Just posting this build error I had in case anyone has the same problem:

+------------------------------------------------------------------------------+
| (9) Flank - upload for Firebase Test Lab                                     |
+------------------------------------------------------------------------------+
| id: flank                                                                    |
| version: 0.1.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2020-02-19T20:06:11Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- ServiceAccountJSON: *****
- ConfigPath: .bitrise/flank.yml
- Version: latest
- CommandFlags: 
Downloading binary
- Done
Running test
- Detected platform: android
$ java "-jar" "/tmp/flank-bin013211155/flank.jar" "android" "run" "-c" ".bitrise/flank.yml"
com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class ftl.config.Device] value failed for JSON property version due to missing (therefore NULL) value for creator parameter version which is a non-nullable type
 at [Source: (StringReader); line: 15, column: 3] (through reference chain: ftl.args.yml.AndroidGcloudYml["gcloud"]->ftl.args.yml.AndroidGcloudYmlParams["device"]->java.util.ArrayList[1]->ftl.config.Device["version"])
	at com.fasterxml.jackson.module.kotlin.KotlinValueInstantiator.createFromObjectWith(KotlinValueInstantiator.kt:107)
	at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:198)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:488)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:530)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:530)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3205)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3173)
	at ftl.args.AndroidArgs$Companion.load(AndroidArgs.kt:172)
	at ftl.args.AndroidArgs$Companion.load(AndroidArgs.kt:165)
	at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:38)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
	at picocli.CommandLine.access$900(CommandLine.java:145)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
	at picocli.CommandLine.execute(CommandLine.java:1864)
	at ftl.Main$Companion.main(Main.kt:41)
	at ftl.Main.main(Main.kt)
Exporting artifacts
Failed to export artifacts, error: open ./results: no such file or directory
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | Flank - upload for Firebase Test Lab (exit code: 1)           | 7.64 sec |
+---+---------------------------------------------------------------+----------+
| Issue tracker: https://github.com/bitrise-steplib/bitrise-step-flank/issues  |
| Source: https://github.com/bitrise-steplib/bitrise-step-flank                |
+---+---------------------------------------------------------------+----------+

You can see it's complaining about the device in position 1 of my flank.yml file. A further inspection of that:

  # Google Pixel 3
  device:
    - model: blueline
      version: 29
      locale: en
      orientation: portrait
    # Samsung Galaxy S9 SM-G9600
    - model: starqltechn
      verison: 26
      locale: en
      orientation: portrait
    # LG Nexus 5
    - model: hammerhead
      version: 21
      locale: en
      orientation: portrait

I spelled 'version' wrong for the Galaxy S9. Not the most intuitive error message, but it was enough to point me to the right spot.

@bootstraponline bootstraponline added this to the May 2020 milestone Mar 8, 2020
@runningcode
Copy link
Contributor

I'm having some trouble debugging this error message. I'm guessing my flank config is incorrect, but I have no idea how to parse this information:

com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class ftl.reports.xml.model.JUnitTestSuite] value failed for JSON property hostname due to missing (therefore NULL) value for creator parameter hostname which is a non-nullable type
 at [Source: (byte[])"<?xml version='1.0' encoding='UTF-8' ?>
<testsuites>
  <testsuite name="Nexus5-23-en-portrait" tests="1" failures="0" flakes="0" errors="0" skipped="0" time="2.594" timestamp="2020-04-23T20:40:34">
    <testcase name="seeView" classname="com.osacky.flank.gradle.sample.ExampleInstrumentedTest" time="2.594"/>
  </testsuite>
  <testsuite name="Pixel2-26-en-portrait" tests="1" failures="0" flakes="0" errors="0" skipped="0" time="2.712" timestamp="2020-04-23T20:40:14">
    <testcase name="seeView" cl"[truncated 109 bytes]; line: 5, column: 3] (through reference chain: ftl.reports.xml.model.JUnitTestResult["testsuite"]->java.util.ArrayList[0]->ftl.reports.xml.model.JUnitTestSuite["hostname"])
        at com.fasterxml.jackson.module.kotlin.KotlinValueInstantiator.createFromObjectWith(KotlinValueInstantiator.kt:107)
        at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:198)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:488)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
        at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:114)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
        at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
        at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:530)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417)
        at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1287)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
        at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
        at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:114)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3266)
        at ftl.reports.xml.JUnitXmlKt.parseAllSuitesXml(JUnitXml.kt:50)
        at ftl.reports.xml.JUnitXmlKt.parseAllSuitesXml(JUnitXml.kt:54)
        at ftl.gc.GcStorage.downloadJunitXml(GcStorage.kt:94)
        at ftl.args.ArgsHelper.calculateShards(ArgsHelper.kt:222)
        at ftl.args.AndroidTestShard.getTestShardChunks(AndroidTestShard.kt:26)
        at ftl.run.AndroidTestRunner$runTests$2.invokeSuspend(AndroidTestRunner.kt:38)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:45)
        at kotlinx.coroutines.internal.ScopeCoroutine.afterCompletionInternal(Scopes.kt:32)
        at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:310)
        at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:236)
        at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:849)
        at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:811)
        at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:787)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:270)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:49)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1729)
        at picocli.CommandLine.access$900(CommandLine.java:145)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2101)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2068)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1935)
        at picocli.CommandLine.execute(CommandLine.java:1864)
        at ftl.Main$Companion.main(Main.kt:41)
        at ftl.Main.main(Main.kt)

@bootstraponline
Copy link
Contributor Author

bootstraponline commented Apr 28, 2020

@runningcode (therefore NULL) value for creator parameter hostname which is a non-nullable type is a bug in Flank that has been fixed on snapshot. What this message says is the hostname parameter in the XML is null but we expected it to be not null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants