Tampermonkey freezing pages on loading (mostly Google searches)

Post Reply
MagicLegend
Posts: 7
Joined: 17.05.17 11:44:17

Tampermonkey freezing pages on loading (mostly Google searches)

Post by MagicLegend » 12.08.17 15:45:41

1.) UserAgent: (please keep this as it is)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36

2.) What Tampermonkey version do you use?
4.3.6

3.) Is this the browser where the problem occurs? If not: What browser version (go to 'chrome://chrome/') and operating system do you use?
Yes

4.) Does a Userscript cause the problem? If so, from where can it be downloaded?
Nope; even with all userscripts disabled the issue still occurs

5.) Did this work before? Have you checked the script's bug tracker/discussion page for that problem?
I only run into this error every once in a while

6.) Are there other Userscripts installed and running?
Installed yes; running no

7.) Steps to reproduce the problem:
a. Go to https://google.nl
b. Search for something

Yeah, not really reproducible... The error does exist on both my laptop and desktop with the same Google account (so the same extensions). If needed I can try to show the error live via teamviewer or something like that, given that from this description it might be impossible to gather enough information to see what's going on. If there is a way to let Tampermonkey log like crazy then I'd love to hear it; I might just be able to find the error myself by looking through the logs...

8.) What is the expected behavior? What went wrong?
Well, it should search; instead in the bottom-right it says "Waiting for extension Tampermonkey...". When disabling Tampermonkey via chrome://extensions it wil instantly continue in the search; indicating to me that the page is already loaded but it's stuck on something.

9.) Please provide any additional information below.
I haven't tried reinstalling Tampermonkey; but I highly doubt that's gonna solve my issue.

Please note; just a min ago it did this to every site I went to; never had it that extreme. A quick disable and enable solved that issue. The issue still remains on the Google page tho.

Thanks.

MagicLegend
Posts: 7
Joined: 17.05.17 11:44:17

Re: Tampermonkey freezing pages on loading (mostly Google searches)

Post by MagicLegend » 15.08.17 21:19:52

Addition;

After reading a bit about the logging from TM I found that it hangs on the "scriptman: determineScriptsToRun @URL" line. Possible bug found? Does there happen to be a way to let TM log even more? Would be nice to know :)

~ML

User avatar
derjanb
Site Admin
Posts: 2326
Joined: 20.01.06 02:16:15
Contact:

Re: Tampermonkey freezing pages on loading (mostly Google searches)

Post by derjanb » 16.08.17 22:39:03

I found that it hangs on the "scriptman: determineScriptsToRun @URL" line
Interesting. If "determineScriptsToRun" is the cause then one of your userscripts contains a very expensive @include or @match pattern. Is it possible to create a backup (you can also include the script's storage/config), remove all scripts and re-install them one-by-one and check which one contains the questionable line?

More information:
viewtopic.php?f=17&t=1121&p=4031#p4024
viewtopic.php?f=17&t=1254&p=4491#p4483
ImageIf you like what I'm doing, please consider a donation here. Image

MagicLegend
Posts: 7
Joined: 17.05.17 11:44:17

Re: Tampermonkey freezing pages on loading (mostly Google searches)

Post by MagicLegend » 16.08.17 23:05:28

I think I have a clue as to what script might cause the issue if what you're saying is true. But, shouldn't all pages hang like that given that it checks on every load? Does it check even if the script is disabled? Because even when all the scripts are disabled I still have the issue.

I'll give your suggestion a try tomorrow, I'll let you know the results as soon as I'm done :)

~ML

MagicLegend
Posts: 7
Joined: 17.05.17 11:44:17

Re: Tampermonkey freezing pages on loading (mostly Google searches)

Post by MagicLegend » 16.08.17 23:13:13

Well, maybe I should've read your links before asking :p

Please note that the issues you provide both mention that the complete browser hangs/has 100% cpu usage; but that is not the case here. The thread the page is on hangs indeed, but thanks to Chrome's design the browser itself stays functional. I should check what the task manager in Chrome is telling about the script... (<reminder for myself :p)

I saw that disabeling a script isn't enough to stop it from loading (err? Disabled should be disabled right? Why is the script still (partially) running?), which makes your suggestion more interesting. As I said previously, I'll give them a try tomorrow (on my ipad right now :wink:)

Thank you for your time!

~ML

MagicLegend
Posts: 7
Joined: 17.05.17 11:44:17

Re: Tampermonkey freezing pages on loading (mostly Google searches)

Post by MagicLegend » 17.08.17 13:51:48

These are the problem:

Code: Select all

// @include       /https?:\/\/((.+)\.)*stackoverflow.com.*$/
// @include       /https?:\/\/((.+)\.)*stackexchange.com.*$/
// @include       /https?:\/\/serverfault.com.*$/
// @include       /https?:\/\/superuser.com.*$/
// @include       /https?:\/\/stackapps.com.*$/
// @include       /https?:\/\/mathoverflow.net.*$/
// @include       /https?:\/\/askubuntu.com.*$/
They are from a script I use to have a dark theme on the SO site. When the script is no installed there is no issue, but as soon as I installed it back the problem occurred. All of my other scripts (some I've written myself) are luckily not the cause :)

When I remove the regex from the include tags the problem is solved. I'll create an issue on the Github page there and link to here. Maybe it's something for you to look into as to why this issue is caused by using the regex in the include tags.

Thank you for your time.

~ML

Post Reply

Return to “Bug Reports”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests