Can't run SharingTest scene from HoloToolkit-Test on emulator
I compiled the sample and put to my HoloLens where is working fine, but when I tried to do the same on emulator I got "Found anchor, ready to export" message and later I have hundreds of "Failed to upload anchor, trying again..." messages.
I tried to debug ImportExportAnchorManager script and I found that problem is in ExportComplete method where there is a check for exportingAnchorBytes.Count. In my case it has always 310 bytes that that is too low for MinTrustworthySerializedAnchorDataSize (set to 100000).
Anyone had similar issue? I didn't change anything on this project so it should work just OOTB. Am I missing something?
I was able to repro this on another machine both with Unity 5.6.3p2, HoloToolkit 1.5.7 and emulator v10.0.14393.1358. I tried many rooms but it always is 310.
In my case it has always 310 bytes that that is too low for
MinTrustworthySerializedAnchorDataSize
Have you tried adding a room to the emulator to get more spatial mapping data?
Yes I did. I tried also with default rooms. Always same number. I tried also to connect my HoloLens first so it should download some WorldAnchor from server, but result was the same. Have you check "SharingTest" test project on Unity 2017? Is it working there?
I don't ever use the emulator, so I couldn't tell ya.
Lucky you! I don't have another HoloLens for my own :)
I updated the sharing services. See if that helps at all.
Thanks Stephen! I had to re-create project as your changes were targeting Unity 2017.1. I did my test again and it is same story. It is working fine for HoloLens and not working for emulator. SharingTest project is different now and it is no longer using ImportExportAnchorManager script. Now Import/Export anchors is done in SharingWorldAnchorManager script. I managed do attached debugger and here is my result.
In green box there is successful try to save and export "AnchorVisual". That was fine. Anchor was saved and cached. In red box there is debug output about another anchor that was created but not exported.
As you can see upload data is too small to be exported. It is very similar to problem that I got with ImportExportAnchorManager script.
Do you know what data is used to build anchors? I'm curious why it is so small.
Great details on the issue!
Yeah I'm unsure as to why the anchors are so small on the emulator. My only suggestion (Shot in the dark) is to clear the spaces in the emulator (like you would the device) and see if that helps.
Seems like you're getting bad spatial perception data from the emulator.
I loaded DefaultRoom.xef file and clear Space that should remove all anchors but still is not working. I noticed that my emulator has no Internet access. Is Internet needed for WorldAnchors?

As long as you can reach the sharing service server locally in your pc, you should be good.
Even then, really the only thing I can think of is just making the minimum size smaller just for the emulator.
I tried to set size smaller and it says that anchor was exported but devices can't recognize same room. I made new project for Unity 2017.2 beta 11 and HTK 2017.2 Dev branch, but results were same. On HoloLens device is working fine, on emulator I got "Anchor data was not valid" error. Good think about migration to 2017.2b11 was that debugger is working much better than 2017.1 release. I will try to find some more time to play with it, but for now I have no idea what else I can test. Any suggestions?
I have the same error but also in the Hololens. In my case the Anchor size is 0. Any news about this bug?
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.