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

ApexTestWithCoverage fails with below error. My Deploy/Refresh commands don't have any issues #97

Open
asknet opened this issue Jun 28, 2018 · 3 comments

Comments

@asknet
Copy link

asknet commented Jun 28, 2018

Hi,

Please see below error.
Removed some details which cannot be disclosed.

Trying to start server using command: java  -Dlog.level.root=error  -Dfile.encoding=UTF-8  -jar ***\tooling-force.com-0.4.0.2.jar --action=serverStart --port=8888 --timeoutSec=60
 
  --action=deployModified --tempFolderPath="***\vim-force\tmp" --authConfigPath="***\vim-force\prop\oauth2\***" --config="***\vim-force\prop\***.properties" --projectPath="***" --http.proxyHost=***.com --http.proxyPort=***0  --debuggingHeaderConfig="***\Local\Temp\VIG3DF4.tmp-apexTraceFlag.conf" --reportCoverage=true --testsToRun="***" --checkOnly=true --responseFilePath="***\.vim-force.com\response_deployModified" --pollWaitMillis=1000 --maxPollRequests=1000
 [INFO] DeployModified - Check Conflicts with Remote
 {
   "access_token": "***",
   "scope": "refresh_token web api id",
   "instance_url": "***.my.salesforce.com",
   "signature": "***",
   "token_type": "Bearer",
   "id": "https://test.salesforce.com/id/***",
   "issued_at": "1530199880224"
 }
 
 [INFO] Session - waiting result, poll #3
 [INFO] Session - waiting result, poll #7
 [INFO] Session - waiting result, poll #11
 [INFO] Session - waiting result, poll #15
 [INFO] Session - waiting result, poll #19
 [INFO] Session - waiting result, poll #23
 [INFO] Session - waiting result, poll #27
 [INFO] Session - retrieving Metadata ZIP ...
 [ERROR] Executor - java.util.NoSuchElementException: key not found: unpackaged/settings/OmniChannel.settings

 [ERROR] Executor - 	at scala.collection.MapLike$class.default(MapLike.scala:228)

 [ERROR] Executor - 	at scala.collection.AbstractMap.default(Map.scala:59)

 [ERROR] Executor - 	at scala.collection.MapLike$class.apply(MapLike.scala:141)

 [ERROR] Executor - 	at scala.collection.AbstractMap.apply(Map.scala:59)

 [ERROR] Executor - 	at com.neowit.apex.actions.ListConflicting$$anonfun$13.apply(RetrieveMetadata.scala:306)

 [ERROR] Executor - 	at com.neowit.apex.actions.ListConflicting$$anonfun$13.apply(RetrieveMetadata.scala:302)

 [ERROR] Executor - 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)

 [ERROR] Executor - 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)

 [ERROR] Executor - 	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)

 [ERROR] Executor - 	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)

 [ERROR] Executor - 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)

 [ERROR] Executor - 	at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)

 [ERROR] Executor - 	at com.neowit.apex.actions.ListConflicting.getFilesNewerOnRemote(RetrieveMetadata.scala:301)

 [ERROR] Executor - 	at com.neowit.apex.actions.DeployModified.getFilesNewerOnRemote(Deploy.scala:584)

 [ERROR] Executor - 	at com.neowit.apex.actions.DeployModified.getConflicts(Deploy.scala:590)

 [ERROR] Executor - 	at com.neowit.apex.actions.DeployModified.act(Deploy.scala:341)

 [ERROR] Executor - 	at com.neowit.apex.actions.Action$class.execute(Action.scala:93)

 [ERROR] Executor - 	at com.neowit.apex.actions.ApexActionWithWritableSession.execute(Action.scala:268)

 [ERROR] Executor - 	at com.neowit.apex.Executor.run(Runner.scala:139)

 [ERROR] Executor - 	at com.neowit.apex.Executor.execute(Runner.scala:52)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(TcpServer.scala:220)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply(TcpServer.scala:218)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply(TcpServer.scala:218)

 [ERROR] Executor - 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)

 [ERROR] Executor - 	at scala.Console$.withOut(Console.scala:53)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply$mcI$sp(TcpServer.scala:218)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply(TcpServer.scala:218)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply(TcpServer.scala:218)

 [ERROR] Executor - 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)

 [ERROR] Executor - 	at scala.Console$.withErr(Console.scala:80)

 [ERROR] Executor - 	at com.neowit.CommandProcessor.processCommand(TcpServer.scala:217)

 [ERROR] Executor - 	at com.neowit.CommandProcessor$$anonfun$receive$2.applyOrElse(TcpServer.scala:163)

 [ERROR] Executor - 	at akka.actor.Actor$class.aroundReceive(Actor.scala:482)

 [ERROR] Executor - 	at com.neowit.CommandProcessor.aroundReceive(TcpServer.scala:159)

 [ERROR] Executor - 	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)

 [ERROR] Executor - 	at akka.actor.ActorCell.invoke(ActorCell.scala:495)

 [ERROR] Executor - 	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)

 [ERROR] Executor - 	at akka.dispatch.Mailbox.run(Mailbox.scala:224)

 [ERROR] Executor - 	at akka.dispatch.Mailbox.exec(Mailbox.scala:234)

 [ERROR] Executor - 	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)

 [ERROR] Executor - 	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)

 [ERROR] Executor - 	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)

 [ERROR] Executor - 	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

 [ERROR] Executor - java.util.NoSuchElementException: key not found: unpackaged/settings/OmniChannel.settings
 	at scala.collection.MapLike$class.default(MapLike.scala:228)
 	at scala.collection.AbstractMap.default(Map.scala:59)
 	at scala.collection.MapLike$class.apply(MapLike.scala:141)
 	at scala.collection.AbstractMap.apply(Map.scala:59)
 	at com.neowit.apex.actions.ListConflicting$$anonfun$13.apply(RetrieveMetadata.scala:306)
 	at com.neowit.apex.actions.ListConflicting$$anonfun$13.apply(RetrieveMetadata.scala:302)
 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
 	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
 	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
 	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)
 	at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
 	at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:186)
 	at com.neowit.apex.actions.ListConflicting.getFilesNewerOnRemote(RetrieveMetadata.scala:301)
 	at com.neowit.apex.actions.DeployModified.getFilesNewerOnRemote(Deploy.scala:584)
 	at com.neowit.apex.actions.DeployModified.getConflicts(Deploy.scala:590)
 	at com.neowit.apex.actions.DeployModified.act(Deploy.scala:341)
 	at com.neowit.apex.actions.Action$class.execute(Action.scala:93)
 	at com.neowit.apex.actions.ApexActionWithWritableSession.execute(Action.scala:268)
 	at com.neowit.apex.Executor.run(Runner.scala:139)
 	at com.neowit.apex.Executor.execute(Runner.scala:52)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(TcpServer.scala:220)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply(TcpServer.scala:218)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1$$anonfun$apply$mcI$sp$1.apply(TcpServer.scala:218)
 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
 	at scala.Console$.withOut(Console.scala:53)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply$mcI$sp(TcpServer.scala:218)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply(TcpServer.scala:218)
 	at com.neowit.CommandProcessor$$anonfun$processCommand$1.apply(TcpServer.scala:218)
 	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
 	at scala.Console$.withErr(Console.scala:80)
 	at com.neowit.CommandProcessor.processCommand(TcpServer.scala:217)
 	at com.neowit.CommandProcessor$$anonfun$receive$2.applyOrElse(TcpServer.scala:163)
 	at akka.actor.Actor$class.aroundReceive(Actor.scala:482)
 	at com.neowit.CommandProcessor.aroundReceive(TcpServer.scala:159)
 	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
 	at akka.actor.ActorCell.invoke(ActorCell.scala:495)
 	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
 	at akka.dispatch.Mailbox.run(Mailbox.scala:224)
 	at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
 	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
 	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
 	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
 	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
 
ERROR: Operation failed
ERROR: key not found: unpackaged/settings/OmniChannel.settings
@neowit
Copy link
Owner

neowit commented Jul 2, 2018

Is "OmniChannel" something that is defined in your package.xml? If it is then you may need to remove it.

Also (don't think this will make a difference, but worth a try) - you may want to consider switching to a more recent version of tooling API jar.

@asknet
Copy link
Author

asknet commented Jul 3, 2018

I don't see OmniChannel anywhere in package.xml.
As mentioned, my deploy/refresh commands don't have these issues.
Please let me know, anything I can help to debug

@neowit
Copy link
Owner

neowit commented Jul 4, 2018

I don't see OmniChannel anywhere in package.xml.

Maybe you have a wildcard for Settings? Although I still do not see how this may be an issue, but if you do have something like

    <types>
        <members>*</members>
        <name>Settings</name>
    </types>

then it may be worth checking what happens if you remove it.

Also, what is <version> value in package.xml ? Try changing it to 40.0 since this is the API version against which tooling-force.com-0.4.0.2.jar was built.

Finally, why do you use metadata (meta-TestAndDeploy or meta-CheckOnly) at all? tooling-sinc often noticeably faster.

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

No branches or pull requests

2 participants