samples icon indicating copy to clipboard operation
samples copied to clipboard

Presentation API raise crash Chrome with Chrome version 105

Open binhhuynhgit opened this issue 3 years ago • 17 comments

Hi @mfoltzgoogle,

I've using Presentation API with Chrome Cast. It still stable with previous version untill Chrome upgrade to new version 105, i've problem Chrome crashed when casting a device (previous version 104 work fine) At Chrome 105 version, it's work fine when you already Cast to a device for first times (click button presentationRequest.start()) but second times click button presentationRequest.start() then Chrome will be crashed.

Pls help me share that's bug isn't it?

binhhuynhgit avatar Sep 06 '22 03:09 binhhuynhgit

I cannot reproduce with https://googlechrome.github.io/samples/presentation-api/ sadly.

@binhhuynhgit Do you mind filing an issue at https://crbug.com/new with steps to reproduce so that the chrome team can look at it?

beaufortfrancois avatar Sep 06 '22 07:09 beaufortfrancois

Hi @beaufortfrancois, I describe detail step to reproduce, pls try again:

Step 1: Navigate to link https://googlechrome.github.io/samples/presentation-api/ on Chrome browser.

Step 2: Click button presentationRequest.start(). On the appearing popup, choose Cast to device.

Step 3: Duplicate tab chrome (at Step 1). And now, we've two step with adress https://googlechrome.github.io/samples/presentation-api/.

Step 4: At new tab (dupplicate from Step 3), continue click button presentationRequest.start(). On the appearing popup, choose Cast to device => at this step Chrome will be crashed (just Chrome 105 version, I've try on Chrome 104 version it's worked)

Thanks @beaufortfrancois.

binhhuynhgit avatar Sep 06 '22 09:09 binhhuynhgit

I can't reproduce in Chrome Canary 107.0.5282.0. How about you? https://chrome.com/canary

beaufortfrancois avatar Sep 06 '22 09:09 beaufortfrancois

I had check with Chrome Canary Version 107.0.5284.0 (Official Build) canary (64-bit) => It's worked.

But with more than 1000 of my users, they're using Google Chrome Version 105.0.5195.102 (Official Build) (64-bit). I don't know this issue is limited from Chrome version 105 or Presentation API's fault .

binhhuynhgit avatar Sep 06 '22 09:09 binhhuynhgit

Thank you!

Can you try with Chrome Beta (https://chrome.com/beta) and Chrome Dev (https://chrome.com/dev) to isolate the issue?

beaufortfrancois avatar Sep 06 '22 09:09 beaufortfrancois

Hi @beaufortfrancois

with Chrome Beta Version 106.0.5249.21 (Official Build) beta (64-bit) => it also crashes Chrome browser. with Chrome Dev Version 106.0.5249.21 (Official Build) dev (64-bit) => it also crashes Chrome browser.

binhhuynhgit avatar Sep 06 '22 10:09 binhhuynhgit

That is helpful. Thank you @binhhuynhgit Let me see what I can find.

beaufortfrancois avatar Sep 06 '22 10:09 beaufortfrancois

I've filed https://bugs.chromium.org/p/chromium/issues/detail?id=1360379 and cc'ed @mfoltzgoogle. Which platform do you use (Windows, macOS, Linux, Android, ...)?

beaufortfrancois avatar Sep 06 '22 12:09 beaufortfrancois

I'm using Windows.

binhhuynhgit avatar Sep 06 '22 12:09 binhhuynhgit

Thanks @beaufortfrancois. I'm checking id bug [1360379] but got "Permission denied." so I can not follow this issue.

And today, with Chrome version 105 I got the other issue "DOMException: Failed to execute 'start' on 'PresentationRequest': PresentationRequest::start() requires user gesture"

binhhuynhgit avatar Sep 07 '22 05:09 binhhuynhgit

Thanks @beaufortfrancois. I'm checking id bug [1360379] but got "Permission denied." so I can not follow this issue.

The chrome team restricted view access while they're investigating the root issue. I'll let you know how it goes.

And today, with Chrome version 105 I got the other issue "DOMException: Failed to execute 'start' on 'PresentationRequest': PresentationRequest::start() requires user gesture"

Can you share your code? I can't reproduce with https://googlechrome.github.io/samples/presentation-api/ in Chrome 105.0.5195.102 on macOS.

beaufortfrancois avatar Sep 07 '22 08:09 beaufortfrancois

@binhhuynhgit It's restricted so we can examine crash reports, but if you are OK sending me your email address I can CC you so you can get updates.

markafoltz avatar Sep 07 '22 17:09 markafoltz

@binhhuynhgit It's restricted so we can examine crash reports, but if you are OK sending me your email address I can CC you so you can get updates.

My email adress: [email protected]. Thanks @mfoltzgoogle.

binhhuynhgit avatar Sep 08 '22 03:09 binhhuynhgit

Hi @mfoltzgoogle, @beaufortfrancois

On Chrome version 104.0.5112.102 I also got an error about DOMException: Failed to execute 'start' on 'PresentationRequest': PresentationRequest::start() requires user gesture I'll describe my issue + share my coding as image below:

  • Issue: when click button to trigger function presentationRequest.start(); => I got an error PresentationRequest::start() requires user gesture. But when I open Inspect (Devtools page) and call statement presentationRequest.start(); at Console section => it's worked. I'm confused by this issue

  • Image my coding: image

binhhuynhgit avatar Sep 08 '22 04:09 binhhuynhgit

Thanks for the screenshot. It helps a lot. When user clicks button, you're actually doing a POST request and only then, call PresentationRequest::start() which raises the error because the user gesture is "lost". It can happen if the POST request takes too much time. I'd suggest you do the HTTP request before user clicks the button OR call PresentationRequest::start() directly when user clicks button and call stop() if POST request is unsuccessful.

beaufortfrancois avatar Sep 08 '22 07:09 beaufortfrancois

Thanks for the screenshot. It helps a lot. When user clicks button, you're actually doing a POST request and only then, call PresentationRequest::start() which raises the error because the user gesture is "lost". It can happen if the POST request takes too much time. I'd suggest you do the HTTP request before user clicks the button OR call PresentationRequest::start() directly when user clicks button and call stop() if POST request is unsuccessful.

At this time, I still keep old coding (as shared previous) => it's working good. It's show popup look like picture below. I feel confused with error occur sometimes but I don't know exactly root cause (I guess PresentationRequest is cached lead to user gesture is "lost", right @mfoltzgoogle? Do you think so?) I've more question user gesture is "lost" it's means the popup (like picture below) lost, right?

image

binhhuynhgit avatar Sep 08 '22 10:09 binhhuynhgit

Hi @mfoltzgoogle,

I've using Presentation API with Chrome Cast. It still stable with previous version untill Chrome upgrade to new version 105, i've problem Chrome crashed when casting a device (previous version 104 work fine) At Chrome 105 version, it's work fine when you already Cast to a device for first times (click button presentationRequest.start()) but second times click button presentationRequest.start() then Chrome will be crashed.

Pls help me share that's bug isn't it?

Waazer avatar Sep 14 '22 08:09 Waazer