exebetche / vlsub

VLC extension to download subtitles from opensubtitles.org
1.34k stars 346 forks source link

Extension not responding error on VLC 3.0 #198

Open SitramSoft opened 6 years ago

SitramSoft commented 6 years ago

image

Vlsub 0.10.2 displays the "Extension not responding" error when I tried to use it in VLC 3.0. The error appeared after I pressed "Search by name" button and it didn't disappear even after the subtitles were found. When I press Yes button, VLC crashes.

ThatLurker commented 6 years ago

Try taking the .lua file directly from the repo

gorodoe commented 6 years ago

Same Issue:

(with VLsub downloaded from this git hub: 0.10.2) VlSub on VLC 3.0.0 working on some videos, some not working. Also when using VLsub on a video, it'll work the first time, IF the second time i try (after deleting the sub) and left only with the video, sometimes it'll failed to even open the Vlsubs. On Some videos, clicking by hash/by name will make vlsubs not responsive as well, sometimes clicking download selection make it unresponsive as well. (window (not responding))

When vlsub is working in searching the subtitiles, sometimes the extracted sub is 0 kB, thus an empty subtitle is loaded to VLC (the .zip file is still in the directory).

Here are the logs:

This happened when the subtitle list appear, and then clicking "download selection", which then only 0 kB .srt appeared with the zip files still intact.

lua warning: Error while running script C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua, function (null)(): ...am Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua:1784: attempt to index local 'stream' (a nil value)

While this is logged when opening VlSubs via View > VLsub, but nothing appeared. Sometimes moving the video to another directory, allows VLSub windows to appear, but the first error could sometimes appear as well

lua warning: Error while running script C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua, function activate(): ...am Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua:1423: bad argument #1 to 'match' (string expected, got nil)
lua error: Could not activate extension!
lua debug: Deactivating 'VLsub 0.10.2'
GioGr commented 6 years ago

i have a 2GB movie in a slow hard drive and it takes a while to find the hash but it does find it , but before it finishes i get this error extension not responding and while behind it it has finished finding the hash and subs i stuck with this message that w/e ill do will crash vlc/ not let me download subs , like an unresponsive window

edit: at 2.2.8 the extension not responding disappeared and the windows was responsive and i downloaded the sub, so prob the fault is wit vlc not refreshing/checking again to see if extension responsive

Dimas-sc commented 6 years ago

Same here

lguerard commented 6 years ago

Same error on my side.

SitramSoft commented 6 years ago

@pahakalle I took the latest version of the lua from the repo and the error did not appear. I wasn't able to download the subtitle because it appeared to be stuck. I only had time to test on one movie and as soon as I get back home I'll do a few more tests.

SitramSoft commented 6 years ago

@gorodoe How did you get the logs?

gorodoe commented 6 years ago

@SitramSoft Start VLC > Ctrl+M > on the lower left corner set the number from 0 to 2 (debug), and then replicate the issue.

ghost commented 6 years ago

same here

SitramSoft commented 6 years ago

Searching for an subtitle doesn't seem to report any error. I got a list of subtitles in VLsub

main debug: auto hiding mouse cursor lua debug: Clicking 'C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua': 'Search by name' main debug: net: connecting to api.opensubtitles.org port 80 main debug: connection succeeded (socket = 2368) main debug: auto hiding mouse cursor main debug: net: connecting to api.opensubtitles.org port 80 main debug: connection succeeded (socket = 2344)

SitramSoft commented 6 years ago

Clicking a subtitle then "Download selection" button shows an error and the "Downloading subtitle" bar becomes green and seems to be stuck.

Error seems to be at line 1830

lua debug: Clicking 'C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua': 'Download selection' main debug: net: connecting to dl.opensubtitles.org port 80 main debug: connection succeeded (socket = 2364) lua debug: [VLsub] tmpFileName: E:/Films/Movie.srt.gz lua debug: [VLsub] Subtitles files: E:/Films/Movie.srt main debug: creating access: zip://file:///E:/Films/Movie/Movie.srt.gz!/Movie.srt main debug: (path: \file:\\E:\Films\Movie\Movie.srt.gz!\Movie.srt) main debug: looking for access module matching "zip": 25 candidates main debug: no access modules matched main error: no suitable access module for `zip://file:///E:/Films/Movie/Movie.srt.gz!/Movie.srt' lua warning: Error while running script C:\Program Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua, function (null)(): ...am Files (x86)\VideoLAN\VLC\lua\extensions\vlsub.lua:1830: attempt to index local 'stream' (a nil value) lua warning: Could not translate click

SitramSoft commented 6 years ago

I did some debugging with my limited LUA experience and I found out that most of the time VLC reports the extension is not responding. Function http_req() seems to be this problem. This function is called from the searchIMBD() when the user search for a subtitle by name. It opens a connection to the opensubtitles.org server, setts POLLIN flag, sends a request then receives 2048 bytes. Using regex it searches for a certain pattern in the response in what appears to be header processing. Next it gos in the contentLenght processing where "bodyLength >= contentLength" returns true. After this I see in debug window that http_req() is called again. The second time the function is called VLC usually reports that the extension is not responding. I can't figure out from where the second call comes.

pmahend1 commented 6 years ago

I debugged this. As everybody mentioned error is there at attempt to index local 'stream' (a nil value) --> data = stream:read(65536) line. In my case it was line 1784. This is because local stream = vlc.stream(tmpFileURI) is NIL. I cross checked tmpFileURI & tmpFileName are not nil This is giving error no suitable access module for `zip://file:///:// at line 135 of vlc-3.0.0\src\input\stream.c

Main issue lies in module.c of vlc in which it tries to find matching modules for zip(gz) type of file types. vlc-3.0.0\src\modules\modules.c at line 325

This is happening either due to VLC_ETIMEOUT or no shortcuts matched.

266        if (!strcasecmp ("none", shortcut))
267           goto done;
302            switch (ret)
303            {
304                case VLC_SUCCESS:
305                    module = cand;
306                    /* fall through */
307                case VLC_ETIMEOUT:
308                    goto done;
309            }
310        }
311    }

279            int ret = module_load (obj, cand, probe, args);
280            switch (ret)
281            {
282                case VLC_SUCCESS:
283                    module = cand;
284                    /* fall through */
285                case VLC_ETIMEOUT:
286                    goto done;
287            }
288        }
289    }
ankitydv193 commented 6 years ago

So I changed the HTTPVersion from '1.1' to '1.0' and now it doesn't give me 'not responding' but now the extension is frozen(not exatly frozen but it stops there and doesn't complete the task) with the bar completed. It downloads the zip but it doesn't finish unpacking the .srt file and linking it to the video file. If i select another subtitle and press download selection, it downloads another zip but doesn't do anything. screenshot 2

ThatLurker commented 6 years ago

seems like vlc 3.0.0 removed the zip module.

ankitydv193 commented 6 years ago

Any fixes?

pmahend1 commented 6 years ago

I am using VLC 2.2.8 till they fix it. vlc 3.0 is stable release so not sure when they are gonna fix it .Even VLC nightly 4.x seems to have the issue.

pmahend1 commented 6 years ago

I raised VLC bug but VLC team says its issue with LUA script. It doesnt seem so.

ankitydv193 commented 6 years ago

Yeah. The same script works with 2.2.8 so it must be a compatibility issue. Even I shifted to VLC 2.2.8 for the time being. Will wait for a few more releases before I start using VLC 3.x again.

pmahend1 commented 6 years ago

Yes. Some code fix , I was trying but could not figure out. Seems its either with the function which creates tempfile name or VLC access modules.

With VLC 3.0.1 the default VLSub which comes with it(0.10.0 but incorrect version displayed and its compiled into luac to hide the code ) downloads and writes SRT and deletes zip but fails to load it due to some error in concatenation. One can manually load that SRT though.

jeffangama commented 6 years ago

Hi, thx for the great extension, is there a workaround to fix this issue ? thank you

jflambert commented 6 years ago

Even with VLC 2.2.8 I'm having issues with vlsub 0.10.2

Is there an alternative in Windows?

pmahend1 commented 6 years ago

Upgrade VLC to latest. It doesn't have issues anymore. At least for me.

Regards, Prateek

On Wed, Jul 11, 2018, 9:45 PM jflambert notifications@github.com wrote:

Even with VLC 2.2.8 I'm having issues with vlsub 0.10.2

Is there an alternative in Windows?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/exebetche/vlsub/issues/198#issuecomment-404363096, or mute the thread https://github.com/notifications/unsubscribe-auth/AUXRptvnTDKxKivO9H83d3S6hGT1unRvks5uFqoogaJpZM4SBD6u .

FreyjaValkyrja commented 6 years ago

I have the latest version of VLC and VLsub is 0.11.0 version and 2 days now I'm getting that issue you all seems to have. How can I solve it?

screenshot_1

jflambert commented 6 years ago

2.2.8 has also stopped responding w/ 0.10.2. I didn't even know there was a 0.11 version of the extension.

rickmasterss commented 6 years ago

this extension has to be some kind of joke, it never works and always crashes vlc.

ThatLurker commented 6 years ago

@rickmasterss the dev hasn't worked on this for quite some time and vlc made some changes in the few latest releases that messed up the plugin.

FreyjaValkyrja commented 6 years ago

I discovered a way to make the plug work, its a bit unorthodox though. I plug laptop to my TV (as projector etc with extended option) and once I press VLSub I simply drag the box into the laptop screen and then press the search button. It always works for some mysterious reason. Now there are times that I want to see movie only in my laptop, I wont lie, there are times the plugin is acting stubborn. But if I do a quick restart on my laptop or close/open vlc for about 10 times it works. Again dunno if that will help other users, but at least for now, until the issue resolves, it works for me.

s1h4d0w commented 6 years ago

It works for me some times, and other times it won't. One time I'll have to restart VLC twice to make it work, other times it works perfectly immediately. Need to note that I always use the "Search by name" button though.

Are you guys sure it's not OpenSubtitles timing out and jamming the plugin? Mine usually only hangs when I click either the "Search by name" or "Download" buttons.

Mark-Joy commented 5 years ago

Update to latest VLC or get VLSub 0.11.0 directly from here: https://github.com/videolan/vlc/blob/master/share/lua/extensions/VLSub.lua It still hangs some times but works most of the times.

sanishkr commented 5 years ago

It was working with till few days ago. Sometimes the error mentioned in the top screenshot came, but it still worked after restarting VLC. Now it just hangs. I mean the subtitle search results come but nothing happens when trying to download one. I tried updating, reinstalling etc....Somebody, please help.

s1h4d0w commented 5 years ago

Same has been happening to me. I can search by hash or name, but clicking “download” just shows an empty “downloading” bar forever. Maybe OpenSubtitles problems?

sanishkr commented 5 years ago

Yeah just hoping somebody from VLC or OpenSubtitles or vlsub notices this and helps. In fact, it started working for me as of now. Maybe they fixed it or maybe coz I downloaded VLC 2.2.5.1

chouquette commented 5 years ago

This looks like this plugin version is missing https://github.com/videolan/vlc/commit/5dce456220313ea22dc0e771463848cbe39933f5 (and possibly the other VLSub commits of the same period)

chouquette commented 5 years ago

Though from what I can see, this VLSub version hasn't been maintained for 2 years, I'd encourage you to use the version shipped as part of VLC, and report bugs to https://trac.videolan.org/vlc instead

If you overrode VLSub.lua in your VLC install, a VLC reinstall should be enough

stapuft commented 5 years ago

Though from what I can see, this VLSub version hasn't been maintained for 2 years, I'd encourage you to use the version shipped as part of VLC, and report bugs to https://trac.videolan.org/vlc instead

If you overrode VLSub.lua in your VLC install, a VLC reinstall should be enough

hmmmm if only that worked, but it doesn't why the fuck do you think so many people are complaining about it!!!!!!

chouquette commented 5 years ago

Thanks for taking the time to politely expose exactly what doesn't work, with logs, or a clear procedure.

For what it's worth, the version shipped with VLC works for me. Out of the box.

RM6SS62 commented 4 years ago

same issue here, happens randomly

LeaTex commented 4 years ago

Same issue.

VLC 3.0.8 imagen

VLSub 0.11 imagen

But it occurs randomly.

austonricardo commented 4 years ago

I have fixed it with this steps: 1-Open the folder C:\Program Files\VideoLAN\VLC\lua\extensions\ 2-Rename file VLSub.luac to VLSub.luac_old. 3-Download https://github.com/videolan/vlc/blob/master/share/lua/extensions/VLSub.lua to extensions folder.

Good luck!

AllAdIn2708 commented 4 years ago

@austonricardo

What donwload, i can't find one?

omki12 commented 4 years ago

they have implemented authorization due to the recent DDoS Attack. all you have to do is,

Go to https://www.opensubtitles.org/en/newuser Register Confirm Email and sign in Open VLC -> View->VLSub->Show config and enter your username and password and click save. Restart and It's done.

AllAdIn2708 commented 4 years ago

@omki12

Thanks my friend, it's done! :)

But you must be logged-in on www.opensubtitles.org

saulotoledo commented 4 years ago

@austonricardo The fix doesn't work on MacOS. I used the GitHub version, but the extension dialog doesn't even open anymore.

t0ma5 commented 4 years ago

I tried logging in opensubtitles.org with my account on Firefox AND on the VLsub plugin.. so far so good, it seems to be working.

binodmx commented 4 years ago

@omki12 That method works!!

tchevri commented 3 years ago

they have implemented authorization due to the recent DDoS Attack. all you have to do is,

Go to https://www.opensubtitles.org/en/newuser Register Confirm Email and sign in Open VLC -> View->VLSub->Show config and enter your username and password and click save. Restart and It's done.

A LOT BETTER - THANK YOU!!! BUT Still experiencing the issue with VLSUB 0.11.1 that ships with vlc vetinari 3.0.12... (at least, now it crashes AFTER the subtitle fetched, which it does a LOT faster).

tchevri commented 3 years ago

I have fixed it with this steps: 1-Open the folder C:\Program Files\VideoLAN\VLC\lua\extensions 2-Rename file VLSub.luac to VLSub.luac_old. 3-Download https://github.com/videolan/vlc/blob/master/share/lua/extensions/VLSub.lua to extensions folder.

Good luck!

That definitely did not work for me - now when i click vlsub - nothing happens, instead of the dialogue box opening...

s1h4d0w commented 3 years ago

I also still have the same issue appearing, albeit way less frequent. The plugin generally works fine, but a few days ago it just hung repeatedly, forcing me to force-close VLC a few times before just giving up on downloading subs through it. I assume it's some issue with opensubtitles bugging out/being unavailable?

I've honestly most often opted to not use the "search by hash" feature as that has given me most problems in the past. I usually play video files with my torrent application still open, maybe some sort of issue accessing the file in that situation, even though VLC can access it fine? Searching by name generally works just fine.