AltoRetrato / IMDb 'My Movies' enhancer

A follow-up to my previous post... I didn't check here for a few weeks and when I came on my issue was closed so I just left it for a while, but since I'm still having problems, here's the errors and warnings from the javascript console:

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
Invalid URI. Load of media resource failed. 2 www.facebook.com
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:1
Error: WebExtension context not found! 3 ExtensionParent.jsm:1089:13
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. recent:771:1
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: stats:1:1
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. static-age:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Error: Frame not found, or missing host permission undefined
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. static-age:3307:1
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. f♯a♯∞:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Error: Frame not found, or missing host permission undefined
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:63
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. f♯a♯∞:2740:1
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. buena_vista_social_club:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Error: Frame not found, or missing host permission undefined
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: stats:1:1
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. homogenic:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Error: Frame not found, or missing host permission undefined
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. buena_vista_social_club:4406:1
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: stats:1:1
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. homogenic:5168:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 3 background.js:63
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: 2 stats:1:1
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:107
Promise resolved after context unloaded
promisify.js:13
Promise resolved after context unloaded
polyfill.js:231
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 5 background.js:63
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. portishead:1:1
Error: Frame not found, or missing host permission undefined
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 8 background.js:63
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. portishead:3548:1
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. mogwai_young_team:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Promise resolved after context unloaded
include.preload.js:549
Promise resolved after context unloaded
injected.js:1
Promise resolved after context unloaded
promisify.js:13
Error: Frame not found, or missing host permission undefined
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:68
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:68
Loading failed for the with source “https://global.proper.io/rateyourmusic.min.js”. vessel:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Error: Frame not found, or missing host permission undefined
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. mogwai_young_team:3465:1
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
NS_ERROR_NOT_INITIALIZED injected.js:1
Promise resolved after context unloaded
inject.js:68
Loading failed for the with source “https://e.snmc.io/2.5/js/web_ads/advertisement.js”. vessel:2302:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: 3 stats:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 4 background.js:63
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:68
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 8 background.js:63
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:68
Error: WebExtension context not found! 2 ExtensionParent.jsm:1089:13
Promise resolved after context unloaded
inject.js:68
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 5 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 3 background.js:1
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheet]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] 3 ExtensionCommon.jsm:65:12
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:1
Error: WebExtension context not found! 3 ExtensionParent.jsm:1089:13
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
XML Parsing Error: not well-formed
Location: https://userstylesapi.com/tic/stats
Line Number 1, Column 1: stats:1:1
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 3 background.js:1
Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. background.js:63
Ignoring unsupported entryTypes: paint. ls048608434:17056:161
No valid entryTypes; aborting registration. ls048608434:17056:161
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/ other-2462493501.CB463665613.js:1:19158
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://images-na.ssl-images-amazon.com/images/G/01/imdbads/custom/test/index/js/show_ads.js. (Reason: CORS request did not succeed).

So apparently there's not enough space to post it all. I had 106 errors and 33 warnings. How should I share these?

Re: @mightysparks:

... there's not enough space to post it all.

Do you mean space here? There is a limit on comment size but...

I had 106 errors and 33 warnings. How should I share these?

I would start with the top, first, five. Inundating an author with the entire log might be a bit much. However you should dedicate some time to checking this discussion at least once a day to see if there is a response... or at minimum the main issue linkage for this Userscript and see if the comment count increased.

You should consider using a named code fence of console messages too to make things a bit easier on the read.

OUJS Admin

Re: @mightysparks

A follow-up to my previous post... I didn't check here for a few weeks and when I came on my issue was closed

Just as Marti said, it would be better to check once in a while to see if there is a reply to any issue you open.

So apparently there's not enough space to post it all. I had 106 errors and 33 warnings. How should I share these?

First, it would be nice if you could describe your issue with some more details.

  1. Are you changing the script source code to add custom colors?
  2. Does color highlighting works with the original (unmodified) script code?
  3. When you don't change the code, or after you do a change (but NOT between two changes!), does highlighting behaves consistently the same way after you refreshes the data? Or does it behave differently (without you changing the code) when refreshing a couple of times?

To report errors, I'd suggest you to:

  1. Open the page where errors happen (e.g., "your lists" page)
  2. Open the Javascript console
  3. Clear the console (to remove other errors)
  4. Click the script's refresh button (or do the operation that triggers the error)
  5. Only then you should copy the errors. If the list is long, you can use a service such as http://pastebin.com or similar to paste the contents there and just post a link for it here.

I'll to check in more regularly, totally forgot last time, apologies.

Here's the pastebin with all the errors (they're all export and downloading errors): https://pastebin.com/kL0P7fF7

Are you changing the script source code to add custom colors?
Yes, I use these custom colours:

  customColors["Your ratings"]   = "Green";
  customColors["OnLists"]   = "MidnightBlue";
  customColors["NotonLists"]   = "PaleVioletRed";
  customColors["DefaultColor"]   = "DeepSkyBlue";

I've been using this script since IMDb actually had 'MyMovies', and as soon as we could make lists I used these custom colours. I've had no issues until the last year or so, but usually after a few refreshes it would all be good though I've had increasing difficulty getting them to refresh correctly.

Does color highlighting works with the original (unmodified) script code?
The watchlist and the default colour work, but only some of my rated films do not get highlighted.

When you don't change the code, or after you do a change (but NOT between two changes!), does highlighting behaves consistently the same way after you refreshes the data? Or does it behave differently (without you changing the code) when refreshing a couple of times?
When I do change the code, it behaves completely differently. With the original code, sometimes my rated films are highlighted, sometimes none are, and sometimes different ones are.

Thanks for the information, it was really helpful.

And WOW! You are a heavy user! :D

As I expected, you are experiencing issues on the IMDb side.

From what I see, you have (at least) 236 IMDb lists in total. The script tried to download them all, but only 200 of them were served by IMDb servers, and the remaining produced an "error 500" instead ("The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.").

This means the script could refresh/update only the data it received, but it was missing 36 of your lists. That explains why some of your titles were not being highlighted.

So, what can be done to solve this?

  1. This is mostly a problem on the IMDb side, so we have limited options. Ideally, IMDb should serve you all the data requested by the script, but it might be throttling (intentionally or not) the export connections to prevent abuse or DDoS attacks. You can try to ask them to raise the limit for you, but I wouldn't bet on you even getting a reply from them on that matter...
  2. You could try to reduce the number of lists. If you could combine/merge some lists (so the total is below 200), I guess the issue would be gone (or at least become less frequent). You can do it by editing a list, selecting any/all items and then "MOVE TO" another.
  3. I could change the script to try to deal better with download errors. It could retry the downloads automatically after a while, or try to update those lists first on next refresh. I'm not sure if any of these would solve the problem at all (or even alleviate it), but that's the only thing I can think of for now...

I'm still converting the script into a browser extension (including some new features), and I just added some of those ideas into my to-do list. Unfortunately it will still take a while to release it, but when I have the time I might try to replicate your issue and test the solutions.

Hm, it says I had 197 lists on my list page, but then also my watchlist and ratings must count for a couple more, so I wonder what extra lists it's reading. I deleted a bunch of list so it now says I have 157, but it still doesn't appear to be refreshing correctly. Without my custom colours, it seemed to highlight everything correctly, but when I added them back, the 'Lists' colours didn't highlight and when I refreshed, neither did the ratings. Could the length of lists be an issue? My ratings are about 8,500 films so I wonder if the increasing number could be a problem.

And yeah, I only use IMDb out of convenience for their URLs, their customer support and 'updates' are pathetic so I don't think it's worth contacting them.

Sorry, I was wrong! There are 199 unique lists in the log you provided, plus your watchlist, ratings and checkins list, so they are 202 in total. Some of the lists might be private (e.g., https://www.imdb.com/list/ls047291206/).

I deleted a bunch of list so it now says I have 157, but it still doesn't appear to be refreshing correctly

The most important thing is: how many download errors you still see in the console log? E.g.:

https://www.imdb.com/list/ls059831227/export
[HTTP/2.0 500 Internal Server Error 1410ms]

Error 500 downloading https://www.imdb.com/list/ls059831227/export: Internal Server Error index.html:396:19

My ratings are about 8,500 films so I wonder if the increasing number could be a problem.

Maybe - large lists might cause issues that the script currently doesn't try to work around. How long does it take to refresh all the data?

I don't know if there is anything else you could do to work around it except using a different browser or changing some of its parameters - e.g., on Firefox, you could reduce the max. number of connections per host (https://support.mozilla.org/en-US/questions/992338), but there is no guarantee it would help the script, and it could negatively affect performance on other sites. If you're interested, you could give it a try and revert to the original value if the change doesn't help.

Nothing has seemed to help this so far. I did manage to get it up to date the last time I posted here, but I tried to refresh it recently and no matter what I do (including re-installing it a couple of times), it won't update correctly. One thing it did before that made it still workable, is that it would highlight films as appearing in a list even if it didn't use the correct colour to highlight it. Now, it's skipping films entirely so they have no highlight at all. Ugh, IMDb why do you have to be so complicated...

Over the last few days I came up with a new idea that will improve the script's performance for those with a lot of lists. Unfortunately, it will take a while to implement it, though...