Failed loading flavors in instance launch under MSIE11

Bug #1694574 reported by Radomir Dopieralski
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Radomir Dopieralski

Bug Description

No flavors are shown in the "Launch Instance" dialog in Internet Explorer 11 (IE11).

Instead, the following alert message is displayed: "Error: Unable to retrieve the flavors."

The following error appears in the console:

    TypeError: Object.keys: argument is not an Object
       at forEachSorted (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:705:46)
       at ngParamSerializer (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1201:137)
       at sendReq (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1236:126)
       at serverRequest (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1232:1)
       at processQueue (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1469:243)
       at Anonymous function (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1470:135)
       at Scope.prototype.$eval (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1516:530)
       at Scope.prototype.$digest (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1510:184)
       at Scope.prototype.$apply (http://10.124.196.21/dashboard/static/dashboard/js/768aef8292b1.js:1517:266)
       at Anonymous funct

With COMPRESS disabled, I was able to get a more readable traceback:

HTML1300: Navigation occurred.
File: instances
JQMIGRATE: Logging is active
TypeError: Object.keys: argument is not an Object
   at forEachSorted (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:351:3)
   at ngParamSerializer (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:10539:7)
   at sendReq (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:11732:11)
   at serverRequest (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:11571:9)
   at processQueue (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:16383:11)
   at Anonymous function (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:16399:27)
   at Scope.prototype.$eval (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:17682:9)
   at Scope.prototype.$digest (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:17495:15)
   at Scope.prototype.$apply (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:17790:13)
   at Anonymous function (http://192.168.0.199/dash
JQMIGRATE: jQuery.fn.attr('selected') may use property instead of attribute
console.trace()
   at migrateWarn (http://192.168.0.199/dashboard/static/horizon/lib/jquery_migrate/jquery-migrate.js:43:5)
   at jQuery.attr (http://192.168.0.199/dashboard/static/horizon/lib/jquery_migrate/jquery-migrate.js:155:4)
   at access (http://192.168.0.199/dashboard/static/horizon/lib/jquery/jquery.js:875:6)
   at attr (http://192.168.0.199/dashboard/static/horizon/lib/jquery/jquery.js:4058:3)
   at renderEmptyOption (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:28838:9)
   at writeNgOptionsValue (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:28883:15)
   at ngModelCtrl.$render (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:31205:9)
   at ngModelWatch (http://192.168.0.199/dashboard/static/horizon/lib/angular/angular.js:27815:9)

Unfortunately, MSIE truncates the callback just when it gets interesting...

Revision history for this message
Radomir Dopieralski (deshipu) wrote :

The problem seems to be in the dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js file with this line:

          novaAPI.getFlavors(true, true).then(onGetFlavors, noop),

it seems wrong, because novaAPI.getFlavos is defined as:

   function getFlavors(params) {
      var config = params ? { 'params' : params} : { 'params' : {} };

And the subsequent code expects "params" to be a dict, and not "true". It also seems wrong, because the second parameter is completely ignored...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/469452

Changed in horizon:
assignee: nobody → Radomir Dopieralski (deshipu)
status: New → In Progress
Changed in horizon:
importance: Undecided → Critical
milestone: none → pike-2
Changed in horizon:
assignee: Radomir Dopieralski (deshipu) → Akihiro Motoki (amotoki)
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → Radomir Dopieralski (deshipu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/469452
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a1dd0350502fc089dc42157e4692960ca8ec82e0
Submitter: Jenkins
Branch: master

commit a1dd0350502fc089dc42157e4692960ca8ec82e0
Author: Radomir Dopieralski <email address hidden>
Date: Wed May 31 14:18:23 2017 +0200

    Fix instance launch dialog under MSIE11

    The novaAPI.getFlavors() call takes only a single parameter, which
    should be an object with params. But it is being called with two
    parameters here, both "true", which makes IE11 fail with TypeError
    later on, when it tries to iterate over keys of params.

    Change-Id: I0dcfcdca3dda2d94509d7a574184e7f82f21ca22
    Closes-Bug: #1694574

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/471865

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b2

This issue was fixed in the openstack/horizon 12.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/ocata)

Reviewed: https://review.openstack.org/471865
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=afb31d55adf684048be7db6451cbea40317dec8b
Submitter: Jenkins
Branch: stable/ocata

commit afb31d55adf684048be7db6451cbea40317dec8b
Author: Radomir Dopieralski <email address hidden>
Date: Wed May 31 14:18:23 2017 +0200

    Fix instance launch dialog under MSIE11

    The novaAPI.getFlavors() call takes only a single parameter, which
    should be an object with params. But it is being called with two
    parameters here, both "true", which makes IE11 fail with TypeError
    later on, when it tries to iterate over keys of params.

    Change-Id: I0dcfcdca3dda2d94509d7a574184e7f82f21ca22
    Closes-Bug: #1694574

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.3

This issue was fixed in the openstack/horizon 11.0.3 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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