I recently discovered this plugin and installed it in my Intellij to create some unit tests. However, when I try to run it, it keeps failing with the error “Failed to start up analysis service”.
I followed the troubleshooting article for E020 code and increase my maximum heap size but that did not resolve the issue. Any help?
Here is part of the cover-plugin.log output:
10:13:05.614 [INFO][pool-6-thread-1][c.d.c.service.c] Attempting to get service client, retry 3.
10:13:05.614 [INFO][pool-6-thread-1][c.d.c.service.c] Starting monitoring server.
10:13:05.632 [INFO][pool-6-thread-1][c.d.c.service.c] Monitoring server listening on localhost/127.0.0.1:57881
10:13:05.633 [INFO][pool-6-thread-1][c.d.c.service.c] Starting analyzer server process…
10:13:05.633 [INFO][pool-6-thread-1][c.d.c.service.c] Server command-line: C:\Program Files (x86)\Java\jdk1.8.0_331\bin\java.exe -XX:+IgnoreUnrecognizedVMOptions -Xms128m -Xmx750m -Dsun.io.useCanonCaches=false -Djdk.http.auth.tunneling.disabledSchemes=“” -Djdk.attach.allowAttachSelf=true -Djdk.module.illegalAccess.silent=true -Dkotlinx.coroutines.debug=off -Xmx2048m -Dsplash=true -Dide.native.launcher=true -ea -javaagent:C:\Users\U593743\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\diffblue-cover-ij\lib\launcher-2022.07.02-shared-jar.jar -Dlogback.configurationFile=C:\Users\U593743\AppData\Local\Temp\diffblue\config\logback-remote-service.xml -Dcom.diffblue.springIsolationJar=C:\Users\U593743\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\diffblue-cover-ij\META-INF\cover-isolation-layer-2022.07.02.jar -Dcover.jar.path=C:\Users\U593743\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\diffblue-cover-ij\META-INF\cover-service-analyzer-2022.07.02.jar -Dcom.diffblue.assertionSuggestionJar=C:\Users\U593743\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\diffblue-cover-ij\META-INF\cover-service-analyzer-2022.07.02.jar -Dcover.main.class=com.diffblue.cover.service.analyzer.Main -jar C:\Users\U593743\AppData\Roaming\JetBrains\IntelliJIdea2021.3\plugins\diffblue-cover-ij\lib\launcher-2022.07.02-shared-jar.jar --service-lifespan 1800 --monitoring-service-port 57881
10:13:05.643 [INFO][pool-6-thread-1][c.d.c.service.c] Server started. Waiting up to 300 seconds for a connection to be established…
10:13:06.647 [INFO][pool-6-thread-1][c.d.c.service.c] Service process output:
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
10:13:06.647 [INFO][pool-6-thread-1][c.d.c.service.c] Failed service start-up with critical error: ServiceProcessExitedUnsuccessfullyException: Failed to start up analyzer: The process exited with exit code 1
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e]
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e] Summary:
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e] --------
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e] Total: 1 method
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e]
10:13:06.700 [INFO][pool-6-thread-1][c.d.i.p.w.e] No tests created for: 1 method
10:13:07.279 [WARN][AWT-EventQueue-0][c.d.i.plugin.g.a] Failed to start up analysis service - Diffblue Cover uses an analysis service that performs the actual test case production.
Successfully starting up this service requires Cover to be able to start a process, to
set up a TCP server on localhost and to connect to the server set up by the analysis service;
the analysis service also needs to be able to set up a TCP server on localhost and to connect
the server started by Cover.
Diffblue Cover failed to start up the analysis service despite trying 3
times. The reasons for failure are summarized below:
Service JVM exited unexpectedly (3 times)
Service failed to start due to a JVM problem, exit code 1.
Please try the troubleshooting suggestions given above, if any.
See also https://diff.blue/E020. If the problem persists, contact
Diffblue Support and send the log file that can be found in
C:\Users\U593743\AppData\Local\Temp\diffblue\log\cover-plugin.log.
com.diffblue.cover.exception.environment.AnalysisServiceStartupException: Unable to start up analysis service
at com.diffblue.cover.service.c.a(SourceFile:220)
at com.diffblue.cover.api.b.b.a(SourceFile:192)
at com.diffblue.cover.api.b.e.a(SourceFile:135)
at com.diffblue.cover.api.b.b.a(SourceFile:432)
at com.diffblue.cover.api.b.e.a(SourceFile:151)
at com.diffblue.cover.h.a.b.a(SourceFile:169)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)