-
Notifications
You must be signed in to change notification settings - Fork 22
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
Gydl fails to detect network in Flatpak sandbox #11
Comments
First of all, Gydl is not meant to be run as root, running it as such will result in errors. I'm not quite sure if I understand your problem correctly, hence I'd like to ask, do you get any problems/errors when running it as a normal user? |
i know it's not meant te be run as root...it was just for trying...anyway maybe i wrote my message badly...if i run the app as nomal user i get a "no internet connection has been estabilished" message and i can either return to the menu or close the app... |
It's pretty weird since the internet connection test is using GLib which just pings "google.com" from port 0, so usually theres shouldn't be any problems :/ I assume you're having a stable internet connection up and running though. I've just commited a "potential" fix, would you mind re-installing the application from git and try to replicate your problem? |
hi there, by the way, mind to fix the push to the flatpak app? |
I am probably in a much better position help, since I am the actual flatpak author. There does indeed seem to be some issues with how Gydl checks for network. I have no issues on my desktop, but on my laptop I do sometimes experience the same issue. The problem is that it is very inconsistent. Sometimes it works and sometimes not. I was planning on bringing it up but it got delayed and forgotten. Unfortunately I am unqualified to determine the exact cause or solution but I can confirm that this is specific to the flatpak build. I recommend that @JannikHv take a look at the following documentation and determine if there is an issue: Gydl needs to be compatible and make use of these API:s in order to work in the sandbox. There also seems to be some confusion here regarding external dependencies. Flatpak applications are sandboxed and it is simple impossible for it to break if you uninstall youtube-dl outside the sandbox. Regarding a fix to the Flatpak version. Flathub does not accept development builds. If you require a development version I could provide one on my own webbserver. Alternatively I could do the initial testing now that you reminded me of the issue. |
Well unfortunately my testes were inconclusive. I had no issues with the stable build from flathub, nor with a local build based on the latest commit. This was tested on my laptop which often had the same issue with the network check. |
Yeah, couldn't replicate it either, not on my PC, nor on my Laptop. What we could do is going back to the "primitive" type of checking if the internet connection works, by a system call instead of using GLib. We might want to fall back to it until we found what caused this problem (?). Edit: Or by sockets actually to avoid using system calls. |
I've made some changes which should probably fix the problem you're having. My guess is that GLib may has chosen the wrong network card or something along these lines. Since I couldn't replicate this problem in any way, it'd be awesome if you checked if it persists after the last commit I've done. |
Based on how I understand the Flatpak portal system I very much doubt this would be possible. They quite clearly state that toolkits handle portals for you, otherwise you have to implement the portal manually. Nevertheless I will try it. Also, again you might want to use a branch for the bug fix attempts. It will be a lot of commits to revert otherwise if we need to change it back. |
one thing i can add...yesterday at home i've installed the program via flathub and it was working, then my connection suddenly dropped, and gydl started telling me there is no internet connection...now there's no way to make it work...i even changed my connection to a much stabler one (real 8 mb) but there's no way to make it work...youtube-dl otherwise works perfectly... maybe it's just nothing but thought about reporting it... EDIT : it's actually working...dunno why...i will anyway leave that one open till i can test it even at work where i have a much stabler connection...in case it's working i will close this issue... |
Maybe it works until your connection state changes? This would obviously explain why it happens more often on my laptop (which only has WiFi). |
well i'm on a laptop too...i really can't explain unfortunately...anyway i just noticed that video downloading always tells me the format is not supported whichever format i choose...think i need to have all the codecs installed for this, right? |
Codecs are installed with the flatpak and you cannot change that unless you build your own flatpak. You don't have any other installation of Gydl? If you do I recommend you run it from the command line with |
already done it...maybe it was the video?anyway i only have the flathub installation and it's always telling me "error (in red) format non supported" |
That one I can't explain. Could you share the URL to the video in question? And what options did you set in Gydl? If you give me this I can check with youtube-dl what is available at the source and also check if ffmpeg is missing some build option. |
Do you mean the "format not supported" error when actually downloading something with Gydl (Sorry, little confused). Not every video can be downloaded in the desired format, so it'll show you this error instead. |
thanks you two for the prompt answers...i will give you the link as soon as i will be back to my pc...maybe anyway is better to open another issue for this? |
Interestingly the latest commit does work with flatpak; shows how little I understand the network monitor portal. I guess it makes sense since Gydl is packaged with the I have put a test build of the latest build in my personal repository. Test Instructions
Make sure the ostree commit is
Output of the second command should include:
Run it
Any testing done at this point should be against the latest commit 18d4819 and be valid for this issue. |
So it was indeed just a Flatpak related issue, huh? I'll "reverse" this commit ASAP making it use GLib again then. |
There is no point in being hasty with these things. It is a Flatpak specific issue yes. I would like to think I made that pretty clear in my first comment. Then again I am starting to get the feeling that nobody reads them. In any case, it needs to work with the Flatpak version as well or I might be forced to patch out the network connectivity check altogether (in the flatpak only/downstream). I recommend actually waiting and seeing if @legacychimera247 could test this as I instructed and report the results. |
well thing is the app now working with the version actually on flathub and i really dunno why...i will test with my connection at work and in case it's not working i will test the new one :) |
Reopen if necessary, I'll call it done for now. |
sorry for being late, anyway i tested it at work and it does not work...think needs to be reopened but i don't know how to do it... |
Since @JannikHv closed it he or I would have to reopen it. |
so, today software center detected an update, but unfortunately couldn't download it...tried with flatpak update but this is the result Updating: com.github.JannikHv.Gydl/x86_64/stable from flathub at the end i just uninstalled the app and installed it again... |
Well that isn't really related to this issue or even the application itself. I would report flatpak errors like that on flatpak after having searched if someone else have already reported it or something similar. And yes, Gnome Software still needs a lot of improvements to its flatpak plugin. From what I heard the 3.26 updates brings a lot of fixes. Since you used the Ubuntu branding for it I am guessing that is what you use, which would mean 17.10 should bring those fixes. What exact command did you use to update? Did you run it with sudo or as root? I used to do that initially but had all kinds of weird issues. So if you are I would say never run flatpak as root. |
i will next time... dunno why i haven't stated but i am on fedora 26...we will see gnome 3.26 in fedora 27 wich is due to being released on early december... anyway just run a normal "flatpak update" with no root at all... |
by the way the app is correctly working now... |
Since there have not been any new releases the problem likely is not fixed. Then again it is possible the issue is external. If the issue occurs again, feel free to leave the issue open. There is no need to close it and open it each time it seems to work again. |
unfortunately the problem isn't fixed yet...no internet connection again...i will reopen it again and leave it opened... |
I just installed on Arch via flatpák. It says no internet connection is available. |
Same issue here (No internet Connection Available) from Flathub Commit: c7cfdb578262f2a78f4c84e497f0252a68eb7bebb8ff2986db9ee1d5585ad829 |
Just like to report that the issue seems to be resolved. I downloaded it from flathub and I am able to download videos just fine. Version: 0.1.1 |
i've installed the application yesterday and it was working for the first few times...now if i open the app in as $ i get a "no internet connection estabilished", if i oep it via root i get "Traceback (most recent call last):
File "/app/bin/gydl", line 179, in prepareDownload
self.prepareVideo(DownloadDir)
File "/app/bin/gydl", line 136, in prepareVideo
+ "/%(title)s.%(ext)s" "UUU"")
TypeError: Can't convert 'NoneType' object to str implicitly"
in terminal...any suggestion?
btw i am using fedora 26 workstation, if needed...
The text was updated successfully, but these errors were encountered: