Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-480

Cannot read property 'guac-full-name' of undefined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • 0.9.13-incubating, 0.9.14
    • None
    • guacamole
    • None

    Description

      As mentioned in an unrelated thread on the user@ mailing list, Guacamole currently produces JavaScript errors under some circumstances when attempting to read attributes of the current user:

      angular.js:11699 TypeError: Cannot read property 'guac-full-name' of undefined
          at app.js?v=0.9.13-incubating:293
          at angular.js:9442
          at angular.js:13292
          at m.$eval (angular.js:14547)
          at m.$digest (angular.js:14363)
          at m.$apply (angular.js:14652)
          at l (angular.js:9734)
          at P (angular.js:9924)
          at XMLHttpRequest.H.onload (angular.js:9865)
      (anonymous) @ angular.js:11699
      

      The associated JavaScript is clearly assuming that user attributes will always be returned via REST, even if empty:

      https://github.com/apache/guacamole-client/blob/00d464b51181d04e123472050833aa265dfdfee2/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js#L104-L111

      If this assumption is valid, and it is required that users returned via REST have a defined set of attributes (even if empty), then the REST API needs to be corrected to satisfy that requirement. If this assumption is invalid, then the JavaScript needs to be corrected to not make it.

      Attachments

        Issue Links

          Activity

            People

              mjumper Mike Jumper
              mjumper Mike Jumper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: