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

Error during Gradle Build: Failed to resolve: com.revenuecat.purchases:purchases-hybrid-common:7.3.0 #151

Open
mauriciomatsubara opened this issue Nov 15, 2023 · 12 comments

Comments

@mauriciomatsubara
Copy link

Gradle sync fails when using:

"@revenuecat/purchases-capacitor": "^7.1.0",

Gradle version: 8.1.2

ionic info:

Ionic:

Ionic CLI : 7.1.1 (/Users/xxx/Library/pnpm/global/5/.pnpm/@Ionic+cli@7.1.1/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.5.4
@angular-devkit/build-angular : 16.2.10
@angular-devkit/schematics : 16.2.10
@angular/cli : 16.2.10
@ionic/angular-toolkit : 10.0.0

Capacitor:

Capacitor CLI : 5.5.1
@capacitor/android : 5.5.1
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1

Cordova:

Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Cordova Platforms : not available
Cordova Plugins : not available

Utility:

cordova-res : not installed globally
native-run (update available: 2.0.0) : 1.7.3

System:

Android SDK Tools : 26.1.1 (/Users/mauricio/Library/Android/sdk/)
NodeJS : v18.18.2 (/Users/mauricio/.nvm/versions/node/v18.18.2/bin/node)
npm : 9.8.1
OS : macOS Unknown
Xcode : Xcode 15.0.1 Build version 15A507

@NachoSoto
Copy link
Contributor

Thanks for the report! Are you getting any other message/error associated with this?

This version is available https://mvnrepository.com/artifact/com.revenuecat.purchases/purchases-hybrid-common/7.3.0

@mauriciomatsubara
Copy link
Author

Thanks for the response. Do you know a way to force Android Studio get a new version fron the link you mentioned?

image

@mauriciomatsubara
Copy link
Author

Just thinking outloud here:

Would it be possible to publish a purchases-capacitor v7.1.1 that uses purchases-hybrid-common-7.3.2 ?

This file exists: https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.2/purchases-hybrid-common-7.3.2.pom
Which looks like ok as well: https://mvnrepository.com/artifact/com.revenuecat.purchases/purchases-hybrid-common/7.3.2 (by the way, 7.3.3 is not)

At this point even if we opt not to upgrade to purchases-capacitor v7.1, for some reason, it ends up upgrading itself (using ionic/angular). The final result is that the dependency fails to resolve and the project doesn't even build in Android Studio.

@NachoSoto
Copy link
Contributor

That's weird, but yes we just released version 7.1.1. Can you let us know if that works?

@mauriciomatsubara
Copy link
Author

Really appreciate it! I'll test and let you know the results.

@mauriciomatsubara
Copy link
Author

Thanks again, but it's not working yet. I noticed it is pointing to purchases-hybrid-common-7.3.3, which is unvailable for download (for some reason). I think that if you point it to 7.3.2, it will work, but not sure if that version is the ideal one. For us, it suffices as we are not using paywalls at the moment.

image

@mauriciomatsubara
Copy link
Author

@NachoSoto Sorry to bother again, but just wanted to bring this to your attention:
Screenshot 2023-11-15 at 17 34 43

@NachoSoto
Copy link
Contributor

That's probably a propagation issue from Maven. 7.3.3 is here: https://central.sonatype.com/artifact/com.revenuecat.purchases/purchases-hybrid-common/versions

@mauriciomatsubara
Copy link
Author

@NachoSoto I appreciate the attention to this topic. The issue still persists for me. I wonder if other developers are facing the same problem. Here is a log from a prompt compilation that shows multiple attempts to get the pom file:

[capacitor]         > Task :app:preBuild UP-TO-DATE
.
(other logs removed for clarity)
.
[capacitor]         > Task :revenuecat-purchases-capacitor:preBuild UP-TO-DATE
[capacitor]         > Task :revenuecat-purchases-capacitor:preDebugBuild UP-TO-DATE
[capacitor]         > Task :revenuecat-purchases-capacitor:writeDebugAarMetadata UP-TO-DATE
[capacitor]         > Task :app:checkDebugAarMetadata FAILED
[capacitor]
[capacitor]         FAILURE: Build failed with an exception.
[capacitor]
[capacitor]         * What went wrong:
[capacitor]         Execution failed for task ':app:checkDebugAarMetadata'.
[capacitor]         > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[capacitor]         > Could not resolve com.revenuecat.purchases:purchases-hybrid-common:7.3.3.
[capacitor]         Required by:
[capacitor]         project :app > project :revenuecat-purchases-capacitor
[capacitor]         > Could not resolve com.revenuecat.purchases:purchases-hybrid-common:7.3.3.
[capacitor]         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Could not GET 'https://dl.google.com/dl/android/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Broken pipe
[capacitor]         > Could not resolve com.revenuecat.purchases:purchases-hybrid-common:7.3.3.
[capacitor]         > Could not get resource 'https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Could not GET 'https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Broken pipe
[capacitor]         > Could not resolve com.revenuecat.purchases:purchases-hybrid-common:7.3.3.
[capacitor]         > Could not get resource 'https://jcenter.bintray.com/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Could not GET 'https://jcenter.bintray.com/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Broken pipe
[capacitor]         > Could not resolve com.revenuecat.purchases:purchases-hybrid-common:7.3.3.
[capacitor]         > Could not get resource 'https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Could not GET 'https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Broken pipe
[capacitor]
[capacitor]         * Try:
[capacitor]         > Run with --stacktrace option to get the stack trace.
[capacitor]         > Run with --info or --debug option to get more log output.
[capacitor]         > Run with --scan to get full insights.
[capacitor]
[capacitor]         * Get more help at https://help.gradle.org
[capacitor]
[capacitor]         Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[capacitor]
[capacitor]         You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[capacitor]
[capacitor]         See https://docs.gradle.org/8.0.2/userguide/command_line_interface.html#sec:command_line_warnings
[capacitor]
[capacitor]         BUILD FAILED in 13s
[capacitor]         22 actionable tasks: 2 executed, 20 up-to-date
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.

        capacitor run android --no-sync --target
        adb-0075480342-ZoHjvR._adb-tls-connect.... exited with exit code 1.

        Re-running this command with the --verbose flag may provide more
        information.

@NachoSoto
Copy link
Contributor

> [capacitor]         > Could not GET 'https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom'.
[capacitor]         > Broken pipe

That's weird. I can fetch that myself:

http https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom
HTTP/1.1 200 OK

Can you try curl https://repo.maven.apache.org/maven2/com/revenuecat/purchases/purchases-hybrid-common/7.3.3/purchases-hybrid-common-7.3.3.pom from the command line?

@mauriciomatsubara
Copy link
Author

mauriciomatsubara commented Nov 17, 2023

Hi @NachoSoto, the frustrrating part is that curl works but when Android tries to download it, it doesn't. But since yesterday, some things changed I I'm able to download some of the files on the browser.

Is there any way to configure Android Studio to avoid using any internal cache it may have? I've used all options on File | Invalidate Caches... and even changed my local DNS to 1.1.1.1 and google dns, on the chance it could be a lack of dns update. Kinda running out of ideas here...

Screenshot 2023-11-17 at 08 33 16

Screenshot 2023-11-17 at 08 35 03

image

image

@NachoSoto
Copy link
Contributor

I see this is listed as a known issue: https://developer.android.com/studio/known-issues#broken_pipe

Can you see if that helps?

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

2 participants