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

Port to Chromium Embedded Framework #372

Closed
jiri-janousek opened this issue Sep 8, 2017 · 20 comments
Closed

Port to Chromium Embedded Framework #372

jiri-janousek opened this issue Sep 8, 2017 · 20 comments
Assignees
Labels
type: bug Something is not working as expected or the documentation is incorrect.
Projects

Comments

@jiri-janousek
Copy link
Member

jiri-janousek commented Sep 8, 2017

Primary Targets

Unresolved Issues

  • Background playback: Nuvola quits when the window is closed. Fixed in Nuvola 4.9.50.
  • Proxy settings: It is grabbed from the system and cannot be changed yet.
  • Clipboard: CEF cannot paste text from the system clipboard unless external message pump is disabled, but CPU usage is higher then Paste doesn't work outside web view valacef#2
  • Missing support for web_app.allow_insecure_content - it is used by only a single script.
  • Password manager does not work and may crash.Add password manager integrated with system keyring #418
  • Request filtering is not implemented.
  • Scripts depending on deprecated synchronous API calls need to be ported:
    • Amazon Cloud Player: Nuvola._keyValueStorageSetDefaultValue
  • Poor performance with NVidia GTX 1070 (driver 387.34) - see Performance issues valacef#1

Testing

  • Users with Nuvola Premium/Patron account have been invited.
  • Users with Nuvola Basic account will be invited later.
@jiri-janousek
Copy link
Member Author

CEF is not compatible with GTK+ 3.22: cztomczak/cefcapi#9

@jiri-janousek
Copy link
Member Author

jiri-janousek commented Nov 19, 2017

Neither compatible: 3.20.9-1ubuntu2.1 (Ubuntu 16.10), 3.18.9-1ubuntu3.3 (Ubuntu 16.04).

@jiri-janousek
Copy link
Member Author

jiri-janousek commented Dec 1, 2017

  • Neither compatible: 3.16.7 (Ubuntu 15:10)
  • Compatible: 3.14.13 (Ubuntu 15.04)

@jiri-janousek
Copy link
Member Author

  • Neither compatible: 3.16.7, 3.16.0, 3.15.5, 3.15.2
  • Compatible: 3.15.1, 3.15.0, 3.14.14
  • Need to go through commits between 3.15.1 and 3.15.2

@jiri-janousek
Copy link
Member Author

The first failing commit between 3.15.1 and 3.15.2 is GNOME/gtk@dae447728d

@jiri-janousek
Copy link
Member Author

This works:

GtkWidget* create_gtk_window(char* title, int width, int height) {
    printf("create_gtk_window\n");
    // Create window.
    GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    ...
    // GTK+ > 3.15.1 uses an X11 visual optimized for GTK+'s OpenGL stuff
    // since revid dae447728d: https://github.com/GNOME/gtk/commit/dae447728d
    // However, it breaks CEF: https://github.com/cztomczak/cefcapi/issues/9
    // Let's use the default X11 visual instead the GTK's blessed one.
    GdkScreen* screen = gdk_screen_get_default();
    GList* visuals = gdk_screen_list_visuals(screen);
    printf("n visuals: %u\n", g_list_length(visuals));
    GdkX11Screen* x11_screen = GDK_X11_SCREEN(screen);
    g_assert(x11_screen != NULL);
    Visual* default_xvisual = DefaultVisual(GDK_SCREEN_XDISPLAY(x11_screen),
        GDK_SCREEN_XNUMBER(x11_screen));
    GdkVisual* default_visual = NULL;
    int i = 0;
    while (visuals != NULL) {
	GdkVisual* visual = GDK_X11_VISUAL (visuals->data);
        if (default_xvisual->visualid == gdk_x11_visual_get_xvisual(
           GDK_X11_VISUAL (visuals->data))->visualid) {
           printf("Default visual %d\n", i);
           default_visual = visual;
        }
        i++;
        visuals = visuals->next;
    }
    gtk_widget_set_visual(GTK_WIDGET(window), default_visual);
    gtk_widget_show_all(window);
    return vbox;
}

@jiri-janousek
Copy link
Member Author

Vala + GTK+ 3 bindings of CEF for Nuvola:
cefium

Widevine DRM works (Spotify):
cef_spotify

jiri-janousek added a commit that referenced this issue Dec 19, 2017
https://github.com/tiliado/valacef

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 20, 2017
Set environment variable NUVOLA_USE_CEF=true to enable it.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 20, 2017
Set environment variable NUVOLA_USE_CEF=true to enable it.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Not to forget.

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 23, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit to tiliado/nuvola-app-spotify that referenced this issue Dec 26, 2017
- Issue: tiliado/nuvolaplayer#374
- Issue: tiliado/nuvolaplayer#372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit to tiliado/nuvola-app-spotify that referenced this issue Dec 26, 2017
- Issue: tiliado/nuvolaplayer#374
- Issue: tiliado/nuvolaplayer#372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 26, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 30, 2017
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Dec 30, 2017
To preserve script line number

Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@jiri-janousek
Copy link
Member Author

jiri-janousek commented Dec 31, 2017

Blog post: Status of Chromium-based Port of Nuvola

@jiri-janousek
Copy link
Member Author

New issue: Poor performance with NVidia GTX 1070 (driver 387.34) - see tiliado/valacef#1

@bartlibert
Copy link

From my initial tests with Google Play Music (with a subscriptions), it seems at least as fast and smooth as the WebKit version on my system (if not smoother) and playing music works as expected. Developer toolbar also does wat is has to.

However, I noticed one big problem: any action in the "overflow menu" (3 dots) does not work, but only if it is called from that menu.

So for example, when pressing "Shuffle" as seen in the screenshot below, it works...
screenshot from 2018-01-04 08-06-06
... but when clicked here it does not (neither do any of the other options).
screenshot from 2018-01-04 08-06-38

Same thing for example in the "recent activity" screen (screenshots are in Dutch, but I hope it's clear enough): The "play" button works, but the overflow actions don't.
screenshot from 2018-01-04 08-07-11
screenshot from 2018-01-04 08-07-23

In proper Chromium and in the WebKit version these actions work. I have not seens any logs in the terminal, nor in the developer tools console.

jiri-janousek added a commit that referenced this issue Jan 6, 2018
- It is the first one that satisfies requirements
- Default engine is WebKitGTK+ unless --cef-default build flag is used.
- Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
jiri-janousek added a commit that referenced this issue Jan 6, 2018
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@jiri-janousek
Copy link
Member Author

Thanks @bartlibert. I cannot reproduce the issue on my machine. It might disappear after I solve tiliado/valacef#1. Can you reproduce the issue also with Cefium demo browser?

flatpak run --command=Cefium eu.tiliado.NuvolaAppGooglePlayMusic//master --url="https://play.google.com/music/" --disable-flash

jiri-janousek added a commit that referenced this issue Jan 6, 2018
This allows CefEngine to use CEF main loop to achieve high performance.

Issue: tiliado/valacef#1
Issue: #372

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>
@bartlibert
Copy link

Hi, I tried testing it with Cefium and got:

[0108/125313.206216:WARNING:browser_main_loop.cc(297)] GLib-GObject: invalid cast from 'GdkWaylandVisual' to 'GdkX11Visual'

Soo... this pointed me to try everything in X11 instead of Wayland and guess what: there it works.
So the issue is most likely related to running under Wayland.

@jiri-janousek
Copy link
Member Author

Thanks, @bartlibert. Could you test again under Wayland with Cefium which comes with Nuvola 4.9.93?

@bartlibert
Copy link

I don't get the "invalid cast" error anymore and get into google music, but the popup menus are still not working. (No errors in terminal nor web console)

@jiri-janousek jiri-janousek added type: bug Something is not working as expected or the documentation is incorrect. wishlist labels Jan 21, 2018
@TrevorScheitrum
Copy link

TrevorScheitrum commented Feb 26, 2018

I don't know if this is where I should post this, or if I should create a new issue (clicking report bug took me here instead of the general 'issues' page) But here's my bug report:

OS - Linux Mint 18.3
Hardware - Dell Latitude E5470
Video Hardware - Intel Skylake Integrated Graphics
Nuvola Apps Installed version - 4.9.149
Nuvola Spotify App Installed version - 2.4
Nuvola web engine installed version - Experimental Chromium 63.0.3239.109 web engine through the flatpak repo
Problem - Launching Spotify through the Chrome-ported Nuvola flatpak crashes randomly during playback or just leaving the window open. Not sure how to collect more details but just wanted to report it in case it hasn't already.

Not sure if this matters but I also have the official spotify app installed through their flatpak as well, 'flatpak list' returns:
Ref Options
com.spotify.Client/x86_64/stable system,current
eu.tiliado.Nuvola/x86_64/master system
eu.tiliado.Nuvola/x86_64/stable system,current
eu.tiliado.NuvolaAppSpotify/x86_64/master system,current
eu.tiliado.NuvolaAppSpotify/x86_64/stable system
io.github.Pithos/x86_64/stable system,current
org.musicbrainz.Picard/x86_64/stable system,current
org.freedesktop.Platform.VAAPI.Intel/x86_64/1.6 system,runtime
org.freedesktop.Platform.ffmpeg/x86_64/1.6 system,runtime
org.freedesktop.Platform/x86_64/1.6 system,runtime
org.gnome.Platform/x86_64/3.24 system,runtime
org.gnome.Platform/x86_64/3.26 system,runtime

@jiri-janousek
Copy link
Member Author

Hello @TrevorScheitrum. Thanks for reporting your issue. Could you create a new ticket for that with debug logs from Nuvola 4.9.163?

@TrevorScheitrum
Copy link

TrevorScheitrum commented Feb 28, 2018

Since posting this report it hasn't crashed, so i'm wondering if my system was low on ram or something. If it starts crashing again I'll try to grab debug logs and open a new issue ticket.

@jiri-janousek
Copy link
Member Author

jiri-janousek commented Apr 7, 2018

Recently ported:

Overral progress:

@jiri-janousek
Copy link
Member Author

Closing in favor of #424.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something is not working as expected or the documentation is incorrect.
Projects
No open projects
Development

No branches or pull requests

3 participants