5 Replies Latest reply on Apr 17, 2017 1:29 PM by aanjan RSS
    jdorcey Newbie

    Error recieved by certain users when trying to view a Mashup.

    Hello,

     

    I am receiving an error that I believe could be linked to Run Time permissions, but I am at a loss on how to fix it!

     

    I created a mashup which calls a service from a Thing, in that Things service there is a call made to another service inside of its ThingTemplate:

    var result = me.ExecuteService(params);

     

    When trying to view the mashup, I am receiving a red error bar in the middle of the mashup's screen and am unable to view it. Others in the User Group I belong to are also receiving this same error when trying to view the mashup.  However, the Administrator on the account is able to view the mashup with no problems.

     

    My User Group has been allowed permissions to Property Read and Service Execute on the ThingTemplate and Thing whose service's are being run when the mashup loads.

     

    We've tried changing these Run Time permissions for the User Group in the ThingTemplate and Thing, but we still cannot seem to figure out the correct permissions to grant the User Group in order for us to be able to view this mashup.

     

    Any ideas how we could go about fixing this error without giving a ton of permissions to a User Group that it really shouldn't have?

     

    Thank you!

      • Re: Error recieved by certain users when trying to view a Mashup.
        aanjan Heavyweight Champ

        Jennifer, just to check, if you go to that Thing directly, and run the service, what error message do you get?

          • Re: Error recieved by certain users when trying to view a Mashup.
            jdorcey Newbie

            This is the error message when running directly from the Thing:

            Wrapped com.thingworx.common.exceptions.InvalidRequestException: Execution error in service script [MIS.Remoting ExecuteService] : TypeError: Cannot read property "Data" from undefined (ExecuteService#34) Cause: Execution error in service script [MIS.Remoting ExecuteService] : TypeError: Cannot read property "Data" from undefined (ExecuteService#34)

             

            Here is the latest error message when I am using the Debug Info:

            08:47:47 ERROR - Runtime exception handling data update for binding {"Id":"ef572383-5107-44e8-86c9-94b9d9f9ef01","SourceArea":"Data","SourceSection":"Things_MIS_Remoting","SourceId":"GetStationData","SourceDetails":"AllData","TargetArea":"UI","TargetSection":"","TargetId":"Repeater-5","PropertyMaps":[{"SourceProperty":"STATION_HDR_DT","SourcePropertyType":"Field","SourcePropertyBaseType":"INFOTABLE","TargetProperty":"Data","TargetPropertyType":"property","TargetPropertyBaseType":"INFOTABLE"}],"isBoundToSelectedRows":false} Exception: Unable to get property 'length' of undefined or null reference

            08:47:47 ERROR - Error in invoking service Things_MIS_Remoting, GetStationData, Things, MIS.Remoting, Services, GetStationData. Error from the server

          • Re: Error recieved by certain users when trying to view a Mashup.
            polinao Ninja

            I would also suggest researching into the system user implementation, to avoid "giving too many permissions" to the user group: The use of System User

            • Re: Error recieved by certain users when trying to view a Mashup.
              Ankit Gupta Ninja

              Hi Jennifer Dorcey,

               

              A simple method to find out the missing Permission in a Mashup is to view the Mashup with the user login and then check the Application logs using Administrator login to find out the missing Permission for the user.

              Error would be like 'Unable to invoke Service' or something like Unable to find entity.

              This will give you details on which Permission(s) is/are missing for the user.

              As Polina mentioned; as a best practice and from security perspective we should provide access to System user for wrapped Services.

               

              Do let me know if you still face any issue.