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

Repositories down / Failed to resolve dependency #5225

Closed
kmansoft opened this issue Dec 9, 2018 · 46 comments
Closed

Repositories down / Failed to resolve dependency #5225

kmansoft opened this issue Dec 9, 2018 · 46 comments
Assignees
Labels

Comments

@kmansoft
Copy link

kmansoft commented Dec 9, 2018

Issue description

As of a few hours ago, my builds are failing to find exoplayer 2.8+ (I also tried 2.9+, no difference) in Google repository. Never seen that before, always worked fine.

Reproduction steps

It's an Android gradle project.

Relevant lines:

allprojects {
    repositories {
        google()
        jcenter()
    }
}

ext {
    exoplayer_version = '2.8+'
}

implementation 'com.google.android.exoplayer:exoplayer-core:' + exoplayer_version,
implementation 'com.google.android.exoplayer:exoplayer-dash:' + exoplayer_version,

Output:

> Could not find any matches for com.google.android.exoplayer:exoplayer-core:2.8+ as no versions of com.google.android.exoplayer:exoplayer-core are available.
  Required by:
      project :
> Could not find any matches for com.google.android.exoplayer:exoplayer-dash:2.8+ as no versions of com.google.android.exoplayer:exoplayer-dash are available.
  Required by:
      project :

Link to test content

I am able to reproduce with demos/main if I edit its build.gradle like this:

ext {
    exoplayer_version = '2.9+'
}

dependencies {
    implementation 'com.android.support:support-annotations:' + supportLibraryVersion
    //implementation project(modulePrefix + 'library-core')
    //implementation project(modulePrefix + 'library-dash')

    // Do not reference projects, try to pull in from (Google) repository
    implementation ('com.google.android.exoplayer:exoplayer-core:' + exoplayer_version)
    implementation ('com.google.android.exoplayer:exoplayer-dash:' + exoplayer_version)

    implementation project(modulePrefix + 'library-hls')
    implementation project(modulePrefix + 'library-smoothstreaming')
    implementation project(modulePrefix + 'library-ui')
    withExtensionsImplementation project(path: modulePrefix + 'extension-ffmpeg')
    withExtensionsImplementation project(path: modulePrefix + 'extension-flac')
    withExtensionsImplementation project(path: modulePrefix + 'extension-ima')
    withExtensionsImplementation project(path: modulePrefix + 'extension-opus')
    withExtensionsImplementation project(path: modulePrefix + 'extension-vp9')
    withExtensionsImplementation project(path: modulePrefix + 'extension-rtmp')
}

Output:

> Could not find any matches for com.google.android.exoplayer:exoplayer-core:2.9+ as no versions of com.google.android.exoplayer:exoplayer-core are available.
  Searched in the following locations:
...
    - https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-core/maven-metadata.xml
    - https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-core/
    - https://jcenter.bintray.com/com/google/android/exoplayer/exoplayer-core/maven-metadata.xml
    - https://jcenter.bintray.com/com/google/android/exoplayer/exoplayer-core/
  Required by:
      project :demo

Editing build.gradle was necessary because normally demos/main brings in exoplayer libraries from the same (local file system) repository / build hierarchy.

Full file with edits available here:

https://gist.github.com/kmansoft/e90624a702574fa9d7ab414dc05170c7

Version of ExoPlayer being used

2.8+
Same with 2.9+

Device(s) and version(s) of Android being used

N/A - build problem, not runtime problem

Maybe this is the reason?

https://dl.google.com/dl/android/maven2/com/google/android/exoplayer/exoplayer-core/maven-metadata.xml

Gives me a "404" - same with exoplayer-dash instead of exoplayer-core.

@Jokaerro
Copy link

Jokaerro commented Dec 9, 2018

Seems like this repos excluded
https://jcenter.bintray.com/com/google/android/exoplayer/

@ojw28
Copy link
Contributor

ojw28 commented Dec 9, 2018

Bintray seem to have stopped mirroring exoplayer-core and exoplayer-dash to JCenter, which is why they don't appear as folders in the link above. I'm not sure why that happened; I've asked them to start mirroring them again.

@JcMinarro

This comment has been minimized.

@Jokaerro
Copy link

Jokaerro commented Dec 9, 2018

You may clone the repo locally and put it in dependencies
https://github.com/google/ExoPlayer#locally

@knollori

This comment has been minimized.

@sergiocasero

This comment has been minimized.

@Josepdal

This comment has been minimized.

@X-Kent

This comment has been minimized.

@jmatsu
Copy link

jmatsu commented Dec 10, 2018

Google ExoPlayer namespace on bintray is still active so the following workaround works for me.

repositories {
    google()
    jcenter()
    maven {
        url 'https://google.bintray.com/exoplayer/'
    }
}

@jarrodrobins
Copy link

Thanks @jmatsu, your workaround has worked for me.

Well that was a waste of two hours.

@PatilManoj1717
Copy link

Added -

maven {
url 'https://google.bintray.com/exoplayer/'
}

but still not working

@vrublevskys
Copy link

Added -

maven {
url 'https://google.bintray.com/exoplayer/'
}

but still not working

Yes, not working for me too

@killeriukas
Copy link

killeriukas commented Dec 10, 2018

Still failing - can't use Facebook Audience Network.

Failed to fetch the following dependencies:
com.google.android.exoplayer:exoplayer-core:+
com.google.android.exoplayer:exoplayer-dash:+

Resolve failed due to com.google.android.exoplayer:exoplayer-core:r2.4.2 missing for com.facebook.android:audience-network-sdk:5.1.0, attempted to use com.google.android.exoplayer:exoplayer-core:r2.4.2, failed due to org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.google.android.exoplayer:exoplayer-core:r2.4.2.

Resolve failed due to com.google.android.exoplayer:exoplayer-dash:r2.4.2 missing for com.facebook.android:audience-network-sdk:5.1.0, attempted to use com.google.android.exoplayer:exoplayer-dash:r2.4.2, failed due to org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.google.android.exoplayer:exoplayer-dash:r2.4.2.

@PatilManoj1717
Copy link

Added -

maven {
url 'https://google.bintray.com/exoplayer/'
}

but still not working

Added -

maven {
url 'https://google.bintray.com/exoplayer/'
}

but still not working

Finally worked..

add above url to project-level gradle file in following section (allprojects-repositories-)

allprojects {
repositories {
google()
jcenter()
maven {
url 'https://google.bintray.com/exoplayer/'
}
}
}

@killeriukas
Copy link

killeriukas commented Dec 10, 2018

Added -
maven {
url 'https://google.bintray.com/exoplayer/'
}
but still not working

Added -
maven {
url 'https://google.bintray.com/exoplayer/'
}
but still not working

Finally worked..

add above url to project-level gradle file in following section (allprojects-repositories-)

allprojects {
repositories {
google()
jcenter()
maven {
url 'https://google.bintray.com/exoplayer/'
}
}
}

Exoplayer is a dependency for my Facebook Audience Network. I cannot change the repo. It's Unity play services resolver. That's my package:

<dependencies>
  <androidPackages>
    <androidPackage spec="com.google.ads.mediation:facebook:5.1.0.0">
      <repositories>
        <repository>https://jcenter.bintray.com/</repository>
      </repositories>
    </androidPackage>
    <androidPackage spec="com.facebook.android:audience-network-sdk:5.1.0">
      <repositories>
        <repository>https://jcenter.bintray.com/</repository>
      </repositories>
    </androidPackage>
  </androidPackages>

  <iosPods>
    <iosPod name="GoogleMobileAdsMediationFacebook" version="5.1.0.0">
      <sources>
        <source>https://github.com/CocoaPods/Specs</source>
      </sources>
    </iosPod>
  </iosPods>
</dependencies>

@ojw28 ojw28 changed the title Repositories down? Repositories down / Failed to resolve dependency Dec 10, 2018
@ojw28 ojw28 added the bug label Dec 10, 2018
@ojw28
Copy link
Contributor

ojw28 commented Dec 10, 2018

We have asked Bintray to restore the missing projects. In the meantime, adding:

maven {
    url 'https://google.bintray.com/exoplayer/'
}

to

allprojects {
    repositories {

in the project gradle file should serve as a temporary workaround for most use cases. I'm not sure about the Facebook Audience Network one.

Note: Please refrain from posting non-helpful comments such as "me too" on this thread; it just makes it harder for people to find the actual useful comments. Thanks.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 10, 2018

Since it's under official Google account can't this be now pushed to the Google Maven repository to avoid such issues? It's now officially supported by Gradle and most people already use it too.

@davidsoendoro
Copy link

I add an alternative repo as a temporary solution and it works while we are waiting for the jcenter repo to up again:

buildscript { 
    repositories {
        maven { url 'https://repo.spring.io/libs-release'}
        jcenter()
    }
}
allprojects {
    repositories {
        maven { url 'https://repo.spring.io/libs-release'}
        jcenter()
    }
}

Just make sure the alternative repo is before the jcenter so it is prioritized. Hope it helps.

@ojw28
Copy link
Contributor

ojw28 commented Dec 10, 2018

Since it's under official Google account can't this be now pushed to the Google Maven repository to avoid such issues?

I agree this is probably the best longer term solution for us. It'll probably require some changes to our release process though, so getting Bintray to restore the missing projects is going to be the short term fix.

@AndroidDeveloperLB
Copy link

@ojw28 Will this workaround work even in the future?
Can I safely use it in the long term?

@ojw28
Copy link
Contributor

ojw28 commented Dec 10, 2018

The workaround will be unnecessary as soon as the issue is fixed. If you choose to leave it in your gradle file regardless, I doubt it'd do any harm.

@Tolriq
Copy link
Contributor

Tolriq commented Dec 10, 2018

The workaround will be unnecessary as soon as the issue is fixed. If you choose to leave it in your gradle file regardless, I doubt it'd do any harm.

As a quick side note, only add repositories that you trust :) There's no signing or anything for libraries, and if you add a unknown repository you can end up with compromised code.

@stepango
Copy link

@ojw28

This comment has been minimized.

@ojw28 ojw28 closed this as completed Dec 10, 2018
@ojw28 ojw28 reopened this Dec 10, 2018
@Josepdal
Copy link

Josepdal commented Dec 10, 2018

It's working for me now.

@kmansoft
Copy link
Author

kmansoft commented Dec 10, 2018

https://jcenter.bintray.com/com/google/android/exoplayer/

worked for a while (had -core and -dash but not others like -hsl and so on).

But now is down again.

The requested path was not found.

Maybe they've decided to fully rebuild the mirror... Hopefully...

Meanwhile

https://google.bintray.com/exoplayer/

still works.

@ojw28
Copy link
Contributor

ojw28 commented Dec 10, 2018

As noted above, please refrain from posting non-helpful comments on this thread. It only serves to make the thread harder for others to follow. We've already stated multiple times we believe the root cause is with Bintray and that we've asked them to look at it. We've also made them aware that we're receiving a high volume of complaints.

@ojw28
Copy link
Contributor

ojw28 commented Dec 10, 2018

Confirmed this is not ExoPlayer specific. The broader is being tracked here.

@savvasdalkitsis
Copy link

So I got a tweet from bintray claiming that it was Google that asked them to pull the binaries:

https://twitter.com/geeky_android/status/1072276765404487680?s=19

This is interesting and worrying...

@savvasdalkitsis
Copy link

Update from Google on the thread above:

Hey everyone,

We understand this is a really painful situation right now for a lot of developers.  Removing packages from jCenter which are not replicated in Google's maven repo was an accident and a product of a miscommunication!  We're working on getting everything back into place. 

Please try and be patient with us and let's try and reserve comments on this thread for updates on the situation.   If you're affected by this issue and want to be heard, please click "Me too!" at the top of the page as a way of 'upvoting' this issue.

- Sam

https://issuetracker.google.com/issues/120759347#comment27

@kyungjoongo

This comment has been minimized.

@kyungjoongo

This comment has been minimized.

@ojw28
Copy link
Contributor

ojw28 commented Dec 11, 2018

The following packages are available again:

exoplayer-core
exoplayer-dash
exoplayer-hls
exoplayer-ui
extension-cronet
extension-gvr
extension-ima
exoplayer // (probably wont work until exoplayer-smoothstreaming is restored)

We have pending requests to Bintray to re-add the remaining 7 packages, so hopefully they will become available soon.

For those who are interested, there is a basic outline of what happened here. I'm concerned that it happened, but more so that it took such a long period of time to root cause and fix (the latter is still ongoing). Apologies for the significant inconvenience caused. We will be conducting a postmortem to learn how we can can prevent this kind of incident in the future. For ExoPlayer, the most obvious action item is to publish to GMaven (google()). I suspect this may be true for other affected projects as well, but I can only speak for ExoPlayer for now.

@noamtamim

This comment has been minimized.

@ojw28

This comment has been minimized.

@ojw28
Copy link
Contributor

ojw28 commented Dec 12, 2018

All packages are now restored. I've filed #5246 to track hosting ExoPlayer packages on GMaven.

@ojw28 ojw28 closed this as completed Dec 12, 2018
@dbrgn
Copy link

dbrgn commented Dec 12, 2018

40 "me too" comments but not a single "thanks" comment in this thread...

Thank you @ojw28 🙂

@AquilesCanta
Copy link
Contributor

aaaaawwwww

@AndroidDeveloperLB
Copy link

All is fine now? Thank you

@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests