GooglePlayServicesComponents icon indicating copy to clipboard operation
GooglePlayServicesComponents copied to clipboard

[CastContext] Failed to load module from Google Play services. Cast will not work properly. Might due to outdated Google Play services. Ignoring this failure silently.

Open EmmanueleVilla opened this issue 5 years ago • 6 comments

Xamarin.Android Version (eg: 6.0):

10.1.3.7

Operating System & Version (eg: Mac OSX 10.11):

Mac OSX 10.15.2

Google Play Services Version (eg: 8.4.0):

71

Describe your Issue:

I've added the following packages to the solution: Xamarin.GooglePlayServices.Ads version="71.1720.1" Xamarin.GooglePlayServices.Ads.Base version="71.1720.0" Xamarin.GooglePlayServices.Ads.Identifier version="71.1600.0" Xamarin.GooglePlayServices.Ads.Lite version="71.1720.1" Xamarin.GooglePlayServices.Auth version="71.1600.0" Xamarin.GooglePlayServices.Auth.Api.Phone version="71.1600.0" Xamarin.GooglePlayServices.Auth.Base version="71.1600.0" Xamarin.GooglePlayServices.Base version="71.1610.0" Xamarin.GooglePlayServices.Basement version="71.1620.0" Xamarin.GooglePlayServices.Cast version="71.1602.0" Xamarin.GooglePlayServices.Cast.Framework version="71.1602.0" Xamarin.GooglePlayServices.Flags version="71.1601.0" Xamarin.GooglePlayServices.Gass version="71.1720.0" Xamarin.GooglePlayServices.Measurement.Base version="71.1630.0" Xamarin.GooglePlayServices.Measurement.Sdk.Api version="71.1630.0" Xamarin.GooglePlayServices.Tasks version="71.1601.0"

Steps to Reproduce (with link to sample solution if possible):

Create a new app and add the latest Cast Framework

Include any relevant Exception Stack traces, build logs, adb logs:

Chromecast doesn't work, and I have this message in the application output: [CastContext] Failed to load module from Google Play services. Cast will not work properly. Might due to outdated Google Play services. Ignoring this failure silently.

EmmanueleVilla avatar Apr 09 '20 14:04 EmmanueleVilla

Thanks for the feedback.

I will take a look. Just to publish previews with AndroidX dependencies

moljac avatar Apr 29 '20 11:04 moljac

@EmmanueleVilla

Did you try with recently released nugets?

Could you provide some feedback, please?

moljac avatar May 16 '20 13:05 moljac

@moljac I'll try to update to the latest nugets on monday and let you know, thanks

EmmanueleVilla avatar May 16 '20 13:05 EmmanueleVilla

Hi @moljac, I had a strange problem: I had a Xamarin project with the nugets, but the actual Chromecast code was inside a .aar external library. Moving that code to the Xamarin project fixed the issue. Not sure what was causing it, maybe some post-build script that didn't trigger because the "pure" component code wasn't used?

EmmanueleVilla avatar May 18 '20 16:05 EmmanueleVilla

Interesting.

And that aar was bound. Or am I wrong? Linked maybe (as a file link, link in csproj)?

Not sure. We would need to take a look.

And now it is OK?

moljac avatar May 18 '20 16:05 moljac

It was imported as file with build action "AndroidAarLibrary". The native cast library version was the same, I checked in the .targets file which version you downloaded and compiled the external aar with the same version.

Yes, this was an internal library so I just moved the code and now it works

EmmanueleVilla avatar May 18 '20 16:05 EmmanueleVilla