cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

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

jdorcey
3-Visitor

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!

1 ACCEPTED SOLUTION

Accepted Solutions
ankigupta
5-Regular Member
(To:jdorcey)

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.

View solution in original post

5 REPLIES 5
Aanjan
9-Granite
(To:jdorcey)

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

jdorcey
3-Visitor
(To:Aanjan)

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

Aanjan
9-Granite
(To:jdorcey)

What does the GetStationData on the MIS.Remoting do? The first error with 'Cannot read property "Data" from undefined' would indicate that the reason it failed is because the service is expecting some sort of input ('Data') from elsewhere. We need to check if your current user have visibility/ runtime permissions for providing this Data value.

posipova
20-Turquoise
(To:jdorcey)

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

ankigupta
5-Regular Member
(To:jdorcey)

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.

Top Tags