Closed volkerd closed 3 years ago
I can confirm that this problem exists as well for my local gradle installation which is rev 78. In my case it is messing up running 'gradle test' in my project:
org.apache.http.ssl.SSLInitializationException: /snap/gradle/78/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts (No such file or directory)
I'd appreciate instructions on how I can revert to version 59 - it seems to be installed (I can see it with 'snap list --all' and in the filesystem), but
sudo snap install --revision=59 gradle
either tells me that gradle is already installed or (if I remove the snap first) that specific revisions may not be installed for this snap.
Sorry, I don't receive notifications for these issues as I'm currently not part of snapcrafters. 7.0.2 has just been merged and will be available shortly in the stable channel. Can you please test and see if it resolves this issue for you?
Btw, I use this snap daily and use it to publish artifacts to Nexus. I haven't seen such issues. If you still have this issue with 7.0.2, could you please give a bit more detail about your setup and how to reproduce it etc?
Thanks for looking into this. I installed 7.0.2 via snap (I've reverted to a manual install in the meantime) and can still replicate the problem. It can be triggered by running 'gradle test' in my project after clearing the local gradle cache. I'll attach a file with the output produced with the --stacktrace option. As you can see here the required cacert file is indeed missing:
jerry@nomad:~/Develop/buecherkiste$ ls /snap/gradle/89/usr/lib/jvm/java-11-openjdk-amd64/lib/security/
blacklisted.certs default.policy public_suffix_list.dat
My machine is running Ubuntu 20.10 with OpenJDK 11 installed via apt. If you need more information, please just ask.
These symlinks were removed because they caused issues on automated builds. I looked at a previous discussion thread about it and started to look at some example snaps that seems to sorted out this issue. I'll try and let you know once a fix is ready.
@volkerd @tunix I'd like to test also and see if I can reproduce the issue. What command are you running to trigger the problem?
@igorljubuncic - I think gradle test
would be enough. However, must projects has a wrapper script inside its root which may cause gradle to execute the test/build using the local gradle jar. To prevent this, you can temporarily remove the wrapper scripts.
Please try the PR and let me know if it fixes this issue. @igorljubuncic @JerryPreissler @volkerd Thanks!
@JerryPreissler @volkerd - Automated builds are now published into the candidate channel. Please test & let me know if packages in candidate channel work for you.
Install with below command if you don't have it installed:
snap install gradle --classic --candidate
Move to candidate channel:
snap refresh gradle --candidate
Works perfectly for me. Updated snap, cleared out ~/.gradle/caches and ran 'gradle test' in my project. Could see the dependencies being downloaded, so the problem seems to be fixed. I also could find the cacert file in /snap/gradle/101/usr/lib/jvm/java-11-openjdk-amd64/lib/security/ Thanks you for fixing this.
Hi, after refresh to rev 79, gradle was unable to publish artifacts to Nexus
it seems this symlink is missing 78/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacert
I reverted to rev 59, so it works for now.
Thanks for your work Volker