Bug#656578: Can't install extensions from gnome site (exception in /usr/share/gnome-shell/js/ui/extensionSystem.js)

Stephen Marron sfm at boxfusion.net
Wed Apr 9 11:17:50 UTC 2014


Hi,

It seems that before displaying the Install dialog, gnome-shell will try
to request the extension-info from https://extensions.gnome.org/.

If for some reason this request does not succeed, you will not receive
the dialog asking you to install, and will instead receive the following
error in your .xsession-errors telling you that info is null:

    JS ERROR: !!!   Exception was: TypeError: info is null
    JS ERROR: !!!     message = '"info is null"'
    JS ERROR: !!!     fileName = '"/usr/share/gnome-shell/js/ui/extensionSystem.js"'
    JS ERROR: !!!     lineNumber = '83'
    JS ERROR: !!!     stack = '"([object _private_Soup_SessionAsync],[object _private_Soup_Message])@/usr/share/gnome-shell/js/ui/extensionSystem.js:83

Refering to this line of Code:
 
   let dialog = new InstallExtensionDialog(uuid, version_tag, info.name);

info is populated by decoding the information received from the previous web
request by libsoup which probably silently failed, and provided no data,
hence info is null.

Since this download is not performed by your browser, the proxy settings
in your browser will therefore not apply to the request, check that the
system proxy settings are set correctly, and that the request is
correctly sent via the configured method (check with tcpdump).

If you see the request using tcpdump but are still having problems then,
it may be a certificate issue as mentioned earlier in this bug, the
following code from /usr/share/gnome-shell/js/ui/extensionSystem.js
deals with selecting the ca file:

    function _getCertFile() {
        let localCert = GLib.build_filenamev([global.userdatadir, 'extensions.gnome.org.crt']);
        if (GLib.file_test(localCert, GLib.FileTest.EXISTS))
            return localCert;
        else
            return Config.SHELL_SYSTEM_CA_FILE;
    }
    _httpSession.ssl_ca_file = _getCertFile();

As you can see it checks for a local cert (developer testing scenario)
from ~/.local/share/extensions.gnome.org.crt and then falls back to the
system certificates.

  # grep SHELL_SYSTEM_CA_FILE /usr/share/gnome-shell/js/misc/config.js
  const SHELL_SYSTEM_CA_FILE = '/etc/ssl/certs/ca-certificates.crt';

Try connecting to extensions.gnome.org using something like curl, if
this fails with a certificate issue then you have a cert issue...

  # curl https://extensions.gnome.org/ > /dev/null

Check that you have a current ca-certificates (im running 20130119)

  # dpkg -l ca-certificates
  # apt-get install ca-certificates

Check that your ca-certificates.conf has StartCom enabled

  # grep StartCom /etc/ca-certificates.conf
  mozilla/StartCom_Certification_Authority.crt
  mozilla/StartCom_Certification_Authority_G2.crt

Check the Cert looks good...

  # openssl x509 -in /usr/share/ca-certificates/mozilla/StartCom_Certification_Authority.crt -noout -text

Update your ca-certificates.crt file using update-ca-certificates

  # update-ca-certificates 
  Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done.
  Running hooks in /etc/ca-certificates/update.d....
  done.
  done.


Hopefully all of this helps someone :)

Regards,

Stephen



More information about the pkg-gnome-maintainers mailing list