FreeTubeApp / FreeTube

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

[Bug]: IINA won't open: giving javascript error #4132

Open gradygambrell opened 9 months ago

gradygambrell commented 9 months ago

Guidelines

Describe the bug

  1. Go to a video of choice
  2. Click on the video and let it play
  3. Click on the icon that allows to use another player
  4. When error occurs, I:
  5. Go into settings and click on the External Player section
  6. Click on "Ignore unsupported action warnings"
  7. type the full path of IINA player in the custom player (IINA is in my Applications folder)
  8. try again with no prevail.

Expected Behavior

To be able to open the IINA player.

Issue Labels

feature stopped working, text/string issue, usability issue, visual bug

FreeTube Version

v0.19.1 and nightly 3525

Operating System Version

macOS Sonoma 14.0

Installation Method

.dmg

Primary API used

Invidious API

Last Known Working FreeTube Version (If Any)

No response

Additional Information

I check the issue here, but hasn't be responded since Sept 5th (unsure if it's this year or 2022):

https://github.com/FreeTubeApp/FreeTube/issues/2158

The thing is closed and is unsure if an solution have been made.

I have used the nightly build, with no success.

Nightly Build

ChunkyProgrammer commented 9 months ago

have you added the directory of your IINA executable to your path environment variable?

gradygambrell commented 9 months ago

have you added the directory of your IINA executable to your path environment variable?

I have tried that, still gave me the Javascript error:

Uncaught Exception:
Error: spawn /Applications/IINA.app/Contents/MacOS/IINA  ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
efb4f5ff-1298-471a-8973-3d47447115dc commented 9 months ago

@trostboot any thoughts one this?

trostboot commented 9 months ago

I don't have any Apple devices so can't really debug this. Does spawning external players work at all on MacOS the way it's currently implemented? @gradygambrell test it with e.g. mpv.

gradygambrell commented 9 months ago

I don't have any Apple devices so can't really debug this. Does spawning external players work at all on MacOS the way it's currently implemented? @gradygambrell test it with e.g. mpv.

Tried MPV without any path name (default folder is /Applications/mpv.app and gives me this JS error:

Uncaught Exception:
Error: spawn mpv ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Tried with this path name: /Applications/mpv.app/Contents/MacOS/mpv-bundle and it opens the application, but then closes right away.

Tried VLC player using /Applications/VLC.app and another JS error appeared.

Uncaught Exception:
Error: spawn vlc ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

HOWEVER, using this path in the custom path: /Applications/VLC.app/Contents/MacOS/VLC, I was able to open it via VLC. Had to do an extra step by clicking on the title of the video to play.

TL;DR: mpv didn't work. VLC does, but with an special path.

ChunkyProgrammer commented 9 months ago

Could you send a screenshot of your external player configuration?

gradygambrell commented 9 months ago

Could you send a screenshot of your external player configuration?

Yes.

Screen Shot 2023-10-17 at 2 14 31 PM

(This one is after everything is loaded) Screen Shot 2023-10-17 at 2 14 24 PM

vdbhb59 commented 9 months ago

This works fine for me on Windows as well as Linux. I usually have miniplayer, potplayer and inbuilt linux ones, and each one plays fine. 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.

sebma commented 7 months ago

I have the same Javascript error. BTW : Is IINA an mpv based player for macOS ?

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.

superfreeman1989 commented 6 months ago

Same issue on macos

avfx commented 5 months ago

same issue on linux (fedora 39) using mpv, open a youtube video directly with mpv from the shell works, but not from freetube

trostboot commented 5 months ago

same issue on linux (fedora 39) using mpv, open a youtube video directly with mpv from the shell works, but not from freetube

Hm, I can't repro this @avfx . Fresh Fedora 39 VM, updated to latest packages, only with the minimum additional packages needed for mpv and Freetube dev. Freetube default settings aside from external player -> mpv. Works from both the shell as well as from Freetube. Could you give it a try with a fresh profile with default Freetube settings and see if it still breaks?

avfx commented 5 months ago

I did a Fresh Fedora 39 VM using VirtualBox, installed mpv , youtube-dl and freetube. All runs with default settings, mpv opens a YouTube video from the shell and Freetube still gives me the same error as I have in my host machine (see below). I originally thought it's because I have the flatpak version of mpv on my host and I used yt-dlp instead of youtube-dl, but it didn't seem to be the case as I didn't use flatpak on the VM and I used youtube-dl.

Screenshot from 2024-02-16 04-15-36

avfx commented 5 months ago

Thanks @trostboot. I found the issue, it's running the flatpak version of Freetube. It works when I use the rpm version.

trostboot commented 5 months ago

Okay well that makes more sense given the nature of Flatpaks. I have no idea if the MacOS version is similarly sandboxed as to cause the original issue, but either way, this is a bit out of my wheelhouse and not something I personally have the time to look deeper into.

jurekcy commented 5 months ago

I have the same issue with VLC on Win10. Fresh install of Freetube (I am new joiner) obraz

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.

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.

superfreeman1989 commented 2 months ago

Issue still exists in latest release

rishikanthc commented 2 months ago

YUpppp just tried and have the same issue.

github-actions[bot] commented 1 month 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.

ngocphamm commented 4 days ago

For me on macOS, putting /opt/homebrew/bin/iina into the Custom External Player Executable input works, as I installed iina with Homebrew.