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
FetchError$DownloadingArtifacts when importing sbt project to IntelliJ with "sbt sources" checked #5501
Comments
Same issue |
@louiselumapas Thanks for the report. I wonder if this is a duplicate of #5219 / #4707 / coursier/coursier#1541 Would not checking the checkbox to download sbt sources work around this issue? useCoursier := false in |
Using IntelliJ IDEA 2019.3.4 (Community Edition) I was able to import fine.
|
Here's my PR towards fixing this - coursier/sbt-coursier#212 |
Thanks! it seems to be working perfectly fine now after I tried re-importing again without editing the plugins.sbt. Weird |
I think I solved the issue. In IntelliJ IDEA, go to Preferences => Build, Execution, Deployment => Build Tools => sbt => sbt projects. Unticked "Library sources" & "sbt sources". I tested it on 2019.3.4 & 2020.1. Both versions work correctly. This pretty nasty issue take me whole 2 days to debugging. :( sad See Also: https://stackoverflow.com/a/48473825 Edit: On 2020.1, there is currently an another issue https://youtrack.jetbrains.com/issue/SCL-17212. For now, I decided to downgrade back to 2019.3.4. |
@catflyflyfly It took me a whole day to solve this problem! I did not come across that stackoverflow solution. That would have been a great help. Also, make sure to have the "overriding sbt version" unticked. Currently using the 2019 version no plans on updating. |
This is a continuation of coursier#212 and coursier#223 Ref coursier/coursier#1541 Ref sbt/sbt#4707 Ref sbt/sbt#5374 Ref sbt/sbt#5501 coursier#212 fixed the resolve, but did not handle missing sources during fetch. This attempts to fix that.
Confirmed that this is still an issue on sbt 1.3.13. I haven't tried |
Can confirm that this is still an issue (a possible regression after #5374 got fixed?). mkdir -p project
echo "sbt.version=1.3.13" > ./project/build.properties
echo 'addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.2")' > ./project/plugins.sbt
sbt -ivy ./target/ivy -sbt-dir ./target/sbt updateSbtClassifiers A temporary nasty workaround I found is to downgrade sbt version and bump it again: echo "sbt.version=1.3.6" > ./project/build.properties
sbt -ivy ./target/ivy -sbt-dir ./target/sbt updateSbtClassifiers
echo "sbt.version=1.3.13" > ./project/build.properties
sbt -ivy ./target/ivy -sbt-dir ./target/sbt updateSbtClassifiers I guess cc. @alexarchambault |
@andreaTP This was fixed in sbt-coursier |
Locally, the following works fine for me:
|
This is a major problem for me working on a big project at work. Hope to resolve this soon |
Using Intellij 2020.3, sbt 1.3.13, check "Download: Library sources", regardless of Intellij setting "Allow overriding sbt version", it gives error:
Currently workaround:
EDIT Setting |
Anyone who is watching this thread, I followed @alexarchambault's instructions above in my own repo. So once I ran |
@dispalt Constantly facing I am working on a windows environment. |
When you check "Allow overriding sbt version", it means Intellij will pick the latest version and whatever you set in build.properties will be ignored. So you likely is actually running a sbt version higher than 1.3.13. Check the actual version when you run sbt shell. |
Actually no, when you run IntelliJ sbt shell they run their internal sbt version for that shell, if you want to run your own you check this box to make shell run your version, you can be sure about this by changing your build.properties, so it will clearly say that for you in the events tab. |
No It's the opposite of that: |
I take it this is fixed in 1.4.0-RC1? |
On one of my projects suffering from this error using 1.3.10, updating sbt.version to 1.4.0-RC1 makes it no longer fail |
I can still reproduce this issue with Intellij 2020.2 Download library sources on and sbt 1.4.0-RC1 |
I am still having the same issue.
|
It seemed some network specific problem in my case. |
Same issue on Windows: as workaround I've removed jars from local maven repository (described here: #5374 ) and works for me. |
To be honest, this issue and how they ignoring these kinds of critical issues cross 15 versions (since 1.3.7 until now 1.4.7) and not re-open #5374 give me more reasons to totally trash sbt from my recommendation, personally in my company 100% I'm going to gradle or maven next. Spring Boot, here I come. |
I agree. This is breaking bug and it should have been priotitized higher than other features. Somehow it is not getting any attention. |
There's no "they". As far as I know, I'm the only person who monitors sbt issues to triage, and I've been ignoring this issue because with all the comments and history, it's not clear to me what exactly is the problem here. The original reproduction step says to use sbt new playframework/play-scala-seed.g8. I've checked downloading sbt sources, and I'm able to load the project using IntelliJ, and jump to implementation from build.sbt. |
@eed3si9n People are talking about a related issue that has the same error message (but different causes I guess). I was referring to the issue:
(when there's a library dependency with only binary jar but no source) I can create a new issue for this if you prefer. If you can point out where the issue in the code, I can try to help to create a PR (it is hard for me to find myself as I am not familiar with the code base). Community help are always there just need to ask. |
Yea. If let's close this and start a new one with actual repro steps.
is listed as a workaround, it seems like we're dealing with different issue, like local proxy actually not configured to handle Ivy layout repositories. |
Looks like a bug that was present long time ago in sbt. I think it might be related to sbt/sbt#5501 Running update manually fixes things.
Looks like a bug that was present long time ago in sbt. I think it might be related to sbt/sbt#5501 Running update manually fixes things.
steps
sbt version: 1.3.6
scala version: 2.13.1
java version : "1.8.0_241"
problem
Below is my build.sbt file
expectation
SBT project should have synced successfully
notes
Already tried the latest version (1.3.9)
The text was updated successfully, but these errors were encountered: