fabric8-analytics-vscode-extension icon indicating copy to clipboard operation
fabric8-analytics-vscode-extension copied to clipboard

[BUG] RHDA is attempting to put a slash at the beginning of the path to my POM, causing the help:effective-pom mvn command to fail

Open natereprogle opened this issue 1 year ago • 20 comments

Describe the bug Every time I focus on my pom.xml in my project, I get the following error:

Command failed: mvn -q help:effective-pom -Doutput="\v:\Development Projects\<project-here>\effective-pom.xml" -f "/v:/Development Projects/<project-here>/pom.xml" POM file "/v:/Development Projects/<project-here>/pom.xml" specified the -f/--file command-line argument does not exist

Running this command manually also gives the same error, but removing the / from in front of v:/ in the -f argument generates the effective-pom as expected. I have attempted to look through different configuration settings, update Maven to the latest version, etc. with no results.

To Reproduce Steps to reproduce the behavior:

  1. Simply open any pom.xml in my project. I have two
  2. Receive error, nothing happens

Expected behavior The effective-pom.xml is generated, and I am able to analyze dependencies as normal

Screenshots image I am able to control click the file it says doesn't exist and navigate to it within VSCode without issue. This is not a symlink or shortcut, it is the actual file itself.

Logs The only logs I see are in the output window of VSCode, which just state the error I am receiving above. log.log

VSCode(please complete the following information):

  • OS: Windows 11 23H2 build 22631.3085
  • VSCode version: 1.86.0
  • Dependency Analytics Version v0.9.2

Additional context The -Doutput flag doesn't need to change, strangely enough. It uses \ instead of /, but the file is generated fine. However, even if I change the -f argument to use \ instead of /, it still fails when run manually, with the same result.

natereprogle avatar Feb 07 '24 01:02 natereprogle

I think I have a problem like yours: ENOENT: no such file or directory, open '/c:/projects/myproject/pom.xml'

enielrodriguez avatar Feb 08 '24 17:02 enielrodriguez

Same for me: mvn -q help:effective-pom -Doutput="\c:\Users\some-path\effective-pom.xml" -f "/c:\Users\some-path\pom.xml" does not work issuing file not found, but:

mvn -q help:effective-pom -Doutput="c:\Users\some-path\effective-pom.xml" -f "c:\some-path\pom.xml" works without any issue.

mvn -q help:effective-pom -Doutput="\c:\Users\some-path\effective-pom.xml" -f "c:\Users\some-path\pom.xml" also works, so it seems that only the slash after the -f option is the issue.

ionutcbn avatar Feb 10 '24 15:02 ionutcbn

me too, so it seems that only the slash after the -f option is the issue.

wuzhi2009 avatar Feb 14 '24 13:02 wuzhi2009

same thing happening here, I've downgraded the extension for now and it is working, but the current version is bugged

GKPavesi avatar Feb 15 '24 00:02 GKPavesi

same thing happening here, I've downgraded the extension for now and it is working, but the current version is bugged

Which version did you downgrade to? I'd love to know so I can make the switch. I'm working on moving my projects to Gradle right now, but until then I would love to have this plugin working for my Maven stuff.

natereprogle avatar Feb 15 '24 22:02 natereprogle

same thing happening here, I've downgraded the extension for now and it is working, but the current version is bugged

Which version did you downgrade to? I'd love to know so I can make the switch. I'm working on moving my projects to Gradle right now, but until then I would love to have this plugin working for my Maven stuff.

I've downgraded to version 0.7.3 which was released about 3 months ago. image I have not tested version 0.9.0 and version 0.9.1, just downgraded directly to 0.7.3 and realized it was working and left if there, but maybe you can also try these versions to see if they work.

GKPavesi avatar Feb 15 '24 23:02 GKPavesi

I downgraded to 0.9.0, which fixes the problem.

same thing happening here, I've downgraded the extension for now and it is working, but the current version is bugged

Which version did you downgrade to? I'd love to know so I can make the switch. I'm working on moving my projects to Gradle right now, but until then I would love to have this plugin working for my Maven stuff.

I've downgraded to version 0.7.3 which was released about 3 months ago. image I have not tested version 0.9.0 and version 0.9.1, just downgraded directly to 0.7.3 and realized it was working and left if there, but maybe you can also try these versions to see if they work.

windwhim avatar Feb 19 '24 15:02 windwhim

I decided to test to see if downgrading to 0.9.1 fixes the problem, but unfortunately, it's a no-go. I got some invalid JSON response and requests to the https://rhdacloud.com/api/v4/analysis failures.

EDIT: It seems downgrading to any versions are all no-goes. I get a lot of invalid JSON response bodies for each downgrade: 0.9.0, 0.7.3, etc.

I downgraded to 0.9.0, which fixes the problem.

same thing happening here, I've downgraded the extension for now and it is working, but the current version is bugged

Which version did you downgrade to? I'd love to know so I can make the switch. I'm working on moving my projects to Gradle right now, but until then I would love to have this plugin working for my Maven stuff.

I've downgraded to version 0.7.3 which was released about 3 months ago. image I have not tested version 0.9.0 and version 0.9.1, just downgraded directly to 0.7.3 and realized it was working and left if there, but maybe you can also try these versions to see if they work.

tommai78101 avatar Feb 21 '24 15:02 tommai78101

Same here: I can´t generate effective pom with extension v0.9.2 because the slash at the beginning of the path.

If I downgrade to v0.9.0 RHDA don´t work with error "request to https://rhda.rhcloud.com/api/v4/analysis failed, reason: connect ETIMEDOUT 18.119.151.206:443"

elTorres avatar Mar 05 '24 07:03 elTorres

Thank you @natereprogle and all for reaching out regarding this issue. A fix for this bug will be available soon.

IlonaShishov avatar Mar 05 '24 15:03 IlonaShishov

Thank you @natereprogle and all for reaching out regarding this issue.

A fix for this bug will be available soon.

Thank you! That's awesome 👏🏼

natereprogle avatar Mar 05 '24 15:03 natereprogle

Thank you @natereprogle and all for reaching out regarding this issue. A fix for this bug will be available soon.

Vielen Dank für Ihre harte Arbeit!

wuzhi2009 avatar Mar 05 '24 15:03 wuzhi2009

I too have suffered from this problem for a while now on 0.9.3 . At first I thought it was some kind of curse, how something fundamental like maven was broken. Glad to see I'm not alone 🌝

raffian avatar Mar 11 '24 01:03 raffian

Hi @IlonaShishov

2 versions (v0.9.3 and v0.9.4) of the RHDA extension have been published after the fix https://github.com/fabric8-analytics/fabric8-analytics-lsp-server/pull/244, but neither of them includes it.

When do you expect to release a version of RHDA that includes it?

Is it possible to download a packaged version of RHDA LSP Server to manually replace it locally?

Thanks in advance

elTorres avatar Mar 27 '24 08:03 elTorres

Same issue. I don't want to disable the extension just to get rid of this error, but it would be great to have a fix

dennis-yemelyanov avatar Mar 28 '24 19:03 dennis-yemelyanov

Downgraded to 0.9.1 and it seems to be working without the issue.

sa-schiefer avatar Apr 04 '24 13:04 sa-schiefer

@elTorres the fix will be included in the next release, version 0.9.5. You can expect it very soon.

We don't offer pre-packaged versions for manual replacement, but once 0.9.5 is out, you'll be able to update your RHDA extension.

Thanks for your patience.

IlonaShishov avatar Apr 04 '24 13:04 IlonaShishov