New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706998 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Failing to terminate() PresentationConnection results in Chrome thinking there's a connection

Project Member Reported by avayvod@chromium.org, Mar 30 2017

Issue description

1. Go to https://googlechrome.github.io/samples/presentation-api/cast.html
2. Click on New PresentationRequest()
3. Click on presentationRequest.start()
4. Once the app starts, click on terminate().
5. Observe the app still running on the Chromecast.
6. Click on presentationRequest.start() again.
7. Observe an empty controller dialog with DISCONNECT/STOP CASTING buttons and no title.
8. Click STOP CASTING.
9. Observe the Cast notification show up and click STOP there.

I'm able to reproduce steps 1-7 on ToT reliably. Only reproduced 8-9 once.
 
By merging https://github.com/GoogleChrome/samples/pull/504, i was able to terminate connection in Chrome for Android 59.0.3056.4.
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b265af93a6c5594f08c92a93a1c06cb0611c775d

commit b265af93a6c5594f08c92a93a1c06cb0611c775d
Author: avayvod <avayvod@chromium.org>
Date: Tue Apr 11 17:51:31 2017

[Cast,Android] Handle some PresentationAPI edge cases

Update MediaRouteObservers when the route is detached vs terminated.
Update MediaRouter about the route closed if there's no client record or
successful session.
All edge cases happen when the page is not using the Cast Web SDK.

BUG= 706998 
TEST=manually on https://googlechrome.github.io/samples/presentation-api/cast.html

Review-Url: https://codereview.chromium.org/2788783002
Cr-Commit-Position: refs/heads/master@{#463680}

[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CreateRouteRequest.java
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProviderTest.java
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/BUILD.gn
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/android/chrome_jni_registrar.cc
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/media/android/router/media_router_android.cc
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/media/android/router/media_router_android.h
[add] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/media/android/router/media_router_android_bridge.cc
[add] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/media/android/router/media_router_android_bridge.h
[add] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/browser/media/android/router/media_router_android_unittest.cc
[modify] https://crrev.com/b265af93a6c5594f08c92a93a1c06cb0611c775d/chrome/test/BUILD.gn

Status: Fixed (was: Assigned)
Testing with Chrome Canary 59.0.3068.4 for Android after your patch

1. Go to https://googlechrome.github.io/samples/presentation-api/cast.html
2. Click on New PresentationRequest()
3. Click on presentationRequest.start()
4. Once the app starts, click on terminate().
5. Observe the app stops on the Chromecast. <--- YEAH! 
6. Click on presentationRequest.start() again.
7. Observe an empty controller dialog with DISCONNECT/STOP CASTING buttons and no title.

The commit only made it to 59.0.3069.0 (you can check at omahaproxy.appspot.com):

https://storage.googleapis.com/chromium-find-releases-static/b26.html#b265af93a6c5594f08c92a93a1c06cb0611c775d

terminate() works because the Cast app was updated so it's not tied to a Chrome release.
Status: Verified (was: Fixed)
Argh! You're right!
It works perfectly fine in Chrome Canary 59.0.3070.4 for Android.

Sign in to add a comment