-
Notifications
You must be signed in to change notification settings - Fork 28
Gauge API not started #203
Comments
The latest nightly didn't appear to have solved the issue. However another team within the company I work at has made some modifications to the Gauge IntelliJ plugin that appears to have fixed the issue. Please look at the latest note from ocary in issue #177. |
@pvskarps Are you still facing this issue on latest Gauge and its plugins(IntelliJ, Java)? |
Hello, I'm encountering the same issue with the latest versions (gauge-0.8.0, java-0.6.0, intellij-plugin-0.3.1, intellij 2016.3.4). Detailed stacktrace: |
@geraniumdt Does your project use any build tool (gradle/maven)? |
@kashishm Nope |
@geraniumdt Please try the following steps
|
@kashishm Still no luck |
@geraniumdt Could you please send us the logs for the project.
|
api.log: 13:28:51.640 Failed to start execution API Service. GAUGE_API_V2_PORT Environment variable not set I was not aware of this environment variable. What should it contain? Also, there was no gauge.log in the project logs dir. Found one in the gauge installation folder, but it only contains details about installing the html-report plugin |
It is a warning. This env var is only used by Gauge internally. You don't have to worry about that. |
Besides information regarding the specs addition, there's this:
|
@kashishm Any thoughts on this? I've also tried doing a clean gauge reinstall, with no luck |
@geraniumdt From the above logs, it looks like there is some mismatch of versions between Can you check for If the above outputs
Open the project and make sure you have |
@kashishm The versions were the expected ones: Pluginshtml-report (3.1.0) I've uninstalled and reinstalled the java plugin, but it's still crashing. |
@geraniumdt Are you running the specs from the command line or IntelliJ? Could you please try installing Gauge IntelliJ plugin from After installing, could you please check IntelliJ idea log files and send us the logs which contain the following lines
OR
|
@kashishm I'm running the specs from Intellij. Attaching the GaugeModuleComponent message: |
@geraniumdt The classpath looks fine. I am not sure why it is not working for you. After opening the project, do you see a |
@kashishm So, I dug a little deeper and explored other alternatives as to why this might fail (other than incompatible libraries) and I've started thinking that it might have to do with the actual specifications. On a hunch, I've removed all my specifications and added a basic new one. And it worked. The Gauge API no longer crashed. Afterwards, on another hunch, I added all the specs back, without closing Intellij. Adding them this way also worked and the specifications compiled without any problems. But on closing and reopening Intellij, it crashed again. So this led me to the idea that the Gauge API might crash because of the number of specifications (in our project we have several thousands) and this reminded me of a similar bug logged here: #177 (comment) I've updated the plugin code with the lines mentioned in that bug and after installing it, the problem was solved. So I can safely say that the root cause is the sheer number of specifications when opening the project. The fix works, but it should be added to the master version (and probably in a more elegant version) as others might encounter this issue as well. Let me know your thoughts on this. |
Not sure really is fixed is it? Vanilla everything and when I try to create a new Gauge project in IntelliJ I get the "Error adding module to project: Gauge API not started" error. |
I'm also getting the error as well. java.lang.RuntimeException: Gauge API not started |
@jbadeau Could you please try with latest gauge-java nightly. We have added more relevant logs to debug this issue. Refer nightly installation instructions to install gauge-java from nightly. |
@Apoorva-GA the gauge-java nightly did not solve the issue unfortunately. |
@Apoorva-GA The java-gauge issue did not fix the problem but the latest nightly intellij plugin fixes the issue. |
@jbadeau I am glad to know that the issue is resolved for you. We would like to know what has caused the issue in the first place. Please provide more information.
|
Version info` Pluginshtml-report (4.0.8) After using the nightly build it seems the issue is not completely resolved but it happens a lot less frequently. If I close all files and reopen the project then it tends to work. This leads me to believe that:
On another note. I will dig into the editor soon as I guess it's using LSP which is not officially supported by intellij. Curious how it's working. |
@jbadeau Few more details
No Gauge Intellij plugin does not uses LSP. |
windows 7 Oh OK, was really curious how you would have got it to work. |
Over 3 years since I first logged this issue and the fact it is still open and active is surprising to me. Everyone having these Gauge API not started errors should read this comment in issue #177.. You'll notice the fix has been referenced many times throughout the comment history of this issue. I'm not saying the fix in the linked comment will fix all Gauge API not started errors but since we have implemented the fix in our own version of the Gauge IntelliJ plugin we no longer get reports from developers or software quality engineers related to Gauge API not started issues. The fix does require you to clone the Gauge-IntelliJ repo and update it but It is a simple fix to a frustrating problem. |
@pvskarps I have incorporated a similar fix with getgauge/gauge-java@1fcfc56 and getgauge/gauge-java@03df27f |
- This solution has been suggested by the users facing this issue. #177
Expected behavior
IntelliJ IDEA launches without issue
Actual behavior
When someone starts looking into this from Thoughtworks please e-mail me and I will e-mail you the specs folder to use in the Steps to reproduce. I would rather not attach our specs folder to this public post.
Getting Gauge API failed to start when opening a project inside of IDEA. I believe I've narrowed it down to something with the specs folder as you will notice below in the STR I can get the problem to occur on a brand new java maven project by coping our projects specs folder over to the new project. I've tried deleting the .idea and .iml files but that didn't appear to make a difference.
I ran gauge --validate on our specs folder and other than a bunch of Step implementation not found validation errors on in progress specs I don't see anything else.
Everything runs fine in our CI builds and everything runs fine from a command prompt. This only appears to be an issue when opening the project in IDEA. We can even run specs within IDEA just fine when this error occurs. It's just that all steps in the specs are red and we lose the step suggestion list when we start typing a new step in a spec.
Also I created a new standard Gauge project from within IDEA (File->New->Project->Gauge) and copied the specs folder into that and also ran into the Gauge API not started error so I don't believe it has anything to do with maven.
Steps to reproduce
Information that will help us debug
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
Gauge version: 0.6.3.nightly-2016-10-06
Plugins
csharp (0.9.2)
html-report (2.1.1)
java (0.5.0)
The text was updated successfully, but these errors were encountered: