kotlin-toolkit icon indicating copy to clipboard operation
kotlin-toolkit copied to clipboard

I'm having an issue pulling com.github.edrlab.nanohttpd:nanohttpd:master-SNAPSHOT

Open alexwhb opened this issue 3 years ago • 4 comments

This is not a bug per se, just wanted to see if anyone else is experiencing an issue with this. Just randomly started happening out of the blue today. It has been working just fine for the last year or so.

Here's what my gradle build is saying: Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find nanohttpd-nanolets-master-SNAPSHOT.jar (com.github.edrlab.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT:nanohttpd-project-2.3.1-gc3b149e-77).

alexwhb avatar Oct 19 '22 02:10 alexwhb

Yeah, something changed with the nanohttpd repository. The current workaround, suggested in Slack, is using the below block in your root build.gradle.kts file (adjust if using groovy).

allprojects {
	configurations.all {
        resolutionStrategy.eachDependency {
            if (requested.group == "com.github.edrlab.nanohttpd" && requested.name == "nanohttpd") {
                useTarget("com.github.readium.nanohttpd:nanohttpd:master-SNAPSHOT")
            }
            if (requested.group == "com.github.edrlab.nanohttpd" && requested.name == "nanohttpd-nanolets") {
                useTarget("com.github.readium.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT")
            }
        }
    }
}

stevenzeck avatar Oct 19 '22 04:10 stevenzeck

Yeah, something changed with the nanohttpd repository. The current workaround, suggested in Slack, is using the below block in your root build.gradle.kts file (adjust if using groovy).

allprojects {
	configurations.all {
        resolutionStrategy.eachDependency {
            if (requested.group == "com.github.edrlab.nanohttpd" && requested.name == "nanohttpd") {
                useTarget("com.github.readium.nanohttpd:nanohttpd:master-SNAPSHOT")
            }
            if (requested.group == "com.github.edrlab.nanohttpd" && requested.name == "nanohttpd-nanolets") {
                useTarget("com.github.readium.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT")
            }
        }
    }
}

Thank you for the workaround, I also met this issue yesterday and now it work fine. Looking forward to the next update 😃

TheEnsis avatar Oct 19 '22 04:10 TheEnsis

I have the same issue, and workaround is not working

Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.github.readium.nanohttpd:nanohttpd:master-SNAPSHOT.
     Required by:
         project :app > project :my_project
         project :app > project :my_project > com.github.readium.kotlin-toolkit:readium-streamer:2.1.1
      > Skipped due to earlier error
   > Could not resolve com.github.readium.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT.
     Required by:
         project :app > project :my_project
         project :app > project :my_project > com.github.readium.kotlin-toolkit:readium-streamer:2.1.1
      > Skipped due to earlier error

m-ochyra avatar Oct 21 '22 08:10 m-ochyra

I have the same issue, and workaround is not working

probably related to jitpack server being down, check the GitHub issue. Very frustrating... 😕

paktalin avatar Oct 21 '22 09:10 paktalin

@m-ochyra Do you still have the issue with the workaround?

mickael-menu avatar Oct 24 '22 13:10 mickael-menu

There's a new 2.2.1 release for this issue. Make sure to follow the migration guide to upgrade.

Migration Guide

This hotfix release fixes an issue pulling a third-party dependency (NanoHTTPD) from JitPack.

After upgrading, make sure to remove the dependency to NanoHTTPD from your app's build.gradle file before building:

-implementation("com.github.edrlab.nanohttpd:nanohttpd:master-SNAPSHOT") {
-    exclude(group = "org.parboiled")
-}
-implementation("com.github.edrlab.nanohttpd:nanohttpd-nanolets:master-SNAPSHOT") {
-    exclude(group = "org.parboiled")
-}

:point_up: If you are stuck with an older version of Readium, you can use this workaround in your root build.gradle, as an alternative.

mickael-menu avatar Oct 24 '22 15:10 mickael-menu

@m-ochyra Do you still have the issue with the workaround?

No, I have no issue. It's working

m-ochyra avatar Oct 25 '22 04:10 m-ochyra

The problem is encountered again.

image

M-HARIS-97 avatar Dec 22 '22 12:12 M-HARIS-97

@M-HARIS-97 it looks like jitpack is having some sort of an outage, which is causing this issue. I'm sure it will resolved in the next few hours.

EDIT: their official status page says everything is operational, but I'm pretty sure the cake is a lie.

jspizziri avatar Dec 22 '22 13:12 jspizziri

The problem is encountered again. use the 2.2.1ver 1678155018(1)

MurasameAya avatar Mar 07 '23 02:03 MurasameAya

Upgrade to 2.3.0 which embeds NanoHTTPd as a JAR. You will need to remove any mention of NanoHTTPd from your build.gradle files.

mickael-menu avatar Mar 07 '23 07:03 mickael-menu

Also Readium (since 2.3.0) is now distributed in Maven Central.

mickael-menu avatar Mar 07 '23 07:03 mickael-menu