hoyois / clicktoplugin

Prevents plug-ins from loading automatically in Safari
http://hoyois.github.com/safariextensions/clicktoplugin/
228 stars 44 forks source link

click2plugin causing some pages to reload continuously? #182

Open ballo opened 7 years ago

ballo commented 7 years ago

This just started happening. Some youtube pages reload seemingly forever. Example:

https://www.youtube.com/watch?v=SMUZOYD1WDA&lc=z13tcnogboaifpiqb04ccrf4eladzpg5f4w.1496437944409572

ballo commented 7 years ago

Turning the extension off stops the reloading

a-greyyyyy commented 7 years ago

same thing happening here, too

https://www.youtube.com/watch?v=My4j3vgFxbE

@ballo what good does turning the extension off help? why even have it then?

poweruser82 commented 7 years ago

It happened to me too yesterday. I temporary solved reloading the page in a new tab. It doesn't work with the original @a-greyyyyy video (even cleaning the URL). The second URL didn't show the reload issue, but YT official HTML player couldn't find a suitable video. A reload fixed this.

ballo commented 7 years ago

Anyone find a work-around yet?

JohnBlackburne commented 7 years ago

It seems to have gotten less since I first noticed it. And my only fix is leave it alone, as after a few, or a few dozen, refreshes it seems to stop and load normally. I have had no luck identifying the problem, it’s happening too quickly for any error messages. I tried checking the Console log but saw nothing there (though am unsure what to look for)

ballo commented 7 years ago

I tried disabling CSS fix and switching the youtube killer to no avail. Sometimes it will clear up after a dozen reloads, but some reload forever. I have no idea what's going on

ballo commented 7 years ago

I deleted all the killers except:

https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTubeXHR.js

and it seems to work?! No idea if this is a fix or just a random working moment

ballo commented 7 years ago

Ah, disregard. It randomly worked a few times then reverted to the reloading bug

kevintosh commented 7 years ago

Strange thing, when I deactivate the Caches (Developer > Deactivate Caches) sometimes sort of work. Then when it crashes again, I reactivate them, and it works again for a while...

== EDIT: ==

I copy search results from the Console. When I try to view a page that crashes it loops into these notifications. I waited until a specific time to start the test and then copied only one iteration of the results (it reloads 4-5 times per second).

standard    23:49:00.396210 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.364000 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.364945 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.365719 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.366504 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.367275 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.367795 -0300   Safari  Received Media Remote client notification kMRMediaRemoteRegisteredCommandHandlersDidChangeNotification
standard    23:49:03.368294 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
standard    23:49:03.570195 -0300   Safari  Device (CURRENTMACHINE) Application (PID:293) Debuggable Changed (<private>)
standard    23:49:03.570330 -0300   Safari  Device (CURRENTMACHINE) Application (PID:293) Debuggable Changed (<private>)
standard    23:49:03.914339 -0300   Safari  Suppressing kMRMediaRemoteSupportedCommandsDidChangeNotification -- client process did not ask to receive these notifications.
standard    23:49:03.914636 -0300   Safari  Received Media Remote client notification kMRMediaRemoteRegisteredCommandHandlersDidChangeNotification
standard    23:49:03.958777 -0300   Safari  Received Media Remote client notification kMRMediaRemoteNowPlayingApplicationPlaybackStateDidChangeNotification
fehler  23:49:04.050156 -0300   Safari  Page (pid: 738) did fail navigation for <<private>> (Error: domain=NSURLErrorDomain, code=-999)
standard    23:49:04.117984 -0300   Safari  Device (CURRENTMACHINE) Application (PID:293) Debuggable Changed (<private>)
standard    23:49:04.118055 -0300   Safari  Device (CURRENTMACHINE) Application (PID:293) Debuggable Changed (<private>)
a-greyyyyy commented 7 years ago

anyone been working on this? i miss my clicktoflash.

ballo commented 7 years ago

Try private browsing. It seems to help, although this doesn't help me since I want to be logged in.

willxy commented 7 years ago

Seeing this today, too. I'm not sure when the last time it seemed to work okay -- looking at my browser history, perhaps 4 days ago.

il-demone-guardiano commented 7 years ago

it is rather random. even the same movie sometimes works, and sometimes keeps reloading. i can't get to debug what part of that veritable ocean of javascript coming from youtube is causing it.

