Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSBT > 1.0 NullPointerException in JavaNetAuthenticator #3519
Comments
This comment has been minimized.
This comment has been minimized.
Thanks for the report. Could you try the following as a workaround please: updateOptions := updateOptions.value.withGigahorse(false) |
eed3si9n
added
Bug
area/dependency_management
labels
Sep 12, 2017
This comment has been minimized.
This comment has been minimized.
Does it print out the stack trace? If so it might be helpful for us to pin point where it's failing. |
eed3si9n
referenced this issue
Sep 16, 2017
Merged
Add flag sbt.gigahorse.enabled, to optionally disable Gigahorse #167
This comment has been minimized.
This comment has been minimized.
DieBauer
commented
Sep 22, 2017
•
I've ran into the same issue (also cross building, with custom repositories file, so basically same setup) with sbt 1.0.2 (sbt 0.13.15 was working fine), and disabling gigahorse works for me. ( Here is a stack trace when gigahorse was enabled:
|
This comment has been minimized.
This comment has been minimized.
This is the NPE that @cunei mentioned in https://github.com/sbt/sbt-contrib/blame/d5eff08929050196633d9203919a937aea006e5d/src/main/markdown/2017-08-16.md#L85. |
This comment has been minimized.
This comment has been minimized.
LogicalTime
commented
Sep 26, 2017
Using keystore style authentication (adding -Djavax.net.ssl.trustStore type params to SBT_OPTS) also seems to fail for SBT 1.0.2 (ssl handshake issues). Switching project back to 0.13.15 allows https connections to repositiories again. Just mentioning it in case the authentication issues are related. I'll see if: helps tomorrow. |
This comment has been minimized.
This comment has been minimized.
StephenWithPH
commented
Sep 28, 2017
My situation is identical to @DieBauer in #3519 (comment)... resolved in similar fashion. |
dwijnand
referenced this issue
Sep 29, 2017
Closed
Publishing to Nexus repository does not work with sbt-1.0.2 #3588
This comment has been minimized.
This comment has been minimized.
francisdb
commented
Oct 9, 2017
Also seeing this issue when publishing to Nexus publishTo := {
val nexus = "https://nexus.company.com"
if (isSnapshot.value)
Some("Company snapshot repo" at nexus + "/repository/maven-snapshots")
else
Some("Company releases repo" at nexus + "/repository/maven-releases")
} only the pom (and hashes) were uploaded correctly. |
This comment has been minimized.
This comment has been minimized.
note
commented
Oct 24, 2017
I found that issue because the top line of my stacktrace is the same and I got the issue after I bumped sbt from 0.13.x to 1.0.2. But issue I am experiencing is not triggered by publishing. My build depends on library hosted on private bintray repository and after sbt version bump the build fails randomly - interestingly only on CI, I was not able to replicate it locally (tried everything like wiping out ivy cache). Bintray also seemed to be more or less stable that time (was curling the URL sbt was complaining about). The workaround proposed in that ticket seemed to worked. I am attaching my stacktrace for your investigation:
|
added a commit
to eed3si9n/librarymanagement
that referenced
this issue
Oct 24, 2017
eed3si9n
referenced this issue
Oct 24, 2017
Merged
Fix OkHttp JavaNetAuthenticator with null check #177
eed3si9n
self-assigned this
Oct 24, 2017
eed3si9n
added
the
in progress
label
Oct 24, 2017
added a commit
to eed3si9n/librarymanagement
that referenced
this issue
Oct 25, 2017
eed3si9n
added this to the 1.0.3 milestone
Oct 25, 2017
dwijnand
added
the
Blocked on Upstream
label
Oct 25, 2017
eed3si9n
modified the milestones:
1.0.3,
1.0.4
Oct 27, 2017
Oct 27, 2017
This was referenced
eed3si9n
modified the milestones:
1.0.4,
1.0.5
Nov 16, 2017
NicolasRouquette
referenced this issue
Nov 19, 2017
Open
SBT 1.0.[23] NPE in sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.getURLInfo #3750
eed3si9n
closed this
in
84f03b6
Nov 30, 2017
eed3si9n
removed
the
in progress
label
Nov 30, 2017
This comment has been minimized.
This comment has been minimized.
sbt/librarymanagement#177 wasn't merged, so this wasn't fixed by bumping lm. |
dwijnand
reopened this
Dec 1, 2017
added a commit
to gatling/gatling
that referenced
this issue
Dec 6, 2017
dwijnand
modified the milestones:
1.1.1,
1.something
Jan 9, 2018
This comment has been minimized.
This comment has been minimized.
LogicalTime
commented
Feb 13, 2018
The compiler-bridge dependency doesn't seem to ship with SBT and I'm not sure how to set |
This comment has been minimized.
This comment has been minimized.
levinson
commented
Mar 5, 2018
•
The posted workaround does not work for me in SBT 1.0+ (tested 1.1.0 and 1.1.1). |
This comment has been minimized.
This comment has been minimized.
reid-spencer
commented
Mar 10, 2018
|
This comment has been minimized.
This comment has been minimized.
amogh09
commented
Mar 20, 2018
I struggled with When on a fresh container with a freshly cloned project, running Seems like the setting line is not reached before plugins are loaded in case of |
This comment has been minimized.
This comment has been minimized.
LogicalTime
commented
Mar 25, 2018
There is an SBT opts flag you can pass in to do updateOptions := updateOptions.value.withGigahorse(false). That had solved all my issues. I forget the name though. |
This comment has been minimized.
This comment has been minimized.
leoRoss
commented
Mar 28, 2018
The flag mentioned above is Using this flag fixed our issues |
This comment has been minimized.
This comment has been minimized.
francisdb
commented
May 17, 2018
Pretty crazy that this has not been fixed yet after more than a half year, anything we can do to get this going? |
This comment has been minimized.
This comment has been minimized.
I opened a pull request last year based on the stack trace on this issue - sbt/librarymanagement#177 |
dwijnand
modified the milestones:
1.something,
1.1.7
Jun 1, 2018
dwijnand
added
Merged Upstream
and removed
Blocked on Upstream
labels
Jun 1, 2018
This comment has been minimized.
This comment has been minimized.
gabriel-bezerra
commented
Jun 26, 2018
Does the Merged Upstream label mean it is about to be fixed in the next version of sbt? |
eed3si9n
closed this
in
sbt/librarymanagement@ac583b4
Jun 26, 2018
This comment has been minimized.
This comment has been minimized.
@gabriel-bezerra Yes |
This comment has been minimized.
This comment has been minimized.
gabriel-bezerra
commented
Jul 2, 2018
Thanks, Eugene. |
This comment has been minimized.
This comment has been minimized.
Updated the label description to communicate this going forward (https://github.com/sbt/sbt/labels). |
eed3si9n
modified the milestones:
1.1.7,
1.2.0
Jul 3, 2018
This comment has been minimized.
This comment has been minimized.
GaalDornick
commented
Sep 18, 2018
I still get this error on v1.2.1.
I get
when I turn on debug, I see this
SBT is tried to download the jar for a POM type module. Obviously, POM modules don't have jars, so it tries every repository until the last one and gives this exception |
This comment has been minimized.
This comment has been minimized.
This looks like a different stack trace, so I am going to use the new GitHub feature and open a new issue. |
ryanb93 commentedSep 12, 2017
•
edited by eed3si9n
steps
Populating ~/.sbt/repositories file with
Populating ~/.sbt/0.13/plugins/credentials.sbt and ~/.sbt/1.0/plugins/credentials.sbt with:
credentials += Credentials(Path.userHome / ".sbt" / ".credentials")
Exporting
Running
sbt clean test +publish
On a project with
build.properties
sbt.version=1.0.1
problem
The build fails with the following message:
build 12-Sep-2017 11:43:14 �[0m[�[0m�[31merror�[0m] �[0m�[0munresolved dependency: io.netty#netty;3.7.0.Final: java.lang.NullPointerException at okhttp3.JavaNetAuthenticator.authenticate(JavaNetAuthenticator.java:37)�[0m
The project also relies on a plugin that has been cross-built to 0.13.16 and 1.0.0
expectation
The build to pass. Changing the sbt.version in build.properties to 0.13.16 works fine.
notes
sbt version: 1.0 and 1.0.1