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

Awesomium sometimes works fine, but sometimes it does not #5617

Open
juliocoliveira opened this issue Nov 25, 2023 · 7 comments
Open

Awesomium sometimes works fine, but sometimes it does not #5617

juliocoliveira opened this issue Nov 25, 2023 · 7 comments
Labels
Dependency: CEF The issue resides with Chromium.
Milestone

Comments

@juliocoliveira
Copy link

I'm a developer for PlayX add-on.
The source code is located https://github.com/ZionDevelopers/playx/ and is hosted on workshop here: https://steamcommunity.com/sharedfiles/filedetails/?id=106516163

Using the x86-64 branch.
For sometime now I'm having this issue more details can be seen here: ZionDevelopers/playx#134
The issue is that when I spawn a Player and open a webpage, sometimes it loads fine, but sometimes it does not do anything, it just black screen.
It happens at random, can't get it to trigger anytime I want. I open PlayX to play a media and sometimes it does nothing. But most times it works fine.
The same problem seems to happen to Sam's Media Player add-on too.
Tried several tweaks and fixes with no luck at the moment.

The issue seems to be with Awesomium/Chromium or Garry's Mod itself.
The code runs the same for every video, so I don't think is a "me" problem, I don't think I can fix it.

I'm using the derma panel "Awesomium" that can be viewed https://github.com/ZionDevelopers/playx/blob/master/lua/autorun/client/cl_html.lua

Can someone that understands Awesomium/Chromium take a look at this problem, Please?

@robotboy655 robotboy655 added Dependency: Awesomium The issue resides with Awesomium and thus will not be fixed as it is deprecated in favour of CEF. Dependency: CEF The issue resides with Chromium. and removed Dependency: Awesomium The issue resides with Awesomium and thus will not be fixed as it is deprecated in favour of CEF. labels Nov 27, 2023
@robotboy655
Copy link
Contributor

Sounds weird, but here are some thoughts/questions:

  1. Does this happen on non x86-64 beta? I know the browser is outdated there, what's important is whether it happens there or not.
  2. Have you tried printing out all the HTML-related panel events and seeing if they are any different when the issue happens?
  3. When the issue happens, you cannot fix it until the panel is recreated, correct? Or is the issue persisting until game restart?
    3a) And this happens randomly after the panel has been created, not on panel creation?
  4. What's the frequency of this happening? Is it within 10 minutes of using the addon? Within an hour?

@robotboy655 robotboy655 added this to the x64 milestone Nov 27, 2023
@juliocoliveira
Copy link
Author

juliocoliveira commented Nov 27, 2023

  1. Can't get it to work at all on standard release (Non beta), The panel is just black, I don't know if Awesomium panel is only available on x86-64.
  2. Don't know how to do this.
  3. Correct, Sometimes I close media, the panel is recreated, sometimes it works, sometimes it takes 2-3 closing to get it to work. After restart, sometimes it works first try, sometimes it take 2-3 tries to get it to work.
  4. Usually it happens on the first / second tries. After that usually works fine. Can't say for over 10 minutes or one hour, but I guess is just the first tries, or a lot of people would be complaining. I usually just test updates and close the game, Don't play for hours.

@robotboy655
Copy link
Contributor

Don't know how to do this.

https://wiki.facepunch.com/gmod/DHTML

Define all the functions under "Events" and compare their outputs when it works and does not.

@juliocoliveira
Copy link
Author

juliocoliveira commented Nov 27, 2023

OK, I did that, I just didn't added "OnCallback" because I was getting a lot of spam, because the webpage of the addon runs javascript function every 100ms.

Here is the result:
///////////////////////////
1 try, it worked:
///////////////////////////

PlayXBrowser: Requested to open <> / <https://www.youtube.com/watch?v=8fwzWHzb1tI>
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=8fwzWHzb1tI with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!
PlayX: Playing https://ziondevelopers.github.io/playx/youtubehost.html?v=8fwzWHzb1tI using handler YoutubeNative
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnBeginLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=8fwzWHzb1tI&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/
Triggered OnChangeTargetURL: PlayX Navigator Home
PlayX: Received metadata via provider YouTube
PlayX: Metadata received
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/youtubehost.html?v=8fwzWHzb1tI&start=0&vol=55
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=8fwzWHzb1tI&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnChangeTargetURL: PlayX Host for YouTube

///////////////////////////
2 try, it did worked:
///////////////////////////

PlayXBrowser: Requested to open <> / <https://www.youtube.com/watch?v=n61ULEU7CO0>
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=n61ULEU7CO0 with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!
PlayX: Playing https://ziondevelopers.github.io/playx/youtubehost.html?v=n61ULEU7CO0 using handler YoutubeNative
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnBeginLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=n61ULEU7CO0&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/
Triggered OnChangeTargetURL: PlayX Navigator Home
PlayX: Received metadata via provider YouTube
PlayX: Metadata received
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/youtubehost.html?v=n61ULEU7CO0&start=0&vol=55
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=n61ULEU7CO0&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnChangeTargetURL: PlayX Host for YouTube

///////////////////////////
3 try, it didn't worked:
///////////////////////////

PlayXBrowser: Requested to open <> / <https://www.youtube.com/watch?v=egLMPbcs4co>
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=egLMPbcs4co with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!
PlayX: Playing https://ziondevelopers.github.io/playx/youtubehost.html?v=egLMPbcs4co using handler YoutubeNative
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnBeginLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=egLMPbcs4co&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
PlayX: Received metadata via provider YouTube
PlayX: Metadata received
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/youtubehost.html?v=egLMPbcs4co&start=0&vol=55
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=egLMPbcs4co&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube

///////////////////////////
4 try, it didn't worked
///////////////////////////

PlayXBrowser: Requested to open <> / <https://www.youtube.com/watch?v=fCbf4T4Zp5A>
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=fCbf4T4Zp5A with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!
PlayX: Playing https://ziondevelopers.github.io/playx/youtubehost.html?v=fCbf4T4Zp5A using handler YoutubeNative
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnBeginLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=fCbf4T4Zp5A&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
PlayX: Received metadata via provider YouTube
PlayX: Metadata received
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/youtubehost.html?v=fCbf4T4Zp5A&start=0&vol=55
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=fCbf4T4Zp5A&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube

///////////////////////////
5 try, it did worked
///////////////////////////

PlayXBrowser: Requested to open <> / <https://www.youtube.com/watch?v=phZJOJshdm4>
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4 with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!
PlayX: Playing https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4 using handler YoutubeNative
Triggered OnBeginLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Navigator Home
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/
Triggered OnChangeTargetURL: PlayX Navigator Home
PlayX: Received metadata via provider YouTube
PlayX: Metadata received
Triggered OnDocumentReady: https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4&start=0&vol=55
Triggered OnFinishLoadingDocument: https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4&start=0&vol=55
Triggered OnChangeTargetURL: PlayX Host for YouTube
Triggered OnChangeTargetURL: PlayX Host for YouTube

Between each that didn't worked, I restarted the game several times until it not worked again.
It's much more that does work, other than does NOT work.
Still it should work every single time.

@robotboy655
Copy link
Contributor

robotboy655 commented Nov 27, 2023

Plugging that into any diff tool, it is clear that 2 of the hooks are fired out of order for the times it doesn't work for you:
image

Perhaps that's the issue?

P.S. you can use Markdown's ``` tags to mark certain parts of text as code, for example:

PlayXBrowser: Requested to open <> / https://www.youtube.com/watch?v=phZJOJshdm4
PlayX: Beginning media https://ziondevelopers.github.io/playx/youtubehost.html?v=phZJOJshdm4 with handler YoutubeNative, start at 0s
PlayX: Metadata function available via provider YouTube
Dathus [BR] started a video!

@juliocoliveira
Copy link
Author

I don't really know what can be the issue here.
From my side, all the requests are made the same way.
It does the exact same thing every time I open a media.

@juliocoliveira
Copy link
Author

juliocoliveira commented Jan 2, 2024

I know you got a lot of issues to fix, But this issue has happening for lots of months now (if not years).
And there is no response for over a month now, Can you give me some details if this will be fixed anytime soon?
My add-on alone have almost half million subscribers on workshop alone, not counting GitHub downloads.
And other add-ons are suffering with this issue. At least on the tests I did Sam's Media Player also have this issue, And it on Workshop have 1.3 million subscribers.

Would be really great If we got this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependency: CEF The issue resides with Chromium.
Projects
None yet
Development

No branches or pull requests

2 participants