Skip to content

Received status code 401 from server: Unauthorized #226

Closed

Description

@rakmobility

Building for Android and getting:
Required by:
project :app > project :react-native-view-pdf
> Could not resolve com.github.barteksc:***-pdf-viewer:2.8.2.
> Could not get resource 'https://jitpack.io/com/github/barteksc/***-pdf-viewer/2.8.2/***-pdf-viewer-2.8.2.pom'.
> Could not GET 'https://jitpack.io/com/github/barteksc/***-pdf-viewer/2.8.2/***-pdf-viewer-2.8.2.pom'. Received status code 401 from server: Unauthorized

Could not resolve com.henninghall.***:NumberPickerView:1.1.1.

"react-native-view-pdf": "0.13.2",

Using below repos:
repositories {
mavenLocal()
mavenCentral()
google()
maven { url 'https://maven.google.com' }
maven { url("https://jitpack.io") }
maven {
url "https://maven.fabric.io/public"
}
}

Activity

  1. ConorLindsay94 commented on May 17, 2022

    @ConorLindsay94

    Exact same issue here - using latest version

  2. ConorLindsay94 commented on May 17, 2022

    @ConorLindsay94

    According to #204 - This is due to not including jcenter() in the build.gradle file. Will this not be an issue with jcenter shutting down?

  3. calintamas commented on May 19, 2022

    @calintamas

    Indeed, adding jcenter() to android/build.gradle fixes the issue. They say that jcenter is in readonly mode indefinitely, so I suppose it should be fine for now.

    // android/build.gradle
    
    allprojects {
        repositories {
            ...
            jcenter()
        }
    }
  4. JoseMurilloc commented on Jun 9, 2022

    @JoseMurilloc

    According to #204 - This is due to not including jcenter() in the build.gradle file. Will this not be an issue with jcenter shutting down?

    I'm removing jcenter, any update on this solution?

  5. rumax commented on Jun 9, 2022

    @rumax
    Owner

    any update on this solution?

    Did you try an alternative solution mentioned in readme?

    Barteksc PdfViewer uses JCenter, which should be read-only indefinitely, but in case the host project does not use it, there is a possibility to use mhiew/AndroidPdfViewer which is a fork published on mavenCentral.

  6. stale commented on Jul 10, 2022

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  7. Nayan014 commented on Aug 23, 2024

    @Nayan014

    After trying numerous solutions, this one finally worked for me. Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions