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

Android build/installation error: Cannot download from bintray #295

Closed
MrShakes opened this issue Jan 16, 2022 · 9 comments
Closed

Android build/installation error: Cannot download from bintray #295

MrShakes opened this issue Jan 16, 2022 · 9 comments

Comments

@MrShakes
Copy link

After following the docs and installing the library I try to build and get the following error, seems bintray has been sunset:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.squareup.okhttp3:okhttp:3.12.13.
     Required by:
         project :app > com.facebook.react:react-native:0.64.0
         project :app > com.facebook.react:react-native:0.64.0 > com.squareup.okhttp3:okhttp-urlconnection:3.12.12
      > Skipped due to earlier error
   > Could not resolve app.notifee:core:+.
     Required by:
         project :app > project :notifee_react-native
      > Failed to list versions for app.notifee:core.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml.
            > Could not get resource 'https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
   > Could not resolve org.greenrobot:eventbus:3.2.0.
     Required by:
         project :app > project :notifee_react-native
      > Skipped due to earlier error
   > Could not resolve com.squareup.okhttp3:okhttp:3.12.13.
     Required by:
         project :app > project :notifee_react-native
      > Skipped due to earlier error

Stack:
@notifee/react-native: 4.0.1
react-native: 0.64

@MrShakes
Copy link
Author

Worked after an hour, bintray was down

@MrShakes
Copy link
Author

I keep periodically getting issues with accessing bintray when I build, can we bypass bintray please?

@MrShakes MrShakes reopened this Jan 17, 2022
@mikehardy
Copy link
Contributor

mikehardy commented Jan 17, 2022

@MrShakes you can, you need to update react-native though, it's out of control of this module. Use react-native 0.65 or greater. 0.66.4 is current now - https://react-native-community.github.io/upgrade-helper/

@whenmoon
Copy link

whenmoon commented Jan 18, 2022

@MrShakes you can, you need to update react-native though, it's out of control of this module. Use react-native 0.65 or greater. 0.66.4 is current now - https://react-native-community.github.io/upgrade-helper/

Hi @mikehardy - we are currently on react-native version 0.61.2 and likely to update to 0.63.4 in the near future but 0.65 is out of the question. Does Notifee only support 0.65 and higher and do you suggest those versions because jcenter is removed from Android templates?

We are getting this error which I believe to be the same:

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve app.notifee:core:+.
     Required by:
         project :app > project :notifee-react-native
      > Failed to list versions for app.notifee:core.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml.
            > Could not get resource 'https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/app/notifee/core/maven-metadata.xml'.
                  > Read timed out

We can remove the dependency on jcenter but would like to know if it's hosted on some other maven repo - is there anyway it's possible?

Cheers!

@mikehardy
Copy link
Contributor

mikehardy commented Jan 18, 2022

I can only say you should really revisit the "out of the question" project constraint for moving forward to newer react-native versions.
react-native 0.65 is the first version that even builds with current Xcode versions (Xcode 12.5+)
react-native 0.65 is the first version that no longer depends on jcenter, which is flaky now

But I must emphasize: This is out of control of this module

Notifee does not use jcenter. The basic android build system for react-native < 0.65 uses Jcenter.

You must upgrade react-native to be rid of jcenter.

@whenmoon
Copy link

whenmoon commented Jan 19, 2022

Thanks for the feedback @mikehardy - like I said, we can bypass jcenter in react-native 0.61.2 (we already do), using 0.65 is not possible for us. If notifee does not use jcenter, then why do we only get these errors after installing notifee? In the notifee docs, it says that 0.60.0+ is supported, is that not the case? If you do support 0.60 then there must be a solution.. Many thanks!

@mikehardy
Copy link
Contributor

Find jcenter in our source tree (clone it, run simple recursive grep), and we can continue searching for solutions here. Otherwise your problem is elsewhere

@mikehardy
Copy link
Contributor

Also worth noting, we could be compatible with react-native 0.54, and it would still not work. Because react native that old won't work

@mikehardy
Copy link
Contributor

All false positives from test fixtures and the like. jcenter is not in use. Notifee is jcenter-clean.


mike@osxvm:~/work/Invertase/notifee (main) % grep -r jcenter *
node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/cavy-native-reporter/android/build.gradle:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/@react-native-firebase/app/CHANGELOG.md:- **all, android:** purge jcenter() from android build ([2c6a6a8](https://github.com/invertase/react-native-firebase/commit/2c6a6a82ec363fd948ea880fd397acb886c97453))
node_modules/@notifee/tests-react-native/node_modules/@react-native-firebase/messaging/CHANGELOG.md:- **all, android:** purge jcenter() from android build ([2c6a6a8](https://github.com/invertase/react-native-firebase/commit/2c6a6a82ec363fd948ea880fd397acb886c97453))
node_modules/@notifee/tests-react-native/node_modules/jsc-android/README.md:        jcenter()
node_modules/@notifee/tests-react-native/node_modules/jsc-android/README.md:        jcenter()
packages/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
packages/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
packages/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
packages/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
tests_react_native/node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
tests_react_native/node_modules/@notifee/react-native/plugin/__tests__/fixtures/project.build.gradle:        jcenter()
tests_react_native/node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
tests_react_native/node_modules/@notifee/react-native/plugin/__tests__/__snapshots__/androidProjectBuild.test.ts.snap:        jcenter()
tests_react_native/node_modules/cavy-native-reporter/android/build.gradle:        jcenter()
tests_react_native/node_modules/@react-native-firebase/app/CHANGELOG.md:- **all, android:** purge jcenter() from android build ([2c6a6a8](https://github.com/invertase/react-native-firebase/commit/2c6a6a82ec363fd948ea880fd397acb886c97453))
tests_react_native/node_modules/@react-native-firebase/messaging/CHANGELOG.md:- **all, android:** purge jcenter() from android build ([2c6a6a8](https://github.com/invertase/react-native-firebase/commit/2c6a6a82ec363fd948ea880fd397acb886c97453))
tests_react_native/node_modules/jsc-android/README.md:        jcenter()
tests_react_native/node_modules/jsc-android/README.md:        jcenter()
mike@osxvm:~/work/Invertase/notifee (main) % 

How to fix your project https://blog.gradle.org/jcenter-shutdown
Some react-native specific information react-native-community/discussions-and-proposals#331 (comment)

Proof it works, even as far back as react-native 0.61.2 (though that was a mess: metro-react-native-babel-preset has issues, and you have to use Xcode 12.4, and who knows what incompatibilities that has with android 12 / iOS15 etc...)

https://github.com/mikehardy/rnfbdemo/blob/b3079ef2d394bb229e9a97dc1062e6cc9787c434/notifee-demo.sh

This issue is closed from a notifee perspective. jcenter is not in this module. It is out of our control.

@invertase invertase locked as resolved and limited conversation to collaborators Jan 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants