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

[SOLVED] Could not find com.wei.android.lib:fingerprintidentify:1.2.6 during compiling in RN 0.65.1 #192

Closed
aaroncornelissen opened this issue Sep 1, 2021 · 40 comments
Labels

Comments

@aaroncornelissen
Copy link

aaroncornelissen commented Sep 1, 2021

HERE IS THE SOLUTION:

In your package.json, alter the dependency on this module like so to get the non-jcenter version that has not been released yet:

-    "react-native-fingerprint-scanner": "^6.0.0",
+    "react-native-fingerprint-scanner": "git+https://github.com/hieuvp/react-native-fingerprint-scanner.git#9cecc0db326471c571553ea85f7c016fee2f803d",

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.wei.android.lib:fingerprintidentify:1.2.6.
     Required by:
         project :app > project :react-native-fingerprint-scanner

Since I've upgraded my RN from 0.64.2 to 0.65.1 a problem occured with compiling my app for android.

Does someone know how to download the missing library?

Many thanks.

@mikehardy
Copy link
Collaborator

If you have followed upgrade-helper and removed the jcenter maven repository, I believe you will need to add it back to your build.gradle file.

Can you test if that fixes your build?

react-native core no longer requires jcenter I believe, but there are many native modules wrapping libraries that are still only available on jcenter.

@eneaaliko0

This comment has been minimized.

@mikehardy

This comment has been minimized.

@aaroncornelissen

This comment has been minimized.

@eneaaliko0
Copy link

With jcenter() it works. Thank you @mikehardy !

@mikehardy

This comment has been minimized.

@aaroncornelissen

This comment has been minimized.

@mikehardy

This comment has been minimized.

@mikehardy mikehardy pinned this issue Sep 11, 2021
@mikehardy mikehardy changed the title Could not find com.wei.android.lib:fingerprintidentify:1.2.6 during compiling in RN 0.65.1 [SOLVED] Could not find com.wei.android.lib:fingerprintidentify:1.2.6 during compiling in RN 0.65.1 Sep 11, 2021
@i-wizard
Copy link

Yes, adding jcenter() to build.gradle works

@matteodanelli
Copy link
Contributor

Re-adding jcenter is only a temporary solution, since jcenter will be offline in February 2022.
😞

@mikehardy
Copy link
Collaborator

@matteodanelli no, it won't. They will leave it up indefinitely for read access. If you know differently please please provide a reference from them as the last time I checked (and I check frequently) they say read-only indefinitely.

@matteodanelli
Copy link
Contributor

matteodanelli commented Dec 23, 2021

@mikehardy Right, I've missed the "read-only" update. Anyway, isn't better to move away from jcenter?
It's impossible to push update to libraries there.
Imho, the solution to drop jcenter isn't so bad.

@mikehardy
Copy link
Collaborator

@matteodanelli it's almost as if someone should propose a PR and we should merge it, in order to get rid of jcenter, oh wait #189 ;-)

Just needs a release. Would you like to help maintain the package and help get releases out the door? I'm pretty low on time. Or at minimum you could use the tip of the current main branch as a gitref in package.json and report your results, letting us know it is working or not, checking+protecting quality prior to release is most of the time required for release...

@matteodanelli
Copy link
Contributor

I understood your point.
However, on the current main branch jcenter wasn't completely removed. It has been removed partially in that MR.
I'm already testing in my app with patch-package the complete removal and I can do a PR.
Last, yes, I can help you with releases.

@mikehardy
Copy link
Collaborator

Oooo - I thought it was out completely with that one. Thanks for checking complete removal, excited for a PR to really remove it where needed! Thanks

@matteodanelli
Copy link
Contributor

Here the MR. Removed completely jcenter and replaced with jitpack where needed.
Tested also with the sample updated to RN 0.65.1, as pointed out in this issue.

@agestaun
Copy link

Hi, I cannot get the artifact from jitpack.

https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom

It returns not found.

@mikehardy
Copy link
Collaborator

That looks like the wrong URL. The dependency here is

implementation "com.github.uccmawei:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"

Looks great https://www.jitpack.io/com/github/uccmawei/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom

@agestaun
Copy link

agestaun commented Mar 24, 2022

@mikehardy My jenkins is trying to get that artifact though.

10:30:36 > Could not resolve com.wei.android.lib:fingerprintidentify:1.2.6. 10:30:36 Required by: 10:30:36 project :app > project :react-native-fingerprint-scanner 10:30:36 > Could not resolve com.wei.android.lib:fingerprintidentify:1.2.6. 10:30:36 > Could not get resource 'https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom'. 10:30:36 > Could not GET 'https://www.jitpack.io/com/wei/android/lib/fingerprintidentify/1.2.6/fingerprintidentify-1.2.6.pom'.

It's from the dependency you said. Do I forget any configuration?

@mikehardy
Copy link
Collaborator

mikehardy commented Mar 24, 2022

@agestaun using the git blame function you have at your disposal

https://github.com/matteodanelli/react-native-fingerprint-scanner/blame/master/android/build.gradle

You can deduce that the dependency was changed 8 months ago in matteodanelli@9158ace

And that commit has not been released, there have been no releases here recently though the package is alive

I think you'll need to depend on the most recent commit hash then, and treat it as a release in your package.json

This is the commit hash 54b06e1 (edit, corrected the URL just now)

This is a built in feature of npm/yarn, you just specify the repo URL with #<commit hash> at the end and it works.

@agestaun
Copy link

I saw that there have been no new versions recently and the jcenter was completely removed. I didn't want to point to a commit, but it's better than the crash I get when compiling.

Thank you mike.

@mikehardy
Copy link
Collaborator

Yeah, no alternative at the moment but the commit hash as reference. Need to get a release out here but been swamped :-)
At least from a build reproducibility perspective commit hashes are stable unique identifiers, no one can change the contents on that really, so it should be safe. Alternatively you can point to the existing most recent release and ingest the changes locally via patch-package if you have really strict build reproducibility / security concerns

@noumantahir
Copy link

noumantahir commented Jul 26, 2022

perhaps a slightly better solution instead adding whole jcenter() .... in project level build.gralde file add...

        jcenter() {
            content {
                // these groups only available in jcenter otherwise we don't want to rely on jcenter.
                .
                .
                .
                includeModule("com.wei.android.lib", "fingerprintidentify") // <== Add this line
            }
        }

@mikehardy
Copy link
Collaborator

@noumantahir that's a nice trick, should have a non-trivial positive impact on the artifact resolution phase build performance

@StephenBanz
Copy link

jcenter() has gone offline😢
is there anything we can do on the ap side

https://bintray.com/
https://jcenter.bintray.com/

@DenisKozhevnikov
Copy link

jcenter() has gone offline😢 is there anything we can do on the ap side

https://bintray.com/ https://jcenter.bintray.com/

try replacing in node_modules/react-native-fingerprint-scanner/build.gradle
implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
->
implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

@mikehardy
Copy link
Collaborator

Does this not work, from above? Depending on the commit hash?


I think you'll need to depend on the most recent commit hash then, and treat it as a release in your package.json

This is the commit hash 54b06e1 (edit, corrected the URL just now)

This is a built in feature of npm/yarn, you just specify the repo URL with # at the end and it works.

@Overtorment
Copy link

i fixed it using latest commit in my package.json
(but patching implementation in build.gradle also works, i tried)

index afb0555..55617e9 100644
--- a/package.json
+++ b/package.json
@@ -81,7 +81,7 @@
     "react-native-default-preference": "^1.4.4",
     "react-native-device-info": "^10.2.0",
     "react-native-elements": "^3.4.2",
-    "react-native-fingerprint-scanner": "^6.0.0",
+    "react-native-fingerprint-scanner": "git+https://github.com/hieuvp/react-native-fingerprint-scanner.git#9cecc0db326471c571553ea85f7c016fee2f803d",

@StephenBanz
Copy link

Thank you for all the answers
We also found a Jcenter mirror which worked fine

maven { url "https://maven.aliyun.com/repository/jcenter" }

@Sanyamis22
Copy link

Could not find com.wei.android.lib:fingerprintidentify:1.2.6.
I am stuck with this issue I have tried with jcenter() and without jcenter() and its not working
its throwing the same error while building
Can anyone help me out for this issue

@valery-lavrik
Copy link

it's already 2023, and the problem has not been solved? Why can't the official repository fix it?

@mikehardy
Copy link
Collaborator

@valery-lavrik you do not appear to be the primary maintainer on any repositories, maintain a repo for a few years, then come back and let us know

@jet2018
Copy link

jet2018 commented Jun 8, 2023

jcenter() has gone offline😢 is there anything we can do on the ap side
https://bintray.com/ https://jcenter.bintray.com/

try replacing in node_modules/react-native-fingerprint-scanner/build.gradle implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}" -> implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

Worked for me.

//    implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
    implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

ioeldev pushed a commit to ioeldev/react-native-fingerprint-scanner that referenced this issue Nov 5, 2023
…mment. This fixes the compiling issue (Could not find com.wei.android.lib:fingerprintidentify:1.2.6)
@saniyatariq
Copy link

jcenter() has gone offline😢 is there anything we can do on the ap side
https://bintray.com/ https://jcenter.bintray.com/

try replacing in node_modules/react-native-fingerprint-scanner/build.gradle implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}" -> implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

Thanks now working

@bosz
Copy link

bosz commented May 12, 2024

i fixed it using latest commit in my package.json (but patching implementation in build.gradle also works, i tried)

index afb0555..55617e9 100644
--- a/package.json
+++ b/package.json
@@ -81,7 +81,7 @@
     "react-native-default-preference": "^1.4.4",
     "react-native-device-info": "^10.2.0",
     "react-native-elements": "^3.4.2",
-    "react-native-fingerprint-scanner": "^6.0.0",
+    "react-native-fingerprint-scanner": "git+https://github.com/hieuvp/react-native-fingerprint-scanner.git#9cecc0db326471c571553ea85f7c016fee2f803d",

This works well, thank you.

@Wilberth1501
Copy link

love you bro

@minhlhc98
Copy link

jcenter() has gone offline😢 is there anything we can do on the ap side
https://bintray.com/ https://jcenter.bintray.com/

try replacing in node_modules/react-native-fingerprint-scanner/build.gradle implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}" -> implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

Thats awesome. You saved my day, thank bro

CrisTofani pushed a commit to pagopa/io-app that referenced this issue Aug 29, 2024
…ner dependency (#6131)

## Short description
This PR fixes an unresolvable dependency during Android release.

## List of changes proposed in this pull request
- See
hieuvp/react-native-fingerprint-scanner#192

## How to test
Run the release workflow
@DiegoFawr
Copy link

jcenter() has gone offline😢 is there anything we can do on the ap side
https://bintray.com/ https://jcenter.bintray.com/

try replacing in node_modules/react-native-fingerprint-scanner/build.gradle implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}" -> implementation 'com.github.uccmawei:FingerprintIdentify:1.2.6'

Fantastic, thank you

@sam9010
Copy link

sam9010 commented Oct 1, 2024

FingerprintIdentify

plz help me
I set this config but I have another bug

Execution failed for task ':react-native-fingerprint-scanner:generateReleaseRFile'.

Could not resolve all files for configuration ':react-native-fingerprint-scanner:releaseCompileClasspath'.
Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0).
Searched in the following locations:
https://jcenter.bintray.com/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar

@atifaziz1
Copy link

I am facing the issue. I have tried all suggestion. (add jcenter, update react-native-fingerprint-scanner/build.gradle, update package.json) nothing is working.

`7: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugNativeLibs'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.wei.android.lib:fingerprintidentify:1.2.6.`

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

No branches or pull requests