-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Headless Version #39
Comments
This may help with head start
|
A docker container would be cool. The UI could work as Web only, so a version of Powder Web without Electron should be possible. But there is a big drawback with this, Electron isn't used just for the Windowed App, it's also used for select folder / file boxes (which Node.js has absolutely no native method for). But selecting folder / file can only be done locally anyway, so it could be changed to a string input that should point to folders / files.. My biggest limitation right now is finding the required time to work on this.. |
I've renamed this to "Headless Version" and tagging it as a priority task. There might be many other good reasons to have a headless version. It will stay as a priority task unless I can find good enough reasons why Powder Web would dependent on Electron. |
@tekicat I've made a separate branch for the headless version. And did get a version of Powder Web to work completely without Electron. I never tested it with Docker though, it would sure help if you could test it.. If the lines you previously posted are correct, to use the headless branch you should use:
|
@jaruba With the below docker file
I get a 404 on opening
Am I missing something here ? |
This seems to be the only error, and it says that something is trying to connect to
You could also try using the LAN IP instead of |
Same here, even before trying to open any browser. Just launching "npm run start-headless" get those 2 lines of output (master key + connect ECONNREFUSED 127.0.0.1:80) Then if I try to open a browser (through internet in my case), I get "404 File Not Found" in the browser and on the server I get something like: I used a totally different DockerFile (to test) I doubt this is linked to Docker |
FYI, I fiigured out this issue... |
Coming back again for updates on the topic... So now I confirm, that the headless is working in docker. Need to merge all the new changes, and try to keep this version up to date in the future :) |
@Tekka90 Wow, I'm glad to hear u got it working, but the headless branch still needs to be updated to the latest version, and I should release it separately too. Sorry for the late response, I was on vacation. I'll look into it a bit more too when I have some time, and I always wanted to make an official release of the headless version available. |
@Tekka90 I updated the |
@Tekka90 if all that was needed was the |
Hi @jaruba
RUN apk add git && USER powderweb WORKDIR /app/ RUN git clone -b headless https://www.github.com/jaruba/PowderWeb.git && WORKDIR /app/PowderWeb EXPOSE 3000 I did the sed to get readable logs otherwise am flooded with warnings...
|
I can add that the bin folder with its content is there .. In the container if I try to launch torrent-thread I get the same « not found » even though it is there... |
well, i made torrent-thread too, so i'm sure it can be solved what OS and what architecture are you running your Docker installation on? |
@jaruba The host machine should not matter... the OS torrent-thread is running on in minimalist (alpine, node version as you can see in the Dockerfile. |
@Tekka90 i'll try to answer as best i can:
There's a chance that |
@jaruba Sorry I missed the part about needing a specific version of Nodejs sorry :( /app/PowderWeb/node_modules/youtube-dl/lib/youtube-dl.js:33 ReferenceError: ytdlBinary is not defined I assume something is missing in my Image :( |
This is a certificate issue while npm install Error: certificate has expired |
I know: przemyslawpluta/node-youtube-dl#310 And the error you got from I'm more curious why it worked for you to install |
I think this is why I think i may be able to fix this by disabling certificate validation in my fork of I'll try it a bit later tonight. |
@Tekka90 I made the change, but did not test it. I think this has a good chance of fixing everything, please try to build the docker image again at your earliest convenience. |
@jaruba Again, the file /app/PowderWeb/bin/torrent-thread/torrent-thread does exist in the container, and if I try to launch it using command line, I get the same result ! For reference, this is the new Dockerfile: RUN apk add git && USER powderweb WORKDIR /app/ RUN git clone -b headless https://www.github.com/jaruba/PowderWeb.git && WORKDIR /app/PowderWeb EXPOSE 3000 Could be linked to another issue I see at build time :
(node:17) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit |
FYI, linked to my previous message, the issue with torrent-thread is not linked to the warning... /app/PowderWeb $ /app/PowderWeb/bin/torrent-thread/torrent-thread |
@Tekka90 the "not found" error can also happen if a html page / http error leaked into the |
Yes I can open it, and the content is binary, I also tried to change rights (777), same issue... I will try to build it from source and see if I have the same issue or not |
@Tekka90 building from source is more trouble then it's worth, i'll add some logs to the install scripts of |
aw snap, yeah, that's definitely my fault |
@Tekka90 try now, it should be fixed |
@jaruba
|
I confirm it is ok for me too ! Error: spawn /app/PowderWeb/bin/ffmpeg/linux/ia32/ffprobe ENOENT npm ERR! A complete log of this run can be found in: |
Yes it does exist and I can launch it by hand this time, I guess again a missing lib, I m looking into it |
@jaruba I tried in a Debian instead but get the same error... What difference could there be between opening the same video in Safari (same issue in iOS, iPadOS and MacOS, all same issue) and Chrome ? |
@Tekka90 Some videos might already be compatible with playback in Chrome, but not on Safari, as they support different video types. If the file is already compatible, then transcoding should not be needed at all. The strange thing is that regardless of if the video is compatible or not, But generally speaking, video playback wise, Safari only supports HLS, while Chrome (and other browsers) support MP4 containers. |
Do you know of an open torrent containing a file not compatible with Chrome to force transcoding ? |
@Tekka90 i don't think this is a transcoding issue either, it's a strange issue tbh, i'll try to find a way to reproduce it |
@tekicat I fixed "Download Playlist" on remote devices, you can try it out when you have time. |
@Tekka90 your issue is a complete mystery to me though, if i play in the web browser from Chrome, the command: goes through without any issues then if i play in the web browser from Safari, the exact same command is made and it gives the |
TBH, i don't see how the same command can have 2 different results depending on the client browser, I'm wondering if something else isn't happening here.. maybe docker is the one that's crashing, and the |
Nope, this is not a Docker specific issue, I can 100% crash it the exact same way even while running the headless version locally without Docker. 😳 I've totally tested in Safari in the past, so this comes as a complete surprise for me now. |
Hi @jaruba |
Sorry I found a bug, I wanted to use the "donate" button, it is only sending you to /# with nothing else :) |
@Tekka90 That's a nice find actually, as Powder Web was initially built with a GUI version to be used locally, pressing external links makes a server call to open the link (as the GUI version is not a common browser) I obviously see now how this logic for opening links was essentially flawed. I'll fix it so external links work remotely too. Btw, I'm not sure if you know this, but when you run the Docker image, it shows a master key in the logs. This master key changes every time you run it, and the master account can be accessed by going to: By accessing the master account, you get many more administrative specific settings. I'll look into adding Chromecast support to the web player too. |
@jaruba Yes I know about the masterkey :) |
@Tekka90 Cool setup you got, that's one of the many ways this project was meant to be used, personally I use it locally to just start torrents directly in my preferred video player, and it's faster then any other project I ever tried before for this purpose. I also use it to stream to different devices around the house, even used it to stream lower res transcoded videos (to save on data usage) to the tablet in my car when i got stuck in traffic jams. It's pretty much the swiss army knife of streaming. |
I've made quite a few important changes:
Please test it when possible, some of these (db persistency and the update message) are important to have in the headless version imo. |
Although I believe that the DB persistency issue is solved now in case of restarting or writing failures, I'm still uncertain how to handle DB and downloaded content persistency through docker image updates, because afaik docker doesn't really update, it just creates new images. Is updating internally (through the app, which has not yet been implemented) the only way to preserve the current user data and downloads with docker? Any tips in regards to this topic would be appreciated, as you have probably used docker more then I have. |
Hi @jaruba Regarding persistence of the data, here is how it works in Docker.
Then will come the question "what do we put in the image ?" Compiled code ready to use but not easy to update without a new image (usually my preferred solution, and what is done now). Or image ready to build the code, downloading a prepackaged version of the code (prebuild somewhere). Or worse case an image ready to build which would git clone the code and build at start... |
But then you are only persisting your user data, not the downloaded videos too, as you did not create a symlink for the downloaded videos. The items would still show in the dashboard this way (as they are part of the user data), and I believe they would even be playable as it would just restart the download every time you play something. |
You are right, data is not kept in my case |
I guess as long as the user data is persisted properly, and users can change the download folder, that should be enough for users to create a symlink for the download folder if they want to. I'll might change this in the future if users start complaining about it though, but from my experience, the temp folder being the default is better for user experience. |
Due to the fact PowderWeb is dependent on xdg/gui for intial login. Containerising such and amazing tool had become a nightmare. Is there any plan on releasing a docker container ?
The text was updated successfully, but these errors were encountered: