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

Spurious "Unable to find credentials" error logs in sbt update with artifactory #7141

Open
alexklibisz opened this issue Jan 26, 2023 · 6 comments
Labels

Comments

@alexklibisz
Copy link
Contributor

alexklibisz commented Jan 26, 2023

steps

  1. Set credentials: credentials += Credentials("Artifactory Realm", "artifactory.company.tld", "valid username", "valid password")
  2. Set externalResolvers: `externalResolvers := Seq(Resolver.defaultLocal, "Company Artifacts" at "artifactory.company.tld")
  3. Run sbt -client update

problem

The sbt -client update step often prints a stack of spurious error logs like this:

image

But then it successfully completes the command.

The greyed out boxes are the "artifactory.company.tld"

expectation

Don't print error logs when the command is correct.

notes

  • This doesn't always happen
  • The frequency of error logs seems random
@alexklibisz
Copy link
Contributor Author

alexklibisz commented Mar 10, 2024

One thing I don't understand is that this error/warning message is coming from code that's related to Ivy. I thought that SBT has been using coursier for a while now. Maybe it's using coursier to resolve from an Ivy repository?

@SethTisue
Copy link
Member

One thing I don't understand is that this error/warning message is coming from code that's related to Ivy. I thought that SBT has been using coursier for a while now. Maybe it's using coursier to resolve from an Ivy repository?

You don't have useCoursier := false set, do you?

@alexklibisz
Copy link
Contributor Author

Correct, I haven't set useCoursier := false.

@SethTisue
Copy link
Member

SethTisue commented Mar 11, 2024

I agree it seems downright weird. I'm afraid I don't know this part of the codebase and I don't have any special insight. A couple general suggestions though, one would be to try running with -debug to see if the debug logs give any additional clues. Another is to attach a debugger to the sbt process and set a breakpoint at the line where the error is generated, to see what stack frames led us there.

@mzuehlke
Copy link
Contributor

You haven't specified wich sbt version you are using.
The usage of ivy could come from a sbt plugin. Which plugins, in which versions are you using?

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

No branches or pull requests

3 participants