Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9334

[fiware-stackoverflow] Cosmos-gui application crashes after authentication with keystone

    Details

      Description

      Created question in FIWARE Q/A platform on 24-08-2015 at 16:08
      Please, ANSWER this question AT https://stackoverflow.com/questions/32185071/cosmos-gui-application-crashes-after-authentication-with-keystone

      Question:
      Cosmos-gui application crashes after authentication with keystone

      Description:
      I have a problem. My cosmos gui application crashes after trying to authorize with keystone.
      Horizon application is running on https://192.168.4.33:443,
      while cosmos-gui is running on http://192.168.4.180:81.
      My gui config file looks like this:

      "oauth2":

      { "idmURL": "https://192.168.4.33", "client_id": "***********************************", "client_secret": "*********************************", "callbackURL": "http://192.168.4.180:81/auth", "response_type": "code" }

      ,

      and inside horizon i registered application Cosmos Big data
      with parameters:

      Description
      Cosmos Big data

      URL
      https://192.168.4.33

      Callback URL
      http://192.168.4.180:81/auth

      So afterwards i start cosmos-gui application and after clicking on login it redirects me to this url:

      https://192.168.4.33/oauth2/authorize/?response_type=code&client_id=0434fdf60897479588c3c31cfc957b6d&state=xyz&redirect_uri=http://192.168.4.180:81/auth

      And that is ok.But then, when i click on button authorize it leads me to this url:

      http://192.168.4.180:81/auth?state=xyz&code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z

      and at that moment cosmos-gui application crashes and everything that i get from the log is this:

      /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138
      req.session.access_token = results.access_token;
      ^
      TypeError: Cannot read property 'access_token' of undefined
      at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138:43
      at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:168:22
      at ClientRequest.<anonymous> (/home/cosmos-gui/fiware-cosmos/cosmos- gui/src/oauth2.js:140:9)
      at ClientRequest.emit (events.js:95:17)
      at CleartextStream.socketErrorListener (http.js:1548:9)
      at CleartextStream.emit (events.js:95:17)
      at SecurePair.<anonymous> (tls.js:1400:19)
      at SecurePair.emit (events.js:92:17)
      at SecurePair.maybeInitFinished (tls.js:980:10)
      at CleartextStream.read [as _read] (tls.js:472:13)

      On the side of keystone everything looks ok.This is from keystones log:

      2015-08-24 16:34:02.604 27693 INFO keystone.contrib.oauth2.controllers [-] OAUTH2: Created Authorization Code to consumer 0434fdf60897479588c3c31cfc957b6d for user idm with scope [u'all_info']. Redirecting to http://192.168.4.180:81/auth?state=xyz&amp;code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z
      2015-08-24 16:34:02.606 27693 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [24/Aug/2015 16:34:02] "POST /v3/OS-OAUTH2/authorize HTTP/1.1" 302 208 0.121336

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 59m 1 Backlog Manager 30/May/17 3:04 AM
        In Progress In Progress Answered Answered
        3h 1 Backlog Manager 30/May/17 6:04 AM
        Answered Answered Closed Closed
        3h 42m 1 Fernando Lopez 30/May/17 9:47 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        HD-Enabler Cosmos [ 10872 ]
        Description
        Created question in FIWARE Q/A platform on 24-08-2015 at 16:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/32185071/cosmos-gui-application-crashes-after-authentication-with-keystone


        +Question:+
        Cosmos-gui application crashes after authentication with keystone

        +Description:+
        I have a problem. My cosmos gui application crashes after trying to authorize with keystone.
        Horizon application is running on https://192.168.4.33:443,
        while cosmos-gui is running on http://192.168.4.180:81.
        My gui config file looks like this:

        "oauth2": {
        "idmURL": "https://192.168.4.33",
        "client_id": "***********************************",
        "client_secret": "*********************************",
        "callbackURL": "http://192.168.4.180:81/auth",
        "response_type": "code"


        },

        and inside horizon i registered application Cosmos Big data
        with parameters:

        Description
        Cosmos Big data

        URL
        https://192.168.4.33

        Callback URL
        http://192.168.4.180:81/auth


        So afterwards i start cosmos-gui application and after clicking on login it redirects me to this url:

        https://192.168.4.33/oauth2/authorize/?response_type=code&amp;client_id=0434fdf60897479588c3c31cfc957b6d&amp;state=xyz&amp;redirect_uri=http://192.168.4.180:81/auth


        And that is ok.But then, when i click on button authorize it leads me to this url:

        http://192.168.4.180:81/auth?state=xyz&amp;code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z


        and at that moment cosmos-gui application crashes and everything that i get from the log is this:

        /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138
            req.session.access_token = results.access_token;
                                              ^
        TypeError: Cannot read property 'access_token' of undefined
        at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138:43
        at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:168:22
        at ClientRequest.&lt;anonymous&gt; (/home/cosmos-gui/fiware-cosmos/cosmos- gui/src/oauth2.js:140:9)
        at ClientRequest.emit (events.js:95:17)
        at CleartextStream.socketErrorListener (http.js:1548:9)
        at CleartextStream.emit (events.js:95:17)
        at SecurePair.&lt;anonymous&gt; (tls.js:1400:19)
        at SecurePair.emit (events.js:92:17)
        at SecurePair.maybeInitFinished (tls.js:980:10)
        at CleartextStream.read [as _read] (tls.js:472:13)


        On the side of keystone everything looks ok.This is from keystones log:

        2015-08-24 16:34:02.604 27693 INFO keystone.contrib.oauth2.controllers [-] OAUTH2: Created Authorization Code to consumer 0434fdf60897479588c3c31cfc957b6d for user idm with scope [u'all_info']. Redirecting to http://192.168.4.180:81/auth?state=xyz&amp;code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z
        2015-08-24 16:34:02.606 27693 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [24/Aug/2015 16:34:02] "POST /v3/OS-OAUTH2/authorize HTTP/1.1" 302 208 0.121336

        Created question in FIWARE Q/A platform on 24-08-2015 at 16:08
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/32185071/cosmos-gui-application-crashes-after-authentication-with-keystone


        +Question:+
        Cosmos-gui application crashes after authentication with keystone

        +Description:+
        I have a problem. My cosmos gui application crashes after trying to authorize with keystone.
        Horizon application is running on https://192.168.4.33:443,
        while cosmos-gui is running on http://192.168.4.180:81.
        My gui config file looks like this:

        "oauth2": {
        "idmURL": "https://192.168.4.33",
        "client_id": "***********************************",
        "client_secret": "*********************************",
        "callbackURL": "http://192.168.4.180:81/auth",
        "response_type": "code"


        },

        and inside horizon i registered application Cosmos Big data
        with parameters:

        Description
        Cosmos Big data

        URL
        https://192.168.4.33

        Callback URL
        http://192.168.4.180:81/auth


        So afterwards i start cosmos-gui application and after clicking on login it redirects me to this url:

        https://192.168.4.33/oauth2/authorize/?response_type=code&amp;client_id=0434fdf60897479588c3c31cfc957b6d&amp;state=xyz&amp;redirect_uri=http://192.168.4.180:81/auth


        And that is ok.But then, when i click on button authorize it leads me to this url:

        http://192.168.4.180:81/auth?state=xyz&amp;code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z


        and at that moment cosmos-gui application crashes and everything that i get from the log is this:

        /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138
            req.session.access_token = results.access_token;
                                              ^
        TypeError: Cannot read property 'access_token' of undefined
        at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:138:43
        at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:168:22
        at ClientRequest.&lt;anonymous&gt; (/home/cosmos-gui/fiware-cosmos/cosmos- gui/src/oauth2.js:140:9)
        at ClientRequest.emit (events.js:95:17)
        at CleartextStream.socketErrorListener (http.js:1548:9)
        at CleartextStream.emit (events.js:95:17)
        at SecurePair.&lt;anonymous&gt; (tls.js:1400:19)
        at SecurePair.emit (events.js:92:17)
        at SecurePair.maybeInitFinished (tls.js:980:10)
        at CleartextStream.read [as _read] (tls.js:472:13)


        On the side of keystone everything looks ok.This is from keystones log:

        2015-08-24 16:34:02.604 27693 INFO keystone.contrib.oauth2.controllers [-] OAUTH2: Created Authorization Code to consumer 0434fdf60897479588c3c31cfc957b6d for user idm with scope [u'all_info']. Redirecting to http://192.168.4.180:81/auth?state=xyz&amp;code=NVfyZUov1KuQ8yTw498oItHgYC2l9Z
        2015-08-24 16:34:02.606 27693 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [24/Aug/2015 16:34:02] "POST /v3/OS-OAUTH2/authorize HTTP/1.1" 302 208 0.121336

        HD-Chapter Data [ 10838 ]
        fla Fernando Lopez made changes -
        Assignee Francisco Romero [ frb ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-30 06:05|UPDATED status: transition Answered| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-30 06:05|UPDATED status: transition Answered| # answers= 2, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-30 03:05|UPDATED status: transition Answer| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-30 03:05|UPDATED status: transition Answer| # answers= 2, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-30 00:05|CREATED monitor | # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-30 00:05|CREATED monitor | # answers= 2, accepted answer= True
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: