k3po / k3po.js

K3PO for JavaScript (Mocha)
Apache License 2.0
1 stars 3 forks source link

k3po start task fails on Travis CI with Uncaught Error: Invalid dependency state. Missing pomXml. #7

Open AdrianCozma opened 8 years ago

AdrianCozma commented 8 years ago

on Travis CI the build is failing(sometimes) because of the k3po:start task failing to complete

Running "k3po:start" (k3po) task
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: org.kaazing:community:2.15
resolving parent: org.kaazing:k3po.parent:3.0.0-alpha-5
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: org.kaazing:community:2.15
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: de.odysseus.juel:juel-parent:2.2.7
resolving parent: com.fasterxml:oss-parent:4
resolving parent: com.fasterxml:oss-parent:4
resolving parent: org.sonatype.oss:oss-parent:7
resolving parent: org.sonatype.oss:oss-parent:7
  1) "after each" hook
  11 passing (974ms)
  1 failing
  1) Control "after each" hook:
     Uncaught Error: Invalid dependency state. Missing pomXml. org.sonatype.oss:oss-parent:7
      at Dependency.getParent (node_modules/node-java-maven/lib/dependency.js:56:11)
      at node_modules/node-java-maven/index.js:218:24
      at Parser.<anonymous> (node_modules/xml2js/lib/xml2js.js:484:18)
      at Parser.exports.Parser.Parser.parseString (node_modules/xml2js/lib/xml2js.js:494:16)
      at Parser.parseString (node_modules/xml2js/lib/xml2js.js:7:59)
      at Object.exports.parseString (node_modules/xml2js/lib/xml2js.js:535:19)
      at loadFile (node_modules/node-java-maven/index.js:213:14)
      at node_modules/node-java-maven/index.js:208:16
Warning: Task "mochaTest:testBase" failed. Use --force to continue.
Aborted due to warnings.
The command "grunt sauceTest" exited with 3.

please find full log here

AdrianCozma commented 8 years ago

I was able to reproduce the issue locally but I'm still not sure what the cause is.

To reproduce the issue I renamed my local .m2 maven folder and ran the runRobot task in k3po.js(a few tries might be necessary to get the error).

After multiple tries I noticed that sometimes some of the pom file were incomplete(this happened for both Kaazing and 3rd party pom files). I'm not sure what the cause for the incomplete download is. I'll try to debug the task and maybe I'll find the cause

AdrianCozma commented 8 years ago

I tried debugging but didn't find anything relevant, still not sure why the dependency download is sometimes incomplete. @dpwspoon any ideas on how to best debug this issue?

As a workaround we could try caching the ~/.m2 folder on Travis

dpwspoon commented 8 years ago

Does this reproduce locally when you go against artifactory. It could be our setup for how travis gets it, meaning it wouldn't reproduce locally (on VPN) when you go against artifactory. If that is the case then it is an infrastructure issue and we can file a bug for that, with a wireshark

AdrianCozma commented 8 years ago

I was able to reproduce locally, while connected through VPN and going against artifactory

dpwspoon commented 8 years ago

Sounds like a bug in the maven javascript library we are using, perhaps we could try updating that