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

Closed
darkred opened this Issue Mar 18, 2013 · 19 comments

Comments

Projects
None yet
6 participants

darkred commented Mar 18, 2013

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 Mar 18, 2013

darkred commented Mar 18, 2013

@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.

Collaborator

arantius commented Mar 18, 2013

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 commented Mar 18, 2013

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

Collaborator

arantius commented Mar 18, 2013

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

@arantius arantius reopened this Mar 18, 2013

darkred commented Mar 18, 2013

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

Contributor

cletusc commented Mar 18, 2013

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.

Collaborator

arantius commented Mar 18, 2013

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.

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

darkred commented Mar 19, 2013

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

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

Collaborator

arantius commented Apr 25, 2013

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.

Collaborator

arantius commented Apr 25, 2013

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
    
Collaborator

arantius commented May 23, 2013

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

darkred commented May 24, 2013

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)

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 added a commit to arantius/greasemonkey that referenced this issue Jul 24, 2013

Only use Coral CDN when it works.
In some cases, Coral is blocked and will not function properly.

Refs #1722
Collaborator

arantius commented Jul 24, 2013

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 added a commit to arantius/greasemonkey that referenced this issue Jul 24, 2013

Collaborator

arantius commented Jul 24, 2013

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

Collaborator

arantius commented Aug 15, 2013

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 Aug 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment