frogbot icon indicating copy to clipboard operation
frogbot copied to clipboard

Dependent project file was not found

Open parkerg21 opened this issue 1 year ago • 1 comments

Describe the bug

When frogbot runs dotnet restore against a .sln file that has dependent project(s) with relative path references, the command fails because the dependent project cannot be located at /tmp

I do have default set for JF_WORKING_DIR: . and also frogbot-config.yml wiht working dirs defined

The way I have been able to workaround this issue is the first run checkout and copy everything to /tmp

Current behavior

from the project .sln file:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FOOCommon", "..\common\FOO.Common.csproj", "{86BACE5E-A591-499E-90D7-7AB8EDEA533B}" EndProject

Run jfrog/frogbot@v2 ::group::Frogbot Frogbot ##[debug]Downloading Frogbot from https://releases.jfrog.io/artifactory/frogbot/v2/[RELEASE]/frogbot-linux-amd64/frogbot ##[debug]Downloading https://releases.jfrog.io/artifactory/frogbot/v2/[RELEASE]/frogbot-linux-amd64/frogbot ##[debug]Destination /runner/_work/_temp/b385ff9c-4c6b-49da-a306-028b5e8e56f5 ##[debug]download complete ##[debug]Caching tool frogbot [RELEASE] x64 ##[debug]source file: /runner/_work/_temp/b385ff9c-4c6b-49da-a306-028b5e8e56f5 ##[debug]destination /opt/hostedtoolcache/frogbot/[RELEASE]/x64 ##[debug]destination file /opt/hostedtoolcache/frogbot/[RELEASE]/x64/frogbot ##[debug]finished caching tool /opt/hostedtoolcache/frogbot/[RELEASE]/x64/frogbot scan-pull-request 19:56:53 [Info] Frogbot version: 2.15.1 19:56:53 [Info] Running Frogbot "scan-pull-request" command 19:56:54 [Info] Scanning Pull Request #21 19:56:54 [Info] ----------------------------------------------------------- 19:56:54 [Info] ssnc-cloud repository downloaded successfully. Starting with repository extraction... 19:56:54 [Info] Extracted repository successfully 19:56:55 [Info] Running SCA scan for vulnerable dependencies scan in /tmp/jfrog.cli.temp.-1695326214-[36]/common directory... 19:56:55 [Info] Detected: nuget, dotnet. 19:56:55 [Info] Calculating NuGet dependencies 19:56:55 [Info] Dependencies sources were not detected. Running 'dotnet restore' command 19:56:57 [Info] Scanning 25 nuget dependencies... 19:56:57 [Info] Waiting for scan to complete on JFrog Xray... 19:56:58 [Info] Running SCA scan for vulnerable dependencies scan in /tmp/jfrog.cli.temp.-1695326214-3637989317/file.indexer directory... 19:56:58 [Info] Detected: nuget, dotnet. 19:56:58 [Info] Calculating NuGet dependencies 19:56:58 [Info] Dependencies sources were not detected. Running 'dotnet restore' command Error: 8 [Error] audit command in '/tmp/jfrog.cli.temp.-1695326214-3637989317/file.indexer' failed: failed while building 'nuget' dependency tree: 'dotnet restore' command failed: exit status 1 - /home/runner/.dotnet/sdk/6.0.414/NuGet.targets(369,5): error MSB3202: The project file "/tmp/common/FOO.Common.csproj" was not found.

Error: The process '/opt/hostedtoolcache/frogbot/[RELEASE]/x64/frogbot' failed with exit code 1

Reproduction steps

No response

Expected behavior

dotnet restore would run successfully

JFrog Frogbot version

2.15.1

Package manager info

nuget, dotnet

Git provider

GitHub

JFrog Frogbot configuration yaml file

  • params: git: repoName: blah branches: - "blah-branch" aggregateFixes: false scan: includeAllVulnerabilities: true fixableOnly: true projects: - workingDirs: - "common" - "file.indexer"

Operating system type and version

linux ubuntu 20.04

JFrog Xray version

No response

parkerg21 avatar Sep 21 '23 20:09 parkerg21

Hello @parkerg21, and thank you for contacting us regarding this issue. Can you please provide a more detailed explanation of what you were attempting to do? You mentioned, 'the command fails because the dependent project cannot be located at /tmp,' and a few lines later, you said, 'The way I have been able to workaround this issue is to first run checkout and copy everything to /tmp.' Where is the dependent project originally located? Is it situated in /tmp, and are you trying to access it using a relative path? Or is it located elsewhere? Is the /tmp directory situated inside your project? (As indicated in frogbot-config.yml, WorkingDirs should contain relative paths to directories within your project.) Could you also provide the structure of your project, especially the relationship of /tmp to your root directory?

Thank you!

eranturgeman avatar Oct 03 '23 07:10 eranturgeman