Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught pagejs missing #1617

Closed
adipiciu opened this issue Oct 12, 2022 · 16 comments
Closed

Uncaught pagejs missing #1617

adipiciu opened this issue Oct 12, 2022 · 16 comments

Comments

@adipiciu
Copy link

adipiciu commented Oct 12, 2022

(Please fill out the issue template with your details)

Expected Behavior

No errors should appear.

Actual Behavior

Starting after the upgrade to Tampermonkey 4.18.0, the error "Uncaught pagejs missing" appears. Scripts are not running. Refreshing the page 4-5 times and sometimes scripts are loading.
Similar to issue #1528

Restart browser, restart pc doesn't fix. Violentmonkey works ok.

Specifications

  • Chromium: Chrome 106

Script

Any script

@derjanb
Copy link
Member

derjanb commented Oct 13, 2022

Can you please backup your scripts and settings, uninstall and re-install Tampermonkey and try again?

Thanks.

@adipiciu
Copy link
Author

I tried on chromium on Android to uninstall tampermonkey and it works ok after reinstalling it (I had same issue on android)

On Windows, I tried with another method and it seems to work: disable tampermonkey extension, restart browser, enable tampermonkey back. The browser restart is needed. But this way you don't need to reinstall tampermonkey.

@derjanb
Copy link
Member

derjanb commented Oct 13, 2022

Thanks for testing and finding the enabled/disable workaround.

This shows, that this is a bug in Chrome. It does not execute the content scripts in the right order if Tampermonkey was updated from a 4.16.x version. 😔

@doggy8088
Copy link

I tried on chromium on Android to uninstall tampermonkey and it works ok after reinstalling it (I had same issue on android)

On Windows, I tried with another method and it seems to work: disable tampermonkey extension, restart browser, enable tampermonkey back. The browser restart is needed. But this way you don't need to reinstall tampermonkey.

Thanks a lot. Your workaround working perfectly! 👍

  1. Disable Tampermonkey extension
  2. Restart browser
  3. Enable Tampermonkey extension
  4. Restart browser

@derjanb How do you know it's a bug in Chrome. Is it possible something changes in Chrome's extension APIs?

@knakamura8
Copy link

knakamura8 commented Oct 22, 2022

@doggy8088 This worked for me, as well, thanks! Not sure how this didn't crop up in beta testing =\ Going to the extension page and sorting by Recent shows many others experiencing the same issue.

@derjanb
Copy link
Member

derjanb commented Oct 23, 2022

Not sure how this didn't crop up in beta testing =\

A similar issue was discovered at the BETA version and fixed. Unfortunately it looks like there are more conditions that can cause this issue. Since most of the more than 10 million Tampermonkey users already got the update and there are "only" a few complaints (compared to the overall number of users) the issue seems to happen rarely only.

How do you know it's a bug in Chrome.

Because it is working after extension re-installation and by using the workaround mentioned above.
Tampermonkey now uses two content scripts that should be executed in the order they are defined. For some reason this is not always the case when 4.18 is installed over a 4.16 or 4.17 installation. Disabling the extension seems to cleanup things and the content scripts are executed in the right order again.

@derjanb derjanb pinned this issue Oct 23, 2022
@sinsinpub
Copy link

guess not due to chrome change, because i haven't updated my chrome over 1 year (still <100) and kept pc and chrome opened all the time. it either happened here randomly since extension auto updated to recent version (4.18?).

have tried to disable extension, restart chrome, enable again. it works good so far. maybe just the changes of new version make extension update process over old installation break something (content scripts loading order)? so reloading extension once did the cleanup?

@LatinSuD
Copy link

For me it seems to only break in an old internal web page with a self-signed certificate.
First load usually works fine, but the rest of the times not.

@derjanb
Copy link
Member

derjanb commented Oct 28, 2022

@LatinSuD Do you see the Uncaught pagejs missing error at the console?

@LatinSuD
Copy link

LatinSuD commented Oct 28, 2022

@LatinSuD Do you see the Uncaught pagejs missing error at the console?

Yes.

And then no scripts are run. Tampermonkey icon reports as if there were no scripts for this site (but there should be a few, including some scripts to be run in all sites).

2 different computers:

  • One fails when logged in the site (it is a PBX) in normal mode. If I logout, in the welcome page works.
  • It works in incognito, even when logged in.
  • In a different PC it always works.

In other words: it only fails in one PC, in one site, only when logged in the site, and when not in incognito.

I tried disabled all other extensions and still fails.

@derjanb
Copy link
Member

derjanb commented Oct 28, 2022

Have you tried to disable Tampermonkey, restart you pc (or browser, but make sure all browser processes are shut down) and reenable Tampermonkey?

#1617 (comment)

@LatinSuD
Copy link

workaround works! thank you!

@mosquitobird11
Copy link

Workaround does not work for me, I am still getting Uncaught pagejs missing randomly on page load even after disabled tampermonkey, a full computer restart, and reenabling. This is issue is very impactful to my daily workflow :(

@adipiciu
Copy link
Author

adipiciu commented Nov 1, 2022

Workaround does not work for me, I am still getting Uncaught pagejs missing randomly on page load even after disabled tampermonkey, a full computer restart, and reenabling. This is issue is very impactful to my daily workflow :(

Disable Tampermonkey from Chrome - Extensions, not from the Tampermonkey menu.

@mosquitobird11
Copy link

@adipiciu for some reason I thought the menu toggle was toggling the extension off somehow, this totally fixed it for me thank you 😄

@derjanb
Copy link
Member

derjanb commented May 2, 2024

Shouldn't be an issue anymore...

@derjanb derjanb closed this as completed May 2, 2024
@derjanb derjanb unpinned this issue May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants