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

no visible ui on window #114

Closed
unmellow opened this issue Aug 29, 2021 · 24 comments
Closed

no visible ui on window #114

unmellow opened this issue Aug 29, 2021 · 24 comments
Labels
bug Something isn't working electron Related to electron, might require fixes from upstream

Comments

@unmellow
Copy link

unmellow commented Aug 29, 2021

OS : Manjaro Linux x86_64
kernel: 5.10.47-1-lts

I posted about this in discord when I opened the extension's directory, my window is now pale white

I can interact with the UI and see what page I am on through the terminal output

there is a way to get it back, but IDK how I did it before and can't seem to do it again

this is using the official Appimage

@unmellow
Copy link
Author

so this crashes version 33 too but you get back the ui when you launch it again

@unmellow
Copy link
Author

Here's the output of it being broken

@RangerMauve
Copy link
Member

Thank you for opening the issue!

Does this still happen on v1.0.0-38?

Also, is the output you posted the full output? It looks like the end might be a bit cut off. You could try running agregore-browser > log.txt 2>&1 and then copying log.txt once Agregore is closed to make sure it's got everything.

@RangerMauve RangerMauve added the bug Something isn't working label Sep 1, 2021
@unmellow
Copy link
Author

unmellow commented Sep 1, 2021

i should clarify the crash happens on both versions version 38 is the one with no ui so i would stuggle to get the output
of version 38 crashing will give you the crash for 33 bu that one doesn't have the ui error so i post this in the other issue

@unmellow
Copy link
Author

unmellow commented Sep 1, 2021

here is a log of agregore 38 having no UI i was able to find the search bar and navagate to google because my curser changed on a certain part of the screen but i could never see anything and i have no idea how i could open the extensions folder
without the ui

(i just remembered this browser has keybindings will try that)

@RangerMauve
Copy link
Member

Interesting. I'm not sure what could be causing this.

Would you be able to clone the repository and try running yarn to install dependencies and then yarn debug to run it in debug mode and get some devtools windows to open. Any errors you see in the devtools would help a lot.

Also, what graphics card is this running on? I've tested with Intel graphics so far using X11. Not sure if other cards or Wayland could get in the way.

@unmellow
Copy link
Author

unmellow commented Sep 9, 2021

https://gist.github.com/unmellow/355e1c7957f3d1e12eb7058854a693f1

Can't see the dev tools…
Now I'm confused. Native electron is version 13.1.9 i use discord arch electron so discord uses my native electron
maybe if i try forcing agregore to use wayland (I'm on sway) might test a gnome x11 too to see what happens

@unmellow
Copy link
Author

unmellow commented Sep 9, 2021

using wayland fixes it so yeah i need to test some more things to see what is going on

the issue could be electron or swaywm or agregore or xwayland

hopefully testing it with gnome wayland should eliminate sway as the issue

and testing it on x should eliminate xwayland but we will see

@unmellow
Copy link
Author

unmellow commented Sep 9, 2021

this is a xwayland bug this problem apears when running on gnome wayland and swaywm wayland
when you use ether electrons defualt x11 renderer or the ozone platform x11 renderer

technically, something changed and caused this to happen

but when testing electron with gnome on xorg with either of the aforementioned x11 renderers results in
a very visible UI with no issues whatsoever

additionally, using the ozone platform Wayland renderer on gnome wayland and sway
results in the user interface being visible too

so i guess you could fix this but idk if it would be worth it to work around a bug in xwayland

this all did result in me finding another bug with agregore though

@RangerMauve
Copy link
Member

This might be a problem that was introduced to try to support the Pinephone.

https://github.com/AgregoreWeb/agregore-browser/blob/master/app/main.js#L44

Is xwayland doing something weird where it sets XDG_SESSION_TYPE=wayland while only enabling X11 APIs?

@unmellow
Copy link
Author

XDG_SESSION_TYPE is always wayland unless I manually change it to x11
doing so fixes the issue.

so electron by default uses x11 and ignores XDG_SESSION_TYPE
if you want to use wayland you need to do something along the lines of this

electron --enable-features=UseOzonePlatform --ozone-platform=wayland /path/to/ElectronProgram

so I think if you want to respect XDG_SESSION_TYPE you will need to wrap electron
and run it with those parameters yourself

(at least that's how it would work for manjaro)

with all this in mind i will now check if setting XDG_SESSION_TYPE to wayland on gnome xorg will have the same visual bug

@unmellow
Copy link
Author

yes having XDG_SEESION_TYPE set to wayland without manually launching electron on native wayland causes
this bug

as simple as that

@unmellow
Copy link
Author

unmellow commented Sep 13, 2021

So I was having trouble getting Agregore working on Wayland.

In order to do so, I had to reinstall electron and electron-rebuild #122

Electron, so it would stop crashing every time I hovered my mouse over the window.

Electron-rebuild, so it would actually rebuild better-sqlite3 for the newer electron version.
I needed it to rebuild so hyper URLs would load, everything else worked regardless.

I don't know a good solution for this issue, but this came up as a problem while working on this

@unmellow
Copy link
Author

unmellow commented Oct 19, 2021

Should add that with the latest version of agregore hyper urls don't work on windows ether I haven't tested my fork yet because idk how to dev on windows

Should probably make a new bug for this

@aadilayub
Copy link

Can confirm that this bug also exists on the default GNOME session on Fedora

@RangerMauve
Copy link
Member

Can confirm that this bug also exists on the default GNOME session on Fedora

Is Fedora using Wayland for it's GNOME rendering?

Does the advice in this comment work for you?

@RangerMauve RangerMauve added the electron Related to electron, might require fixes from upstream label Jan 14, 2022
@aadilayub
Copy link

aadilayub commented Jan 16, 2022

Is Fedora using Wayland for it's GNOME rendering?

Yes!

Does the advice in this comment work for you?

I haven't tried it yet. I'm guessing that command only works if you're running the app from source?

@unmellow
Copy link
Author

unmellow commented Jan 16, 2022 via email

@RangerMauve
Copy link
Member

If you installed the app through Debian or something similar, you should be able to specify flags. I figured out how to add flags to the .desktop file for the app on the pinephone for example.

@da2x
Copy link

da2x commented Jan 24, 2022

Fedora 35 Workstation here. It’s using GNOME defaults, so Wayland by default.

I get no UI when launching the app normally. Just an empty window and title bar.

./Agregore-Browser-1.0.0-49.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland causes it to briefly show a window with a toolbar before it segfaults.

Have you considered switching to a Flatpak deliverable for Linux? Then you control the entire runtime environment, so distros shouldn’t behave any differently from each other. I know this is the same promise as AppImages, but Flatpak lets you specify the window server the app runs in Wayland, Xwayland, or X11 mode. Plus, you get the security benefits of sandboxing etc.

@RangerMauve
Copy link
Member

@da2x I'm currently using electron-builder to compile Agregore, and it doesn't seem to have a Flatpak option, however I'm down to switch to something else if I can also support existing platforms with it.

By the way, does messing with any of these CLI flags change anything? https://github.com/AgregoreWeb/agregore-browser/blob/master/app/main.js#L40

Might be related to this electron issue? electron/electron#31885

Sadly I don't have anything running Wayland but my Pinephone, and I've been having other trouble on that front. 😅

@RangerMauve
Copy link
Member

If anyone with this issue could try cloning the repo and running from source, any errors you get would be very much appreciated.

Maybe even try upgrading Electron to a newer version to see if that helps?

@unmellow
Copy link
Author

btw their was a chrome regression that broke wayland support entirely because of a typo

as far as i know even though chrome got the fix it has not been rolled out to electron

and i have not been able to successfully roll back my electron version
so i have been unable to test this for a while
on manjaro

@RangerMauve
Copy link
Member

I think this might be fixed in the latest Electron version? Feel free to comment if it's still happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working electron Related to electron, might require fixes from upstream
Projects
None yet
Development

No branches or pull requests

4 participants