UI error while generating a MAAS key (token)

Bug #1611342 reported by Victor Tapia on 2016-08-09
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Blake Rouse
2.0
Critical
Unassigned
Trunk
Critical
Blake Rouse

Bug Description

In the preferences page of MAAS 2.0, pressing 'Generate MAAS key' shows the error message "Unable to create a new token" and leaves the spinning "loading" wheel. Refreshing the page shows the new key in the list.

It looks like an exception ('unknown token c') triggers while parsing the keys from a malformed JSON in function "requestKeys" (maas-yui.js).

- JSON sample:

{consumer_key: zN2WyCmRYyCYk9r4Px, token_key: jR26eZFYrA7dHugv7f, token_secret: pbaPaERJXn3KAGfvkZdatQufvKvJ9xtJ}

- Code:

652 success: function(id, out) {
653 var keys;
654 try {
655 keys = JSON.parse(out.response);
656 }
657 catch(e) {
658 // Parsing error.
659 self.displayError('Unable to create a new token.');
660 }
661 // Generate a token from the keys.
662 var token = self.createTokenFromKeys(
663 keys.consumer_key, keys.token_key,
664 keys.token_secret);

Tags: sts Edit Tag help

Related branches

Victor Tapia (vtapia) on 2016-08-09
description: updated
Changed in maas:
status: New → Confirmed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers