-
Notifications
You must be signed in to change notification settings - Fork 417
Handle null entries in gradle/checksums.json #2775
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
Conversation
If there are connection errors during the build, it can happen that the `checksums.json` contains `null` entries. These currently result in a logged error: PM Initialization failed Not a JSON Object: null java.lang.IllegalStateException: Not a JSON Object: null at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:101) at org.eclipse.jdt.ls.internal.gradle.checksums.WrapperValidator.loadInternalChecksums(WrapperValidator.java:183) at org.eclipse.jdt.ls.internal.gradle.checksums.WrapperValidator.checkWrapper(WrapperValidator.java:97) at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.getGradleDistribution(GradleProjectImporter.java:308) at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.getBuildConfiguration(GradleProjectImporter.java:441) at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.startSynchronization(GradleProjectImporter.java:408) at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importDir(GradleProjectImporter.java:298) at org.eclipse.jdt.ls.core.internal.managers.GradleProjectImporter.importToWorkspace(GradleProjectImporter.java:210) at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:152) at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:114) at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:256) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
We merged a change about downloading checksums in parallel recently: #2759 Not sure if this is caused by that change. Did you observe a corrupted gradle/checksums.json in the release build? |
Looks like it could be caused by a1e0914#diff-45482730788077c6b3eaa2accc0cc6f3dbc3016815b9563c397e3b22525f37e8R101 ? I haven't been able to reproduce though. @mfussenegger are you able to reproduce this.. and if so, how did the |
For me it reproduces pretty much all the time. The entries which are missing is changing from build to build An example snippet of some missing bits:
I just tried with 9752381 (the commit before the parallel download) and there I don't get
So the file before the change contained entries that the new one is missing. |
Added some logging, it can resolve the
The more often I run it, the worse it seems to become. Maybe I'm hitting some kind of rate limit on the gradle.org side? |
Looking up the error it seems more in the realm of some local configuration option (maybe for TLS?) might be something services.gradle.org doesn't support, hence the failure at handshake. I tried playing with |
test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfussenegger were you able to determine what was causing the issue for you ? Does it still occur ? I think this is worth merging.
No not really. I still think it is an issue on the server/cdn side given that it works if the requests are made sequential and I otherwise don't experience any SSL issues or network connectivity errors.
Yes. |
It might also be related to the number concurrent requests that the server is willing to handle from a given client. Though it wouldn't explain why it works in some instances. |
This is a follow up to eclipse-jdtls#2775 I frequently experience build failures due to connection errors. After some debugging with wireshark, netstat and `-Djdk.httpclient.HttpClient.log=all` I suspect that I'm getting rate throttled. Somewhere between 150 and 200 requests, the connections either get closed by the remote or almost stall. This excludes nightly, snapshot, rc and broken releases, which would mitigate the issue somewhat. The biggest impact has cutting out RC releases: total versions: 386 without nightly: 385 without RCs: 173 without broken: 172 Note that this still doesn't completely fix the issue for me, but it helsp reduce the chance for it happening.
This is a follow up to eclipse-jdtls#2775 I frequently experience build failures due to connection errors. After some debugging with wireshark, netstat and `-Djdk.httpclient.HttpClient.log=all` I suspect that I'm getting rate throttled. Somewhere between 150 and 200 requests, the connections either get closed by the remote or almost stall. To mitigate the issue, this excludes nightly, snapshot, rc and broken gradle releases. The biggest impact has cutting out RC releases: total versions: 386 without nightly: 385 without RCs: 173 without broken: 172 Note that this still doesn't completely fix the issue for me, but it helsp reduce the chance for it happening.
This is a follow up to eclipse-jdtls#2775 I frequently experience build failures due to connection errors. After some debugging with wireshark, netstat and `-Djdk.httpclient.HttpClient.log=all` I suspect that I'm getting rate throttled. Somewhere between 150 and 200 requests, the connections either get closed by the remote or almost stall. To mitigate the issue, this excludes nightly, snapshot, rc and broken gradle releases. The biggest impact has cutting out RC releases: total versions: 386 without nightly: 385 without RCs: 173 without broken: 172 Note that this still doesn't completely fix the issue for me, but it helps reduce the chance for it happening.
If there are connection errors during the build, it can happen that the
checksums.json
containsnull
entries.These currently result in a logged error: