Skip to content
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

Build fails because Unauthorized dependency #1206

Closed
bvcxza opened this issue Aug 9, 2024 · 10 comments
Closed

Build fails because Unauthorized dependency #1206

bvcxza opened this issue Aug 9, 2024 · 10 comments

Comments

@bvcxza
Copy link
Contributor

bvcxza commented Aug 9, 2024

$ make skip-tests
mkdir -p .localnet
./gradlew build -x test -x checkstyleMain -x checkstyleTest

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':desktop:shadowJar'.
> Could not resolve all dependencies for configuration ':desktop:runtimeClasspath'.
   > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
     Required by:
         project :desktop > project :common
      > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
         > Could not get resource 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'.
            > Could not GET 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'. Received status code 401 from server: Unauthorized


It depends on build geo/ip location.
Maybe related #132

@woodser
Copy link
Contributor

woodser commented Aug 9, 2024

I'm not seeing this problem, but sometimes build problems can happen due to VPN, and also you could try deleting your gradle cache, rm -rf ~/.gradle/caches, and rebuilding with fresh dependencies, ./gradlew build --refresh-keys --refresh-dependencies -x test -x checkstyleMain -x checkstyleTest.

@bvcxza
Copy link
Contributor Author

bvcxza commented Aug 9, 2024

I've already tried this but no success. I am not using VPN. The artifact's URL is protected with authentication for my location:

curl https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom
No access token

@Kreyren
Copy link

Kreyren commented Aug 9, 2024

I am also running into the issue while trying to package haveno in nixpkgs, refer to bisq-network/bisq#5807 for likely related details.

Ideally we should be using different source for the dependency as jitpack is unreliable and with history of region-related issues and data sanity.


Relevant code block:

https://github.com/haveno-dex/haveno/blob/master/build.gradle#L320C9-L322C114

CC @JesusMcCloud heads-up about the availability of the source code.

@boldsuck
Copy link
Contributor

boldsuck commented Aug 9, 2024

Yeah, I saw it by chance when Github workflows CI started after 'Sync Fork' And only in the Win build. Linux and Macos ran through: https://github.com/boldsuck/haveno/actions/runs/10318742896

* What went wrong:
Could not determine the dependencies of task ':desktop:shadowJar'.
> Could not resolve all dependencies for configuration ':desktop:runtimeClasspath'.
   > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
     Required by:
         project :desktop > project :common
      > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
         > Could not get resource 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'.
            > Could not GET 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'. Received status code 401 from server: Unauthorized

Link of JesusMcCloud wants user and password ;-)

EDIT:
As a workaround. If you use externalTor anyway, you can try to comment out jtorctl

@JesusMcCloud
Copy link

JesusMcCloud commented Aug 11, 2024

Sorry, I did not realize anyone was still using it. I shelved it because AFAIK it was forked and (contrary to my original repo) maintained by bisq.

@woodser
Copy link
Contributor

woodser commented Aug 11, 2024

Thanks for chiming in @JesusMcCloud :)

This issue should be resolved now with this PR from @bvcxza to remove the transitive dependency override: #1208

Please reopen if there's still any issue.

@woodser woodser closed this as completed Aug 11, 2024
@boldsuck
Copy link
Contributor

Just as a note (in case anyone ever needs it), the origin of the code is here:
https://github.com/guardianproject/jtorctl/tree/master
https://gitlab.torproject.org/legacy/trac/-/issues/32574
https://github.com/torproject/jtorctl/tree/master

Given its age, it's no wonder that ADD_ONION can't do a lot of things.

@woodser woodser reopened this Aug 16, 2024
@woodser
Copy link
Contributor

woodser commented Aug 16, 2024

This issue is still appearing when running CI tests for haveno-ts: https://github.com/haveno-dex/haveno-ts/actions/runs/10422781708/job/28869363554?pr=305

#22 83.74 FAILURE: Build failed with an exception.
#22 83.74 
#22 83.74 * What went wrong:
#22 83.74 Could not determine the dependencies of task ':bootJar'.
#22 83.74 > Could not resolve all task dependencies for configuration ':runtimeClasspath'.
#22 83.75    > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
#22 83.75      Required by:
#22 83.75          project : > project :haveno:common
#22 83.75       > Could not resolve com.github.JesusMcCloud:jtorctl:9b5ba2036b.
#22 83.75          > Could not get resource 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'.
#22 83.75             > Could not GET 'https://jitpack.io/com/github/JesusMcCloud/jtorctl/9b5ba2036b/jtorctl-9b5ba2036b.pom'. Received status code 401 from server: Unauthorized

Wondering what we can do to fix it now?

@woodser
Copy link
Contributor

woodser commented Aug 16, 2024

Fixed by updating the haveno submodule within the haveno-pricenode project, which was still using the old dependency.

@woodser woodser closed this as completed Aug 16, 2024
@Kreyren
Copy link

Kreyren commented Aug 17, 2024

haveno-pricenode is 3rd party right?

EDIT: mb missunderstood the answer, feel free to ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants