plumatic / plumbing

Prismatic's Clojure(Script) utility belt
1.49k stars 108 forks source link

Malformed \uxxxx encoding error via clojars artifact #148

Closed jeroenvandijk closed 1 year ago

jeroenvandijk commented 1 year ago

I'm using plumbing via a dependency (walkable), but I get an error due to the Plumbing dependency. I have been able to isolate it to the following command:

clj -Sdeps '{:deps {prismatic/plumbing {:mvn/version "0.6.0"}}}'
Error building classpath. Malformed \uxxxx encoding.
    at java.base/java.util.Properties.loadConvert(Properties.java:664)
    at java.base/java.util.Properties.load0(Properties.java:452)
    at java.base/java.util.Properties.load(Properties.java:405)
    at org.eclipse.aether.internal.impl.DefaultTrackingFileManager.read(DefaultTrackingFileManager.java:62)
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.read(DefaultUpdateCheckManager.java:523)
    at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkMetadata(DefaultUpdateCheckManager.java:273)
    at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:304)
    at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:183)
    at org.apache.maven.repository.internal.DefaultVersionRangeResolver.getVersions(DefaultVersionRangeResolver.java:198)
    at org.apache.maven.repository.internal.DefaultVersionRangeResolver.resolveVersionRange(DefaultVersionRangeResolver.java:148)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveVersionRange(DefaultRepositorySystem.java:253)
    at clojure.tools.deps.alpha.extensions.maven$resolve_version_range$fn__1072.invoke(maven.clj:54) 
....

Where as with deps it works fine:

clj -Sdeps '{:deps {io.github.prismatic/plumbing {:git/sha "e6f99d8f50789633559eb637df3362ed5f129035"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
io.github.prismatic/plumbing e6f99d8
  . prismatic/schema 1.2.0

I've tested it with Java 8 and 11.0.7 and Clojure CLI version 1.11.1.1182.

w01fe commented 1 year ago

Thanks for the report! Unfortunately I haven't ever seen this one before, and I won't have bandwidth to look into it right now myself. Hopefully someone else can chime in; or I'm happy to merge a fix when available and do a new release.

jeroenvandijk commented 1 year ago

Np, I understand. Others don't seem to have this issue. I'll close it for now. Here is some background https://clojurians.slack.com/archives/C6QH853H8/p1674070947154649

If I find the issue I'll post here again as well.

jeroenvandijk commented 1 year ago

So with the help of some clojurians it turned out to be a seemingly unrelated corrupt file in my ~/.m2 maven dir. Same issue as https://stackoverflow.com/a/69192826/105406 . After removing the corrupt line found by grep -rnw ~/.m2 -e '\u0000' things worked as expected again.

Specific solution here

Still not sure why this only happened with Plumbing so far!

w01fe commented 1 year ago

Thanks for the update! Please let us know if you track it down to anything specific inside plumbing.