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

Not able to download PVZ file from Thingworx Repository using public access.

Highlighted
Pearl

Not able to download PVZ file from Thingworx Repository using public access.

Hi all,

 

I have created experience to download PVZ file from Thingworx Repository. It works perfectly when I set authentication but fails at public access.

 

Error message in Vuforia View App : 03-11 10:47:36.518 23787 24326 E TGX_NativeDownloadTask: com.ptc.thingx.cordova.plugin.core.TGXUtils$HttpResponseException: url=http://vuforia.domain.net/Thingworx/FileRepositories/SystemRepository/PVZs/XYZ.pvz, httpResponseCode=401, httpResponseMessage=Unauthorized, extraInformation=null

I have provided access to 'es-public-access' and also tried by adding 'es-public-access' to Administrator group

When I try same API call using Thingworx domain (http://thingworx.domain.net) and 'es-public-access ' appKey it works perfectly but it throws error when I use domain as 'http://vuforia.domain.net/'

5 REPLIES 5
Highlighted

Re: Not able to download PVZ file from Thingworx Repository using public access.

@Velkumar 

 

Do you mean that it works fine if you set "Require Authentication" in the access field of the experience, it works fine, however, if you set the access field to "public",  you could NOT download the PVZ from view?

What is the difference between 'http://vuforia.domain.net/'  and (http://thingworx.domain.net)?

What is your Platform of Vuforia View, Android or IOS? or neither of the two platforms work?

 

Highlighted

Re: Not able to download PVZ file from Thingworx Repository using public access.

Hi @Jimwang 

 

Yes, if I set 'Required Authentication' in experience it works, but not as 'Public' in experience.

 

'http://thingworx.domain.net/' is the Thingworx domain. 'http://vuforia.domain.net' is the domain requested by Vuforia View application to download/load PVZ file.

 

Issue occurs on both platform Android and iOS.

 

/VR

Highlighted

Re: Not able to download PVZ file from Thingworx Repository using public access.

If you set 'Required Authentication' in experience it works, I would suggest to double check the permission setting for the related Things in Thingworx refer to "Configure Public Access to ThingWorx" section in Help Center

especially the section Grant user permission and Grant Organization permission. see below Link:

http://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FAnonymousAccess.html%23

Highlighted

Re: Not able to download PVZ file from Thingworx Repository using public access.

Hi @Velkumar ,

 

I am not sure if the direct access to the http/s will work , because I used another apprach what we already discussed in the post:

How to load 3D model in runtime from Thingworx File Repository

using the Thingworx service app.mdl.<Your-Repository-Thing>.svc.LoadBinary is the current supported way to do this.

I think I tried in the past to use the $https service or fetch  e.g. described in "Receiving binary data using JavaScript typed arrays" and it worked in generally in chrome preview mode but on the mobile devices  it has difficulties based on the CORS restriction and it will make it difficult to solve this on the end devices. So far I know to be able to read data directly form web sever link it should be based on  the same domain where the application was received .  I think it is possible to reconfigure to add some trusted domain of the app, but I am not expert there I have no idea how to do this on android or IOS. May be someone could help and provide some hints. Thanks.

Highlighted

Re: Not able to download PVZ file from Thingworx Repository using public access.

Another way I've been able to make this work is by appending the public user appKey as a URL parameter on the src URL. For example. to load model cad.pvz from file repository VuforiaProcedureGraphicStore, we use a URL like this:

https://vmqlbmkm.studio-trial.thingworx.io:8443/Thingworx/FileRepositories/VuforiaProcedureGraphicStore/cad.pvz?x-thingworx-session=true&appKey=xxxxxxxxxxxxxxxxxxxxxxxxxx

This allows access without requiring active authentication.

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection