ubiquity crashed with ValueError in raw_decode(): No JSON object could be decoded

Bug #887879 reported by Cakayz
62
This bug affects 9 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Medium
jeerapat
Precise
Fix Released
Medium
Unassigned
Quantal
Fix Released
Medium
Unassigned

Bug Description

[Impact] Suboptimal networking environments cause ubiquity to crash.
[Test Case] Fake up a captive proxy (a stunt proxy that returns some junk HTML for any query should do), run an install behind it, and make sure ubiquity doesn't crash.
[Regression Potential] The fix is just a try: / except: syslog.syslog(), so should be very safe.

can not be install. found error code 10 about keyboard layout

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: ubiquity 2.8.7
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
CasperVersion: 1.287
Date: Wed Nov 9 06:34:14 2011
ExecutablePath: /usr/lib/ubiquity/bin/ubiquity
InterpreterPath: /usr/bin/python2.7
LiveMediaBuild: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
ProcCmdline: /usr/bin/python /usr/lib/ubiquity/bin/ubiquity --only
ProcEnviron: Error: [Errno 13] Permission denied: '/proc/4163/environ'
PythonArgs: ['/usr/lib/ubiquity/bin/ubiquity', '--only']
SourcePackage: ubiquity
Title: ubiquity crashed with ValueError in raw_decode(): No JSON object could be decoded
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:

Revision history for this message
Cakayz (gamers3129) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Changed in ubiquity (Ubuntu):
importance: Undecided → Medium
security vulnerability: no → yes
visibility: private → public
security vulnerability: yes → no
tags: added: precise
tags: added: bitesize
Changed in ubiquity (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jonathan Reed (jdreed) wrote :

I encountered this earlier in the installation, from a 12.04.1 CD install, and the traceback was in /usr/lib/ubiquity/plugins/ubi-timezone.py, line 173.

Based on this and some other bugs, it seems like working network is a hard requirement for Ubiquity, not just a "for best results" as described on the installation page. It's also possible that ubiquity's network detection code should be more robust. In my (and many academic environments), you get a crippled network connection, redirecting you to a registration page (similar to that found in hotels, free wifi hotspots, etc). So to a naive program, it may "look" like a real network connection, and all host queries will resolve (to the A record for the registration page), but anything that expects a working network will be disappointed.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Although it is guarded with try/except, instead of checking for online state it still solves the problem:
revno: 5528
committer: Mario Limonciello <email address hidden>
branch nick: ubiquity
timestamp: Wed 2012-06-27 19:21:51 -0500
message:
  Don't let oem-config crash from an invalid server return on the timezone
  page.
diff:
=== modified file 'debian/changelog'
--- debian/changelog 2012-06-27 21:46:17 +0000
+++ debian/changelog 2012-06-28 00:21:51 +0000
@@ -4,6 +4,10 @@
   * Only allow a user to proceed on the networking screen if he entered a valid
     password. This prevents a nm dbus exception. (LP: #112211)

+ [ Mario Limonciello ]
+ * Don't let oem-config crash from an invalid server return on the timezone
+ page.
+
  -- Stéphane Graber <email address hidden> Wed, 27 Jun 2012 17:45:36 -0400

 ubiquity (2.11.7) quantal-proposed; urgency=low

=== modified file 'ubiquity/plugins/ubi-timezone.py'
--- ubiquity/plugins/ubi-timezone.py 2012-05-29 23:07:53 +0000
+++ ubiquity/plugins/ubi-timezone.py 2012-06-28 00:21:51 +0000
@@ -176,15 +176,19 @@
                            (text, message.status_code,
                             message.reason_phrase))))
         else:
- for result in json.loads(message.response_body.data):
- model.append([result['name'],
- result['admin1'],
- result['country'],
- result['latitude'],
- result['longitude']])
-
- # Only cache positive results.
- self.geoname_cache[text] = model
+ try:
+ for result in json.loads(message.response_body.data):
+ model.append([result['name'],
+ result['admin1'],
+ result['country'],
+ result['latitude'],
+ result['longitude']])
+
+ # Only cache positive results.
+ self.geoname_cache[text] = model
+
+ except ValueError:
+ syslog.syslog('Server return does not appear to be valid JSON.')

         self.city_entry.get_completion().set_model(model)

Changed in ubiquity (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
milestone: none → ubuntu-12.04.2
status: Triaged → Fix Committed
Changed in ubiquity (Ubuntu Quantal):
status: Triaged → Fix Released
Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → In Progress
Colin Watson (cjwatson)
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Cakayz, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.21 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ubiquity (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Cakayz, or anyone else affected,

Accepted ubiquity into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ubiquity/2.10.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I have tried returning bogus / invalid results when querying timezone as well timing out the connections for timezone lookup with & without general internet still present. The Timezone page handled all cases gracefully, did not crash, and instead behaved just like it does when one is simply offline.

Please consider this bug as verified.

Colin Watson (cjwatson)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.10.23

---------------
ubiquity (2.10.23) precise-proposed; urgency=low

  * Honour base-installer/kernel/altmeta when deciding which kernels to
    install or keep installed.

ubiquity (2.10.22) precise-proposed; urgency=low

  [ Dmitrijs Ledkovs ]
  * Make user-setup-encrypted-swap wait until partitioning has finished
    before attempting to adjust /target/etc/fstab. (LP: #1024343)
    (LP: #1068178)

  [ Colin Watson ]
  * Don't remove kernel headers just because we're removing signed kernel
    images of the same flavour (LP: #1070427).

ubiquity (2.10.21) precise-proposed; urgency=low

  [ Colin Watson ]
  * Fix missing parentheses that caused removable installation media
    sometimes to be selected as the default GRUB device (LP: #987418).
  * Support UEFI Secure Boot (LP: #1075181):
    - Try to install a signed kernel if base-installer asks for one, and
      don't leave signed kernels installed if it doesn't.
    - If the SecureBoot EFI variable is set, then ensure that
      grub-efi-amd64-signed and shim-signed remain installed.
    - Copy the signed kernel from /cdrom if it is not in the squashfs. If
      there is a signed kernel there but no unsigned one, then use sbattach
      to remove the signature and construct the unsigned kernel on the fly.
  * Automatic update of included source packages: base-installer
    1.122ubuntu7.2, grub-installer 1.68ubuntu5.1.

  [ Mario Limonciello ]
  * Don't let oem-config crash from an invalid server return on the timezone
    page. (LP: #887879)

  [ Dmitrijs Ledkovs ]
  * Do not preseed grub-install, if we are not proceeding to install. This
    should fix ValueError, I/O operation on closed file (LP: #1027648)
    (LP: #792652)
  * Prevent progress label to expand & shrink the window (LP: #1046241)

  [ Jonathan Riddell ]
  * Change from a KApplication to a QApplication to avoid using DBus, DBus
    as needed by KApplication no longer works with our multiple user changes
    LP: #1055967
 -- Colin Watson <email address hidden> Thu, 06 Dec 2012 17:20:32 +0000

Changed in ubiquity (Ubuntu Precise):
status: Fix Committed → Fix Released
jeerapat (janelukmoo)
Changed in ubiquity (Ubuntu):
assignee: nobody → jeerapat (janelukmoo)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.