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

FIWARE.Question.Tech.Data.OrionContextBroker.ProxyConnectionErrorWhenConnectingAnonymous

    Details

      Description

      Created question in FIWARE Q/A platform on 14-02-2015 at 01:02
      Please, ANSWER this question AT http://stackoverflow.com/questions/28510955/proxyconnectionerror-when-connecting-as-anonymous

      Question:
      ProxyConnectionError when connecting as Anonymous

      Description:
      I have developed an operator to retrieve information from Orion Context Broker.

      It works perfectly when I'm loggin but if I try to enter as anonymous (with the embedded URL) in a incognito window, the operator raises the next error:

      (link to the image): http://i.stack.imgur.com/jxMkr.png

      This is the code:

      var doInitialSubscription = function doInitialSubscription() {

      this.subscriptionId = null;

      this.ngsi_server = MashupPlatform.prefs.get('ngsi_server');
      this.ngsi_proxy = MashupPlatform.prefs.get('ngsi_proxy');
      this.connection = new NGSI.Connection(this.ngsi_server,

      { ngsi_proxy_url: this.ngsi_proxy }

      );

      console.log("Send initial subscription");

      var types = ['SMARTMETER'];
      var entityIdList = [];
      var entityId;
      entityId =

      { id: '.*', type: 'SMARTMETER', isPattern: true }

      ;
      entityIdList.push(entityId);
      var attributeList = null;
      var duration = 'PT3H';
      var throttling = null;
      var notifyConditions = [

      { 'type': 'ONCHANGE', 'condValues': condValues }

      ];
      var options = {
      flat: true,
      onNotify: handlerReceiveEntity.bind(this),
      onSuccess: function (data) {
      console.log("Subscription success ID: "+data.subscriptionId);
      this.subscriptionId = data.subscriptionId;
      this.refresh_interval = setInterval(refreshNGSISubscription.bind(this), 1000 * 60 * 60 * 2); // each 2 hours
      window.addEventListener("beforeunload", function ()

      { this.connection.cancelSubscription(this.subscriptionId); }

      .bind(this));
      }.bind(this),
      onFailure: function(data)

      { console.log(data); }

      };
      console.log("Now creating subscription...");
      this.connection.createSubscription(entityIdList, attributeList, duration, throttling, notifyConditions, options);
      };

      Any idea of what is wrong?

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-23 21:05|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-23 21:05|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-24 00:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-24 00:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2015-10-24 03:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2015-10-24 03:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: