Using a custom web server for sharing Anchor IDs doesn't work

人盡茶涼 提交于 2019-12-23 05:25:16

问题


I'm trying to use my own Python cgi script to store and serve Anchor IDs. Everything worked with the Swagger Sharing Server from the samples repository but somehow when I switch to my Python server I get an Error and the app is stuck looking for the anchor.

What I'm doing is, I assume, exactly the same the Swagger Script does: I send the Anchor ID to the server and return an Anchor number to be able to request the ID later again. As far as I understood the ID needs to be exchanged as a string and that's what I return from my Python server as well (Content-type: text/plain).

However I get following error on my Android when trying to parse the key / look for the Anchor ID once I got it from the server:

Here's the relevant error message from logcat:

04-29 07:33:01.031: I/Unity(28756): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
04-29 07:33:02.062: I/Unity(28756): State from DemoStepLookForAnchor to DemoStepLookingForAnchor
04-29 07:33:02.062: I/Unity(28756):  
04-29 07:33:02.062: I/Unity(28756): (Filename: ./Runtime/Export/Debug.bindings.h Line: 45)
04-29 07:33:02.141: E/Unity(28756): InvalidOperationException: bad lexical cast: source type value could not be interpreted as target. Request CV: . Response CV: .
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.NativeLibraryHelpers.CheckStatus (System.IntPtr handle, Microsoft.Azure.SpatialAnchors.status value) [0x000cc] in <b52d7a321113460294136f243fd7bd66>:0 
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.CloudSpatialAnchorSession.CreateWatcher (Microsoft.Azure.SpatialAnchors.AnchorLocateCriteria criteria) [0x00019] in <b52d7a321113460294136f243fd7bd66>:0 
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.Unity.Samples.AzureSpatialAnchorsDemoWrapper.CreateWatcher () [0x00008] in <b52d7a321113460294136f243fd7bd66>:0 
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.Unity.Samples.AzureSpatialAnchorsSharedAnchorDemoScript.AdvanceLocateFlowDemo () [0x00090] in <b52d7a321113460294136f243fd7bd66>:0 
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.Unity.Samples.AzureSpatialAnchorsSharedAnchorDemoScript.AdvanceDemo () [0x00018] in <b52d7a321113460294136f243fd7bd66>:0 
04-29 07:33:02.141: E/Unity(28756):   at Microsoft.Azure.SpatialAnchors.Unity.

What could be wrong? Many thanks in advance!

来源:https://stackoverflow.com/questions/55929296/using-a-custom-web-server-for-sharing-anchor-ids-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!