JohnBlackburne commented 7 years ago

I tried watching it happen with the debugger open. It seemed to flash up with exceptions in base.js, part of Youtube. The problem is that consists of dozens of what look like highly used small subroutines. Setting a breakpoint is impossible without some better clue why it is happening.

il-demone-guardiano commented 7 years ago

you can enable "breakpoint at every exception", and walk out of them one by one. they appear to be "normal" or, at least, expected, as all are handled by try { ... } catch() blocks.

kevintosh commented 7 years ago

File base.js

First, Line 39398

var b = new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");

TypeError: undefined is not a constructor (evaluating 'new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.6")')

Makes sense, I don't have Flash installed (but it worked in the past without Flash. I think this doesn't matter)

Then, Line 20358 b = JSON.parse(b, void 0)

SyntaxError: JSON Parse error: Unexpected identifier "hd720"

I had set up my default res at 720 (in clicktoplugin settings), tried changing it to 360 or 1080, no luck.

It tries that a couple times (5-8 times), then goes crazy and starts throwing up a bunch of exceptions (I hate debugging JS, I'd rather behold a bucket of vomit).

Line 16989 throw Xm(FA); Line 50060 throw "Storage: Invalid value was encountered"; Line 50146 throw Al;

Then tries to parse JSON again a couple times, and then just reloads the page.

Will keep investigating...

kevintosh commented 7 years ago

@ballo in private mode doesn't work either, although it causes another exception:

Line 50114 return this.g.setItem("__sak", "1"), this.g.removeItem("__sak"), !0

QuotaExceededError (DOM Exception 22): The quota has been exceeded.

I just hope JS dies someday, just as Flash did. But please not as slowly.

ballo commented 7 years ago

Unfortunately, the only way JavaScript is ever going away is if it's replaced with a metalanguage like llvm bytecode.

kevintosh commented 7 years ago

I don't want to start a fire but I have a very different opinion than the average web designer. I just try to avoid JS as much as I can. I think there are better (IMHO) solutions or approaches to any JS-solved problem, but I repeat my statement: IMHO.

ballo commented 7 years ago

I've had that opinion since Netscape 2.0. I'm just being realistic.

il-demone-guardiano commented 7 years ago

the behavior is clearly timing-related: sometimes the same video will eventually stop reloading on his own, in other cases passing thru the http://m.youtube.com/(...) redirection the reload won't happen.

even if it happens quite frequently, it's very hard to reproduce the behavior in a controlled way.

il-demone-guardiano commented 7 years ago

in the end, the issue fixed itself. there was probably something actually wrong somewhere in youtube's code.

ballo commented 7 years ago

Yeah, it seemed to clear up. Hopefully it stays that way

a-greyyyyy commented 7 years ago

i noticed that there's been no issues the past week or so.

rojikada commented 7 years ago

Still doesn't work for me, did you do anything special? I tried deactivating all other plugins but video seems to be loading in the old player and never actually loads.

kevintosh commented 7 years ago

Same for me. Still doesn't load and give me a failed to load resource and a bunch of .js from syndication, ads and tags. :(

EDIT:

Oh, nevermind. Reinstalled it, fresh config and it worked. Funny thing, it loads a much bigger media bar now, just as is I were watching the mobile site. (the .js errors still there).

NOTE: Doesn't work along with AdBlock :( (on the other hand, I've installed AB only for blocking YT ads, which CTP does automatically although not intending to, so, no problem).

My config

killers: https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/CSSfix.js https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTube.js

Default media player: HTML5 Load auto yes

Initial behaviour: Autoplay Instant autoplay yes

kevintosh commented 7 years ago

Thread Revival:

Now some videos start to fail, giving the crossed play sign, different symptom. In the console a 403 Forbidden shows up for a resource coming from ...googlevideo.com/videoplayback... so, I assume that they broke something again. In that url call there are a bunch of parameters, even my IP... Strange stuff...

rojikada commented 6 years ago

Normal mode stopped working for me, but anonnymous window fixes it.

Screenshot

Anybody same problem and potentional fix for normal window?

ballo commented 6 years ago

If the PPC Safari works it may be due to the user agent. Do you know what the user agent of the working browser is? You can then check this using the "Develop" menu which allows one to use an arbitrary user agent.