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

Open
bootstraponline opened this issue Mar 8, 2020 · 0 comments
Open

Improve error message reporting #656

bootstraponline opened this issue Mar 8, 2020 · 0 comments
Milestone

Comments

@bootstraponline
Copy link
Contributor

@bootstraponline bootstraponline commented Mar 8, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.