Skip to content
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

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

Closed
alexwhb opened this issue Oct 19, 2022 · 12 comments

Comments

@alexwhb
Copy link

alexwhb commented Oct 19, 2022

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).

@stevenzeck
Copy link
Contributor

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")
            }
        }
    }
}

@TheEnsis
Copy link

TheEnsis commented Oct 19, 2022

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 😃

@m-ochyra
Copy link

m-ochyra commented Oct 21, 2022

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

@paktalin
Copy link

paktalin commented Oct 21, 2022

I have the same issue, and workaround is not working

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

@mickael-menu
Copy link
Member

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

@mickael-menu
Copy link
Member

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")
-}

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

@m-ochyra
Copy link

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

No, I have no issue. It's working

@M-HARIS-97
Copy link

The problem is encountered again.

image

@jspizziri
Copy link

jspizziri commented Dec 22, 2022

@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.

@MurasameAya
Copy link

MurasameAya commented Mar 7, 2023

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

@mickael-menu
Copy link
Member

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants