probonopd / go-appimage

Go implementation of AppImage tools
MIT License
812 stars 71 forks source link

Trying to use go-appimage to deploy, no internet connection? #298

Closed Samueru-sama closed 1 month ago

Samueru-sama commented 4 months ago

Hello, I have this appimage of mpv that I'm trying to migrate to using go-appimage for deploy: https://github.com/Samueru-sama/mpv-AppImage/releases/tag/continuous

It uses the static build scripts of mpv and that's why it is that small.

At first running the deploy everything appimage with a youtube link causes it to give python errors, which are caused because python isn't bundled in the appimage.

Unsetting the $PYTHONHOME variable inside the AppRun gets rid of the python errors, however now I get a different error that seems to be a lack of internet connection?

~/squashfs-root/ ./AppRun "https://www.youtube.com/watch?v=tNPZ473qtg4"                                                                                                                                                              3719ms 
[ffmpeg] tcp: Failed to resolve hostname www.youtube.com: System error
Failed to open https://www.youtube.com/watch?v=tNPZ473qtg4.
[ffmpeg] tcp: Failed to resolve hostname rr5---sn-5pgux3nva0upvon8x-h5gl.googlevideo.com: System error
Failed to open https://rr5---sn-5pgux3nva0upvon8x-h5gl.googlevideo.com/videoplayback?expire=1720853382&ei=Js-RZqP6JsSsy_sPsYSCwAw&ip=38.25.134.72&id=o-ACdk_qSmmO1Aygyiw96Q1tElWYxjHWptqTE1-9Ztf4sn&itag=328&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=gy&mm=31%2C29&mn=sn-5pgux3nva0upvon8x-h5gl%2Csn-hp57kn6y&ms=au%2Crdu&mv=m&mvi=5&pl=19&initcwndbps=903750&bui=AXc671LPqcOt1JJ1I2CkvKH_eqpl3fZckx7IGKSQDXHANnKc1eBze1hdgUvVXQsr5ofV1deKeXswAqfk&spc=NO7bAbjtzz4F-2PI5gvn5r8iljmXkXaar9ji8B9nB1UL_iUMmHf3xxxDvv1U&vprv=1&svpuc=1&mime=audio%2Fmp4&ns=PrN2WSV6SIty4pWZOCdb4-4Q&rqh=1&gir=yes&clen=17228203&dur=358.816&lmt=1720485905546628&mt=1720831287&fvip=5&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=p8D9fRZGgoRSXg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgXRmiCi2cSlUenpfKa0-3xqOanyoQwsWkpn2Ud1d_bv8CIQD62CU3ofKWjz7Cs7EfYf4DusAY3LbrD6-jmETooHxPmg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRAIgK3Xr4RdZL-9Q4IsTqOjYbaty-TNPrmyvXgqmtoQ1MCkCIBQSIufiazwLm7YWrroW3o2PHFXEEqgnxOgqAU_WJHy3.
EDL: Could not open source file 'https://rr5---sn-5pgux3nva0upvon8x-h5gl.googlevideo.com/videoplayback?expire=1720853382&ei=Js-RZqP6JsSsy_sPsYSCwAw&ip=38.25.134.72&id=o-ACdk_qSmmO1Aygyiw96Q1tElWYxjHWptqTE1-9Ztf4sn&itag=328&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&mh=gy&mm=31%2C29&mn=sn-5pgux3nva0upvon8x-h5gl%2Csn-hp57kn6y&ms=au%2Crdu&mv=m&mvi=5&pl=19&initcwndbps=903750&bui=AXc671LPqcOt1JJ1I2CkvKH_eqpl3fZckx7IGKSQDXHANnKc1eBze1hdgUvVXQsr5ofV1deKeXswAqfk&spc=NO7bAbjtzz4F-2PI5gvn5r8iljmXkXaar9ji8B9nB1UL_iUMmHf3xxxDvv1U&vprv=1&svpuc=1&mime=audio%2Fmp4&ns=PrN2WSV6SIty4pWZOCdb4-4Q&rqh=1&gir=yes&clen=17228203&dur=358.816&lmt=1720485905546628&mt=1720831287&fvip=5&keepalive=yes&c=WEB&sefc=1&txp=5532434&n=p8D9fRZGgoRSXg&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgXRmiCi2cSlUenpfKa0-3xqOanyoQwsWkpn2Ud1d_bv8CIQD62CU3ofKWjz7Cs7EfYf4DusAY3LbrD6-jmETooHxPmg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHlkHjAwRAIgK3Xr4RdZL-9Q4IsTqOjYbaty-TNPrmyvXgqmtoQ1MCkCIBQSIufiazwLm7YWrroW3o2PHFXEEqgnxOgqAU_WJHy3'.
○ Subs   --sid=1  --slang=en-GB  'English (United Kingdom)' (webvtt) [external]
No video or audio streams selected.
Exiting... (Errors when loading file)

I tried copying my /etc/resolv.conf to the AppDir etc/resolv.conf and it didn't work, same error. So now I'm stuck, I have a feeling that I'm missing something very simple lol.

probonopd commented 4 months ago

You don't neet /etc insnide the AppDir. We are not using sandboxing.

Is ffmpeg deployed using go-appimage?

Samueru-sama commented 4 months ago

You don't neet /etc insnide the AppDir. We are not using sandboxing.

The etc directory gets created by go-appimage when deploy everything gets used, it contains a fonts dir inside.

Given that there was an etc directory I thought that the issue was a lack of a resolv.conf file but it wasn't that anyway.

Is ffmpeg deployed using go-appimage?

If I'm not mistaken ffmpeg is statically linked inside the mpv binary. Local videos do play in both without issues.

Also for some reason the mpv binary inside the appimage deployed with go-appimage is much bigger than the mpv binary inside the linuxdeploy made appimage 🤔

I think I need to test without deploying everything with go-appimage to see if the internet errors are still there.

Samueru-sama commented 4 months ago

Alright the issue only happens when the bundle everything mode is used, it doesn't happen when not everything is deployed with go-appimage.

https://github.com/Samueru-sama/mpv-AppImage/releases/tag/continuous

The one with deployall in the title has the connection errors, while the one titled go-appimage doesn't use the deploy everything mode and doesn't have the issue.

And the third one is just the one made with the old method using linuxdeploy which I will remove for the go-appimage method once I finish testing it.

It's a shame I get those connection errors when deploy everything is used, as that appimage works everywhere including on alpine linux.

probonopd commented 4 months ago

You'd now need to find out what is going on (what fails) using tools like strace...

Samueru-sama commented 1 month ago

Alright the issue has been "fixed" or better said I don't know if there was an issue even, turns out that all that needed to be done was build mpv on ubuntu 24.04, so here is what happens:

I also tested building on alpine linux and it that case it also breaks yt-dlp, I have no idea why it only works when built on ubuntu 24.04.