Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

CoralCache does not work for some users/networks/cases #1722

Closed
darkred opened this Issue · 19 comments

6 participants

@darkred

When a script doesn't contain an @updateURL line
and you have the GM setting "Require secure updates" disabled
then checking for script updates is done on wrong URL
(I found this by checking the network traffic with the Fiddler tool)

To reproduce:

  • First install Fiddler, and launch it.
  • Then, in a clean FF19 profile go to Add-ons Manager and enable the FiddlerHook addon.
  • Install GM 1.8 (having the GM setting "Require secure updates" disabled)
  • install a script that doesn't contain an @updateURL line, such as Hello World ie. click here
  • Then open Add-ons Manager (App button > Add-ons), go to User Scripts tab, and right click on the Hello World script and press "Find updates".
  • You'll see in Fiddler that it checks the incorrect URL: http://userscripts.org.nyud.net/scripts/source/13701.meta.js (the extra '.nyud.net' part) instead of plain http://userscripts.org/scripts/source/13701.meta.js
@arantius arantius closed this
@darkred

@arantius
Well, if nyud.net is supposed to redirect to the original site, then it's not working.
Instead you get a 502 HTTP status code.

Try yourself:
install an old version of a script, eg. version 3.4.1 of "IMDB - add Rottentomatoes info" userscript
and then check for script update:
in Fiddler, the line
http://userscripts.org.nyud.net/scripts/source/12897.meta.js
has a 502 status code every time,
there is no redirection to
http://userscripts.org/scripts/source/12897.meta.js
and therefore the new version is not found.

@arantius
Collaborator

It is not. That is Coral Cache ( http://www.coralcdn.org/ ) and is a high availability proxy for the entire internet. It definitely loads for me. Does anything load through coral cache for you, e.g. http://www.cnn.com.nyud.net/?

@darkred

No, I tried several sites and nothing loads through coral cache.

@arantius
Collaborator

Can you tell me anything about the network you're on? Country? Residential? Office, academic, etc?

@arantius arantius reopened this
@darkred

It's a simple home adsl connection. I'm in Athens, Greece.

@cletusc

Just a note regarding userscripts.org itself: many users, myself included, have been getting 502s frequently even while browsing the site. This may not help for the issue with other sites not loading through Coral, but may give you a heads up on USO.

@arantius
Collaborator

That's exactly why we hit coral cache for updates rather than us.o directly! We didn't want to generate so much load as to bring them down with our update checks.

@MayhemYDG

Talking about load, how often does GM checks update for not-uso-hosted userscripts?
I couldn't find anything about it.

@darkred

Also (about my internet connection) I don't use any proxy.

@LouCypher

Coral CDN .nyud.net is blocked in my country, Indonesia.

@arantius
Collaborator

If you have trouble accessing coral cache, could you please:

  1. Tell me what you see when you navigate the browser to http://userscripts.org.nyud.net/robots.txt ?
  2. If you have mac/linux, tell me what this command looks like for you:
    $ curl -v http://userscripts.org.nyud.net/robots.txt
    * About to connect() to userscripts.org.nyud.net port 80 (#0)
    *   Trying 155.98.35.7... connected
    > GET /robots.txt HTTP/1.1
    > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
    > Host: userscripts.org.nyud.net
    > Accept: */*
    > 
    * HTTP 1.0, assume close after body
    < HTTP/1.0 200 OK
    < date: Thu, 25 Apr 2013 18:26:09 GMT
    < server: CoralWebPrx/0.1.20 (See http://coralcdn.org/)
    < content-type: text/html
    < connection: close
    < 
    User-Agent: *
    Disallow: /
    * Closing connection #0

(And, ugh, be careful about markdown mucking with those values, escape them open-angle-brackets.)

This will help me design a fix which will actually work in your case.

@arantius
Collaborator

Also, because robots.txt might be too special:

    $ curl -v http://userscripts.org.nyud.net/scripts/source/1352.user.js > /dev/null
    * About to connect() to userscripts.org.nyud.net port 80 (#0)
    *   Trying 192.42.83.252...   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0connected
    > GET /scripts/source/1352.user.js HTTP/1.1
    > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
    > Host: userscripts.org.nyud.net
    > Accept: */*
    > 
    < HTTP/1.1 200 OK
    < server: nginx/1.1.19
    < date: Thu, 25 Apr 2013 19:22:23 GMT
    < content-type: text/javascript; charset=utf-8
    < content-length: 6723
    < connection: close
    < status: 200 OK
    < etag: "a131dc9fb0b091c76af477f7d2d7f4e2"
    < x-runtime: 23
    < accept-ranges: none
    < x-varnish: 2408084547 2408082275
    < age: 20
    < via: 1.1 varnish, HTTP/1.0 192.42.83.252:8080 (CoralWebPrx/0.1.20 (See http://coralcdn.org/))
    < cache-control: max-age=300
    < expires: Thu, 25 Apr 2013 19:27:23 GMT
    < 
    { [data not shown]
    100  6723  100  6723    0     0   3485      0  0:00:01  0:00:01 --:--:-- 73879
    * Closing connection #0
    
@arantius
Collaborator

No feedback from anyone? Some data to work with would make this fix much easier.

@darkred

If you have trouble accessing coral cache, could you please:

Tell me what you see when you navigate the browser to http://userscripts.org.nyud.net/robots.txt ?

As with everything through coral cache (as I've already posted) ,
trying to access http://userscripts.org.nyud.net/robots.txt
never loads -eg. in Firefox it shows "Server Not Found" and in IE "This page can't be displayed"-
(using windows)

@Photodeus

curl -v http://userscripts.org.nyud.net/robots.txt gives me errors, same with Firefox, I cannot access any nyud adresses. This is from Sweden:

  • timeout on name lookup is not supported
  • Curl_ipv4_resolve_r failed for userscripts.org.nyud.net
  • Couldn't resolve host 'userscripts.org.nyud.net'
  • Closing connection #0 curl: (6) Couldn't resolve host 'userscripts.org.nyud.net'.
@arantius arantius referenced this issue from a commit in arantius/greasemonkey
@arantius arantius Only use Coral CDN when it works.
In some cases, Coral is blocked and will not function properly.

Refs #1722
516da86
@arantius
Collaborator

Mozilla's add-ons site is read-only for maintenance so I can't upload a beta version there right now. So, anyone experiencing this issue, please download and install:

http://static.arantius.com/misc/greasemonkey-1.12beta1.xpi

Does this then work for you? It should detect that Coral CDN doesn't work, and bypass it.

@arantius arantius referenced this issue from a commit in arantius/greasemonkey
@arantius arantius Fix the URL checkCoralCache() uses.
Refs #1722
524a7c7
@arantius
Collaborator

Ventero: Thanks for pointing out my silly mistake.
Everyone else: Please try http://static.arantius.com/misc/greasemonkey-1.12beta2.xpi instead.

@arantius
Collaborator

Including this fix in 1.12, going out today. Please let me know if updates continue to fail because of Coral CDN.

@arantius arantius closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.