telefonicaid / fiware-cosmos

fiware-cosmos toolkit for administration and support. Includes Sahara plugin
GNU Affero General Public License v3.0
11 stars 15 forks source link

[cosmos-gui] Prevent the GUI crashes when no access_token is sent by the IdM #117

Closed frbattid closed 8 years ago

frbattid commented 9 years ago

The IdM sporadically fails sending the access_token. The GUI must be ready for this issue. Currently it crashes with the following message:

/home/cosmos-gui/fiware-cosmos/cosmos-gui/src/app.js:148
        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:148:43
    at /home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:168:22
    at passBackControl (/home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:116:17)
    at IncomingMessage.<anonymous> (/home/cosmos-gui/fiware-cosmos/cosmos-gui/src/oauth2.js:135:13)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)
frbattid commented 8 years ago

Fixed in PR https://github.com/telefonicaid/fiware-cosmos/pull/120

frbattid commented 8 years ago

Fixed in PR https://github.com/telefonicaid/fiware-cosmos/pull/126