-
Notifications
You must be signed in to change notification settings - Fork 18
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
Task 'snykResolvedDepsJson' not found #33
Comments
@GuiSim hi, sorry to hear that. Is the project public? Can we see the |
Sadly the project is not public and I'd like to avoid sending it to your team. |
@GuiSim meanwhile, can you tell us your Gradle version, OS and whether you are using Gradle Wrapper? |
We get the same issue using the docker |
Completely understand about project being private, is there anything you can craft stripped down that can show the error happening? Having trouble replicating this at the moment. Could you please confirm if this executes successfully:
Here is the init.gradle: https://github.com/snyk/snyk-gradle-plugin/blob/master/lib/init.gradle |
I'm not using the wrapper
|
I was able to reproduce this with a stripped down project. I sent it to support@snyk.io. |
Received thanks! |
So after getting my environment to java 11 and gradle 5, I am still not able to re-produce this issue with the example project sent:
0 Dependencies in the root project but with `snyk test --gradle-sub-project=foo' I get many vulns back
Questions:
Here is the init.gradle: https://github.com/snyk/snyk-gradle-plugin/blob/master/lib/init.gradle
|
Replied via email. |
Aww that's too bad that you can't reproduce, there must be something wrong
on my side..
I simply run
snyk test --org=pleo --file=pleo-callisto-app/build.gradle
Testing /Users/guisim/dev/pleo/snyk_test...
Subrocess exit code: 1, stdout: , stderr:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'snykResolvedDepsJson' not found in project ':pleo-callisto-app'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace
option to get the stack trace. Run with --info or --debug option to get
more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
Please make sure that `gradle snykResolvedDepsJson -q --build-file
pleo-callisto-app/build.gradle --no-daemon -I
/usr/local/lib/node_modules/snyk/node_modules/snyk-gradle-plugin/lib/init.gradle`
executes successfully on this project.
If the problem persists, collect the output of `gradle snykResolvedDepsJson
-q --build-file pleo-callisto-app/build.gradle --no-daemon -I
/usr/local/lib/node_modules/snyk/node_modules/snyk-gradle-plugin/lib/init.gradle`
and contact support@snyk.io
And then I ran
gradle snykResolvedDepsJson -q --build-file pleo-callisto-app/build.gradle
--no-daemon -I
/usr/local/lib/node_modules/snyk/node_modules/snyk-gradle-plugin/lib/init.gradle
FAILURE: Build failed with an exception.
* What went wrong:
Task 'snykResolvedDepsJson' not found in project ':pleo-callisto-app'.
* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace
option to get the stack trace. Run with --info or --debug option to get
more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
…On Fri, Mar 22, 2019 at 12:01 PM Lili Kastilio ***@***.***> wrote:
So after getting my environment to java 11 and gradle 5, I am still not
able to re-produce this issue with the example project sent:
Testing /Users/lili/www/gradle-5...
Organisation: lili2311
Package manager: gradle
Target file: build.gradle
Open source: no
Project path: /Users/lili/www/gradle-5
Licenses: enabled
✓ Tested 0 dependencies for known issues, no vulnerable paths found.
Next steps:
- Run `snyk monitor` to be notified about new related vulnerabilities.
- Run `snyk test` as part of your CI/test.```
0 Dependencies in the root project but with `snyk test
--gradle-sub-project=foo' I get many vulns back
lili@ ~/www/gradle-5 () $ ./gradlew -v
------------------------------------------------------------
Gradle 5.0
------------------------------------------------------------
Build time: 2018-11-26 11:48:43 UTC
Revision: 7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987
Kotlin DSL: 1.0.4
Kotlin: 1.3.10
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 11.0.2 (Oracle Corporation 11.0.2+9)
OS: Mac OS X 10.13.2 x86_64
Questions:
1. Please share the full command you execute snyk with?
2. Please verify this executes succesfully:
- no wrapper
gradle snykResolvedDepsJson -q --build-file build.gradle -I
/Users/lili/www/snyk-gradle-plugin/lib/init.gradle
- with wrapper:
./gradlew snykResolvedDepsJson -q --build-file build.gradle -I
/path/to/snyk-gradle-plugin/lib/init.gradle
1. If none of these work out, perhaps we can jump on a quick
zoom/video call to see this run in your environment and do a little debug
session?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6GBjGoMHL1DRsgac8UKUnRDnxdbNxPks5vZLfsgaJpZM4cBPvN>
.
--
Guillaume S.
|
Aha thanks! Now I can replicate, investigating how to fix |
Could you please try |
The workaround works.
Would you recommend using `--gradle-sub-project` instead of `--file`
normally? If there was no bugs, would it be the recommended method?
…On Fri, Mar 22, 2019 at 3:48 PM Lili Kastilio ***@***.***> wrote:
Could you please try snyk test --org=pleo
--gradle-sub-project=pleo-callisto-app in the mean time, this should work
for you if the thing you are testing via --file is a sub-project, we are
working on a fix in the mean time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6GBue-Lz5c1JXvVX2a3j_OCwbGM9bVks5vZO1YgaJpZM4cBPvN>
.
--
Guillaume S.
|
We created |
The fix is released, please get the latest version of the CLI and try again? |
The latest version works! Thanks! |
We've started seeing a very similar problem in another project (using Snyk 1.143.1)
|
I can't easily provide a sample project right now. |
Looks like it's similar but not exactly the same. Looks like |
Strange, okay will take a look into this. Re-opened the issue |
@GuiSim usually, Is there any additional error message below that line when you are running Snyk CLI? |
pleo-commons is a multi-module project that includes multiple small utility libraries with dedicated features. They don't really depend on each other, technically they could all be in their own repos but we opted for a simpler approach of having them all in a single repo. In order to keep things simple on the build/deployment side of things, we added
The build.gradle for pleo-commons-all:
|
@GuiSim hmm, does
I get the same errors you were getting from the snyk tool. I believe the proper way to setup such projects is something like
as per https://docs.gradle.org/current/userguide/dependency_types.html#sub:project_dependencies |
I get the exact same result with either Changing to |
@GuiSim sorry, my mistake, I meant I'm glad to see that |
@GuiSim does snyk work for you now? Can we close the issue? |
Yep! sorry for not updating, the workaround works. |
node -v
:v11.10.0
npm -v
:6.7.0
snyk -v
:1.143.0
Command run:
Expected behaviour
(Running on my own project, with snyk v1.130.0)
Tested 212 dependencies for known issues, found 1 issue, 1 vulnerable path.
Actual behaviour
Steps to reproduce
Upgrade to the latest Snyk version and run
snyk test
I suspect this was introduced with https://github.com/snyk/snyk/releases/tag/v1.142.0 , specifically this commit 04cf66d
The text was updated successfully, but these errors were encountered: