Exoplayer: Repositories down / Failed to resolve dependency

Created on 9 Dec 2018  路  46Comments  路  Source: google/ExoPlayer

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.

bug

Most helpful comment

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/'
    }
}

All 46 comments

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.

I'm having the same problem.
Any workaround meanwhile?

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

Hey any update when the repos will be back up?

Same issue here :(

Same... I cannot install Facebook ads not even with ExoPlayer#locally

Hell. Wanted to switch from MediaPlayer to exoplayer. Added dependencies. Got errors about missing core. Spent two hours to find out that it seems the error is not on my side.

Edit:
r2.2.0 seems to work for now

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/'
    }
}

Thanks @jmatsu, your workaround has worked for me.

Well that was a waste of two hours.

Added -

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

but still not working

Added -

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

but still not working

Yes, not working for me too

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.

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/'
}
}
}

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>

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.

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.

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.

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.

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

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.

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.

@ojw28 The workaround doesn't work for me. See attached video and sample project.

2018-12-10_13-28-23.zip
ExoPlayerTest.zip

@ojw28 any update from bintry about restoration of the missing repos(resolution of the issue)?

@AndroidDeveloperLB The workaround has worked in your case, because your project is resolving the dependency. You're hitting a different issue, the solution for which is already described in #5138.

@ojw28 Haha, I went back to the original issue I had before...
Sorry about that. Now it works fine.
Can you please add in the logs a better clue about the solution, though?

Also from that issue:

Aside: It's pretty unfortunate the failure mode is so obscure, but I don't think that's under our control.

@ojw28 Well it occurs even if the entire project is in Kotlin... So it's weird that I have to add Java related stuff...
Sorry for that, again.

I was able to fix the issue with my exoplayer. Thanks! but now i'm facing this issue with FlexBox

Failed to resolve: com.google.android:flexbox:0.3.2

FlexBox is unrelated to ExoPlayer (although if they also distribute via Bintray then it's possible they're encountering the same underlying issue).

It's working for me now.

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.

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.

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

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...

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

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}

app/build.gradle

android {
//add here
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}

}

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.

@ojw28 the link you provided is for Google employees only (requires an @google.com address).
Can you please paste the relevant info here? It is interesting, especially if we (as software publishers) can learn from it.

The link should work now.

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

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

Thank you @ojw28 :slightly_smiling_face:

aaaaawwwww

All is fine now? Thank you

Was this page helpful?
0 / 5 - 0 ratings