Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presentation API raise crash Chrome with Chrome version 105 #778

Open
binhhuynhgit opened this issue Sep 6, 2022 · 17 comments
Open

Presentation API raise crash Chrome with Chrome version 105 #778

binhhuynhgit opened this issue Sep 6, 2022 · 17 comments

Comments

@binhhuynhgit
Copy link

binhhuynhgit commented Sep 6, 2022

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 binhhuynhgit changed the title Presentation API raise crash Chrome with Chrome version 105 () Presentation API raise crash Chrome with Chrome version 105 Sep 6, 2022
@beaufortfrancois
Copy link
Member

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?

@binhhuynhgit
Copy link
Author

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.

@beaufortfrancois
Copy link
Member

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

@binhhuynhgit
Copy link
Author

binhhuynhgit commented Sep 6, 2022

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 .

@beaufortfrancois
Copy link
Member

Thank you!

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

@binhhuynhgit
Copy link
Author

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.

@beaufortfrancois
Copy link
Member

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

@beaufortfrancois
Copy link
Member

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, ...)?

@binhhuynhgit
Copy link
Author

I'm using Windows.

@binhhuynhgit
Copy link
Author

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"

@beaufortfrancois
Copy link
Member

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.

@markafoltz
Copy link
Collaborator

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

@binhhuynhgit
Copy link
Author

@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
Copy link
Author

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

@beaufortfrancois
Copy link
Member

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.

@binhhuynhgit
Copy link
Author

binhhuynhgit commented Sep 8, 2022

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

@Waazer
Copy link

Waazer commented Sep 14, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants