Status Update
Comments
sy...@google.com <sy...@google.com> #2
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
b....@gmail.com <b....@gmail.com> #3
Hi matsudamper971227, could you provide a bit more detail about what you expect to happen vs what is actually happening?
For example, I just ran the following code with 21.0.0 after turning location off:
SettingsClient settingsClient = LocationServices.getSettingsClient(context);
settingsClient
.checkLocationSettings(
new LocationSettingsRequest.Builder()
.addLocationRequest(new LocationRequest.Builder(PRIORITY_HIGH_ACCURACY, 0).build())
.build())
.addOnCompleteListener(
task -> {
try {
task.getResult(ApiException.class);
fail();
} catch (ApiException e) {
assertThat(e).isInstanceOf(ResolvableApiException.class);
assertThat(task.getException()).isEqualTo(e);
ResolvableApiException apiException = (ResolvableApiException) e;
assertThat(apiException.getStatus().getStatusCode()).isEqualTo(RESOLUTION_REQUIRED);
assertThat(apiException.getResolution()).isNotNull();
}
});
This completed successfully with all assertions passing. How does this differ from what you are expecting?
sy...@google.com <sy...@google.com> #4
that test is not passed in my environment.
Pass this test.
b....@gmail.com <b....@gmail.com> #5
I noticed the following two are the same.
ResolvableApiException#getResolution()
ApiException.getStatus().getResolution()
public class ResolvableApiException extends ApiException {
@NonNull
public PendingIntent getResolution() {
return this.getStatus().getResolution();
}
/* ~~~ */
}
resolution was not null.
The return seems to be an ApiException, not a ResolvableApiException.
sa...@gmail.com <sa...@gmail.com> #6
same problem? I didn't notice because diffrent category.
sy...@google.com <sy...@google.com> #7
I was able to reproduce this in a prod environment, but not a debug environment. I believe this may be due to a proguard bug or misconfiguration. Investigation continues...
ty...@gmail.com <ty...@gmail.com> #8
Have confirmed that this was due to depending on an incorrect version of the play-services-base library. play-services-location:21.0.0 depends on play-services-base:18.0.1, when it should instead be depending on play-services-base:18.1.0. We will be deploying a new version of play-services-location (21.0.1) that has this correction. In the meantime, a work-around is simply to explicitly depend on play-services-base:18.1.0 from your project, I have confirmed that this fixes the issue.
Description
Please answer all relevant questions below so that we have enough information to investigate your issue. Providing incomplete information will delay investigation of your issue.
Bug Report Template
Describe the issue: expected vs. observed behavior and/or appearance.
ReconnectionService is trying to start a service in the background. This is causing an IllegalStateException on Android 8+.
com.google.android.gms.cast.framework.ReconnectionService }: app is in background uid UidRecord{c51b1af u0a131 TPSL bg:+2m55s135ms idle change:cached procs:1 seq(0,0,0)}
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
at android.app.ContextImpl.startService(ContextImpl.java:1532)
at android.content.ContextWrapper.startService(ContextWrapper.java:664)
at com.google.android.gms.internal.cast.zzai.zzg$1385ff(Unknown Source:19000)
at com.google.android.gms.internal.cast.zzai.onStatusUpdated(Unknown Source)
at com.google.android.gms.cast.framework.media.zzr.onStatusUpdated(Unknown Source:30)
at com.google.android.gms.internal.cast.zzdh.onStatusUpdated(Unknown Source:6)
at com.google.android.gms.internal.cast.zzdh.zza(Unknown Source:14000)
at com.google.android.gms.cast.framework.media.RemoteMediaClient.zzb(Unknown Source:2)
at com.google.android.gms.internal.cast.zzct.run(Unknown Source:31)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
List steps to reproduce the issue, if known.
We have been unable to reproduce locally but it is our largest crash.
Which version of the Cast SDK are you using?
15.0.1
On which version(s) of the OS (iOS, Android) do you observe the problem?
Android
On which device type(s) such as phones, tablets or laptops (iPad, iPhone, etc.) do you observe the problem?
Android devices
Do you observe the problem when running on a physical device, or the simulator, or both?
We haven't reproduced, but it happens on user devices.
If this is a device discovery or device connectivity issue: Do you observe the problem over Cellular (using Guest Mode), WiFi (using either Guest Mode or local connection), or both?
If this is strictly a UI appearance/styling issue, please take screenshot(s) (for iOS, and Android) illustrating the problem and attach them to the bug report. Also mention whether the problem occurs in portrait orientation, landscape orientation, or both.
If this is not a UI appearance/styling issue, please capture logs from the SDK for a time interval leading up to and including the occurrence of the problem, and attach them to the bug report. For issues relating to device discovery, the log should cover at least 20 seconds. For issues relating to device connectivity, the log should cover the entire time during which you attempted to start a Casting session.
Obtaining iOS Cast SDK Logs:
Obtaining Android Cast SDK Logs: