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

YouTube crash with OnDidFinishLoad #105

Open
alldev opened this issue Jan 24, 2024 · 7 comments
Open

YouTube crash with OnDidFinishLoad #105

alldev opened this issue Jan 24, 2024 · 7 comments

Comments

@alldev
Copy link

alldev commented Jan 24, 2024

Hi,

Recently I faced a problem with webview_cef library and YouTube platform. When loading YouTube (no matter main page, any inner page with video, or even a side server page with embedded video code), app crashes. I reproduce this problem not only in my application, but also on the included example in library package.

Here is the log:

[0124/111943.612038:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.", source:  (0)
[0124/111946.173676:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901933 [3,45]
[0124/111951.339047:INFO:CONSOLE(5102)] "LegacyDataMixin will be applied to all legacy elements.
Set `_legacyUndefinedCheck: true` on element class to enable.", source: https://www.youtube.com/s/desktop/c21d783a/jsbin/desktop_polymer.vflset/desktop_polymer.js (5102)
[0124/111951.660313:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901933 [3,45]
[0124/111951.660456:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901933 [3,45]
[0124/111951.660498:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901933 [3,45]
[0124/111951.660532:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901933 [3,45]
[0124/111951.675898:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.", source:  (0)
[0124/111951.775891:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.", source:  (0)
[0124/111953.067548:INFO:CONSOLE(5102)] "LegacyDataMixin will be applied to all legacy elements.
Set `_legacyUndefinedCheck: true` on element class to enable.", source: https://www.youtube.com/s/desktop/c21d783a/jsbin/desktop_polymer.vflset/desktop_polymer.js (5102)
[0124/111953.277697:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901944 [3,56]
[0124/111958.460758:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901944 [3,56]
[0124/111958.460962:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901944 [3,56]
[0124/111958.461036:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901944 [3,56]
[0124/111958.461100:WARNING:browser_info.cc(298)] Returning a speculative frame for 12884901944 [3,56]
[0124/111958.476178:INFO:CONSOLE(0)] "Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.", source:  (0)
[0124/112004.645292:WARNING:frame_impl.cc(432)] OnDidFinishLoad sent to detached frame 12884901949 [3,61] will be ignored
[0124/112005.141618:WARNING:frame_impl.cc(432)] OnDidFinishLoad sent to detached frame 12884901951 [3,63] will be ignored
Lost connection to device.
Exited

As far as I unerstand there is something on the CEF side what cause unexpected OnDidFinishLoad. Maybe something is missing in compiled CEF itself or library wrapper around it. This problem can refer not only the YouTube platform, but other unexpected (HTML5 video?) cases.

I am on macOS and Jan 15 2024 revision of the library.

Many thanks for your analysis of this case.

@SinyimZhi
Copy link
Collaborator

Can reproduce, the repair of Mac issues will be slightly slower。 @alldev

@joshiGaming
Copy link

Hey, sorry to bother but are there any updates to this issue.

@alterhuman
Copy link

@SinyimZhi any update?

@joshiGaming were you able to find a solution for this?

@joshiGaming
Copy link

joshiGaming commented Apr 5, 2024

@alterhuman yeah i did, you need to remove command_line->AppendSwitch("single-process");
in webview_app.h:32 and than add the helpers to your build through xcode so they appear in the app bundle under frameworks.

@taenyeon
Copy link

taenyeon commented Apr 8, 2024

@joshiGaming
I don't understand this "add the helpers to your build through xcode so they appear in the app bundle under frameworks."
Could you show a relevant example with pictures or files?

@chenasraf
Copy link

chenasraf commented Apr 9, 2024

Removing the single-process set causes crashes the app immediately for me, not sure what needs to be updated in the build process. Any help would be appreciated :)

@joshiGaming
Copy link

joshiGaming commented Apr 9, 2024

@taenyeon, of course. You can do it over cmake or directly through Xcode. Navigate to Xcode, select your project's runner, and then proceed to the 'Build Phases' section.
Then you add a new phase called "Copy Files Phase".

1

Select under Destination, "Frameworks". Once there, you can easily click on the plus to add new items.

2

Click on "add others" and select all your helper app bundels that were included in the prebuilds.

3

After selecting them, simply click 'Open' followed by 'Finish'. After saving and compiling everything your build should look something like this:

5

Hope that helps :)

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

6 participants