FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.66k stars 864 forks source link

[Bug]: FreeTube starts fullsrceen, and the "fullscreen" button cannot toggle between fullscreen modes #3220

Open Araly opened 1 year ago

Araly commented 1 year ago

Guidelines

Describe the bug

  1. Open FreeTube
  2. Observe that the app starts fullscreen. It takes the whole screen space, not leaving any space for the gnome bar or anything. This is different from starting maximized.
  3. Toggle fullscreen mode by pressing super+M on Gnome (or maybe my gnome, can't remember if I changed this shortcut).
  4. Observe that the app properly toggles fullscreen off.
  5. Start a video, and play around with the "fullscreen" and "full window" buttons.
  6. Observe that they act exactly the same. They do not toggle fullscreen mode, just makes the video take whatever available space the window already has.
  7. Close FreeTube.
  8. Start FreeTube again.
  9. Observe 2. again. (So the app didn't remember the last state).

Expected Behavior

The app starts not fullscreen, like all other apps.

The "full window" button toggles between using all the available space for the existing window for the video (this is currently working)

The "fullscreen" button toggles the window fullscreen, and uses all the available space for the video.

Issue Labels

feature stopped working

FreeTube Version

v0.18.0 Beta

Operating System Version

Linux 6.1.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 14 Feb 2023 22:08:08 +0000 x86_64 GNU/Linux

Installation Method

.pacman

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

I can't remember, but it used to work months ago. I first thought the issue was with a Gnome extension.

Additional Information

No response

Nightly Build

absidue commented 1 year ago

I'm a Windows user so I'm just speculating here, it's possible that Gnome's shortcut to disable full screen doesn't properly inform the app that it is no longer full screen (I know that Gnome broke system dark mode detection in Electron apps not too long ago, so other stuff being broken on Gnome is feasible), so when you try to full screen the video, the app still thinks it's in full screen and also when you close the app it saves that it's full screen because that's what it thinks is happening.

Instead of using that (presumably) desktop environment/window manager specific shortcut, could you please try using the "Toggle Full Screen" option in the "View" dropdown of the app menu and see if that works?

dinotheextinct commented 1 year ago

I am on KDE/appimage version and the same shit happens to me, its so fucking annoying. Sadly I cant use the flatpak version because I cant import data there. Amazing.

image

Doesnt react to anything, can not even unselect fullscreen.

absidue commented 1 year ago

Can you try running FreeTube from a terminal and see if any errors show up when you use that menu option?

Also when you say you can't import data in the flatpak version, I'm pretty sure the flatpak version only has access to the downloads directory: https://github.com/flathub/io.freetubeapp.FreeTube/blob/master/io.freetubeapp.FreeTube.yml#L17

dinotheextinct commented 1 year ago

No flatpak says import was successfull, but not subscriptions appear.

/usr/bin/AppImageLauncher: /lib64/libcurl.so.4: no version information available (required by /usr/bin/../lib/x86_64-linux-gnu/appimagelauncher/libappimageupdate.so) (node:19823) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL (Usefreetube --trace-warnings ...to show where the warning was created) (node:19823) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:19823) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL (node:19823) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) [19898:0225/221128.846367:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!

No message when trying to un-fullscreen. But this message appears when starting from terminal anyway.

mutageneral commented 1 year ago

I have the same problem with the FreeTube Flatpak version for a few weeks now, and it is very annoying. I tried launching the app in KDE X11, KDE Wayland, IceWM and TWM on my OpenSUSE Tumbleweed machine. The only one that worked was TWM for some reason. Everything else was stuck in full screen. Here is the message in the console:

LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 22:19:34.982: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:19:35.012: Failed to load module "colorreload-gtk-module"
Gtk-Message: 22:19:35.012: Failed to load module "window-decorations-gtk-module"
[2:0225/221935.035103:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Aucun fichier ou dossier de ce type
[2:0225/221935.035247:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: Aucun fichier ou dossier de ce type
(node:2) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL
(Use `freetube --trace-warnings ...` to show where the warning was created)
(node:2) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL
(node:2) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Notice the missing "window-decorations-gtk-module"? Maybe that is related? But isn't Flatpak supposed to give FreeTube all the libraries it needs?

When I launched it from the KDE Wayland session, I got a popup from KDE asking if I want to allow FreeTube to run in the background. I clicked disallow, and it set this permission like the following:

Table      Object     App                     Permissions Data
background background io.freetubeapp.FreeTube no          0x00

This permission killed FreeTube every time I launched it, after about 10 second. I reverted this with the flatpak permission-set background background io.freetubeapp.FreeTube yes command. Maybe the fact it is seen as running in the background can tell us something? This does not seem to happen in the KDE X11 session.

In the KDE X11, KDE Wayland & IceWM session, the app was stuck in full screen with no way to resize or move it, other than in KDE, you can hold the meta key and drag the window around, which seems to snap it from monitor to monitor in case of the bugged FreeTube. It seems to not resize itself correctly when I drag it to my vertical monitor on my left. You can see this being demonstrated in the following video recording of my KDE X11 session:

https://user-images.githubusercontent.com/62779748/221382956-025af7bd-89bd-4825-beef-6e78a5b0cd2f.mp4

In TWM, it seems to just work. Maybe it is because TWM is ancient or because it works in a way where when a new program is launched, you have to chose where you want to put the window with your mouse. It had working TWM window decoration.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 year ago

Being ignorant here but does pressing F11 resolve this?

dinotheextinct commented 1 year ago

Yes it does for me, but why is fullscreen forced so strongly?? It even was saved between reboots and what not. Thanks anway!

mutageneral commented 1 year ago

Being ignorant here but does pressing F11 resolve this?

I feel very embarrassed because pressing F11 fixed it. I swear I tried all the F keys when the issue first happened. It is still strange that there are 3 of us having this issue at the same time.

Araly commented 1 year ago

Instead of using that (presumably) desktop environment/window manager specific shortcut, could you please try using the "Toggle Full Screen" option in the "View" dropdown of the app menu and see if that works?

this works.

Being ignorant here but does pressing F11 resolve this?

this also works.

I don't know what's the difference between F11, the "fullscreen" gnome key, clicking on the "fullscreen" button of the FreeTube window, and the View → toggle fullscreen option, but the two I had tried didn't work, and the other two seem to do the trick. Freetube also seems to remember the last state now if I toggle with either F11 or the View option, which is really nice.

Thanks !

BarbzYHOOL commented 1 year ago

Being ignorant here but does pressing F11 resolve this?

I feel very embarrassed because pressing F11 fixed it. I swear I tried all the F keys when the issue first happened. It is still strange that there are 3 of us having this issue at the same time.

ah ok i also got this..

BarbzYHOOL commented 1 year ago

i have to press f11 all the time, probably it is triggered by pressing F to go full screen on a video

Lcchy commented 1 year ago

Just wanted to report that I have the same issue on Fedora 38, with Freetube as a flatpak. This is what I get from launching in terminal:

$ flatpak run io.freetubeapp.FreeTube
LaunchProcess: failed to execvp:
xdg-settings
Gtk-Message: 15:59:42.223: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:59:42.223: Failed to load module "pk-gtk-module"
Gtk-Message: 15:59:42.223: Failed to load module "canberra-gtk-module"
Gtk-Message: 15:59:42.223: Failed to load module "pk-gtk-module"
[2:0717/155942.232421:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[2:0717/155942.232495:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
TypeError: Cannot destructure property 'value' of 'object null' as it is null.
    at /app/freetube/resources/app.asar/dist/main.js:2:240841
    at async _ (/app/freetube/resources/app.asar/dist/main.js:2:240797)
    at async App.<anonymous> (/app/freetube/resources/app.asar/dist/main.js:2:247098)
(node:2) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL
(Use `freetube --trace-warnings ...` to show where the warning was created)
(node:2) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2) UnhandledPromiseRejectionWarning: Error: Cannot create a secure cookie from an insecure URL
(node:2) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[48:0717/155943.750399:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[48:0717/155943.760270:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[48:0717/155946.327611:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
absidue commented 1 year ago

@Lcchy Try pressing F11, none of those logs are relevant to this.

I'm guessing that you were watching a video in fullscreen when you last closed FreeTube?

Lcchy commented 1 year ago

@absidue Yes, sorry I wasn't specific enough, F11 indeed fixes the fullscreen startup issue.

What I was referring to is that fullscreening is broken. Double-clicking the video or clicking on the fullscreen button does not make it fullscreen. It instead maximizes it inside the window exactly like the "full window" button.

~~FYI, it seems very unrelated but I have been able to reproduce this on 2 systems already. These issues only appeared right after having installed these packages:~~

~~gstreamer1-plugins-bad-free-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-bad-free-extras-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-bad-free-fluidsynth-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-bad-free-wildmidi-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-bad-free-zbar-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-bad-freeworld-1:1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-good-extras-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-good-gtk-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-good-qt-1.22.3-1.fc38.x86_64 \ gstreamer1-plugins-base-1.22.3-1.fc38.x86_64 \ gstreamer1-plugin-openh264-1.22.1-1.fc38.x86_64 \ gstreamer1-plugin-libav-1.22.3-1.fc38.x86_64 \ lame-3.100-14.fc38.x86_64 \ lame-libs-3.100-14.fc38.x86_64~~

I have no idea how this could be related, these are packages for media codecs etc. EDIT: Please disregard this FYI, seems to be unrelated.

Lcchy commented 1 year ago

@absidue I think I have now found the trigger for this bug and I can reproduce the behavior on a clean VM install.

Steps to reproduce:

EDIT: What resolves this for me is to delete the Freetube config folder (.var/app/io.freetubeapp.FreeTube/ on my machine) , reinstall does nothing if folder is kept. So something ,ust be corrupted in the state saved there

Lcchy commented 1 year ago

FWIW the corrupted file seems to be ~/.var/app/io.freetubeapp.FreeTube/config/FreeTube/settings.db, its the one that resolves the issue upon deletion.

Its contents just after triggering the bug are, for me:

{"_id":"bounds","value":{"x":1428,"y":57,"width":1430,"height":1551,"maximized":false,"fullScreen":true}}

EDIT anyone looking for a hotfix, this works for me: sed -i '/"_id":"bounds"/d' ~/path/to/FreeTube/config/FreeTube/settings.db

munabedan commented 1 year ago

F11 fixed it

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

maplepy commented 1 year ago

F11 fixed it

not it does not, fullscreening a video from freetube wont fullscreen it then

maplepy commented 1 year ago

sed -i '/"_id":"bounds"/d' ~/path/to/FreeTube/config/FreeTube/settings.db

Thanks this fixed it but that'd be nice to not have to do that

Lcchy commented 1 year ago

I think there are actually 2 separate bugs here:

maplepy commented 11 months ago

@Lcchy I have those both issues combined actually, Freetube starts as full-screen (while I haven't asked or configured Freetube to do so), so I have to manually unfull-screen it from my window manager (qtile) but if I do so, pressing the full-screen button in Freetube won't full-screen it anymore but maximise it.

pbentkowski commented 11 months ago

The F11 trick works also with KDE Plasma 5.27.9 (X11, Nvidia drivers).

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

maplepy commented 10 months ago

sed -i '/"_id":"bounds"/d' ~/path/to/FreeTube/config/FreeTube/settings.db now breaks Freetube:

image

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

joyofdata commented 6 months ago

[F11] FTW.

maplepy commented 5 months ago

[F11] FTW.

except its still broken by default so yeah :/

AhmedHalim96 commented 5 months ago

yup F11 works I was going crazy. I thought I missed up my wm config or something

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Aragorn-E commented 4 months ago

I've encountered this bug today as well. Using v0.21.1 Beta.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

maplepy commented 3 months ago

not stale

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

localhorst commented 1 month ago

Everybody, is this resolved with the latest updates? Can the issue be closed?

uncharted-user commented 1 month ago

It's still been a problem, especially on Wayland.

quentin-bettoum commented 3 weeks ago

I still have the problem in v0.22.0 Beta using AwesomeWM

uncharted-user commented 3 weeks ago

I still have the problem in v0.22.0 Beta using AwesomeWM

Now, the flathub app comes with Wayland disable on default.

Screenshot From 2024-11-05 06-53-16