Ad

AzureSpatialAnchors Basic Demo Not Saving

I just checked out the spatial anchors demo from GitHub, changed the keys and deployed it to my Samsung S8 successfully.

But when I try to save an anchor I get an IllegalStateException:

05-18 12:17:32.667 5536-6285/com.microsoft.sampleandroid E/CBindingAutoGen: exception causing failure: std::exception
05-18 12:17:32.670 5536-6286/com.microsoft.sampleandroid W/System.err: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
05-18 12:17:32.674 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.FutureTask.report(FutureTask.java:123)
05-18 12:17:32.675 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.FutureTask.get(FutureTask.java:193)
05-18 12:17:32.677 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.sampleandroid.AzureSpatialAnchorsManager.lambda$toEmptyCompletableFuture$2(AzureSpatialAnchorsManager.java:147)
05-18 12:17:32.680 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.sampleandroid.-$$Lambda$AzureSpatialAnchorsManager$8SSZbzB3fyFTuS1Rv6e_KEvy8B8.run(Unknown Source:2)
05-18 12:17:32.682 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1661)
05-18 12:17:32.684 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-18 12:17:32.686 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-18 12:17:32.687 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.lang.Thread.run(Thread.java:764)
05-18 12:17:32.690 5536-6286/com.microsoft.sampleandroid W/System.err: Caused by: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
05-18 12:17:32.692 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.azure.spatialanchors.NativeLibraryHelpers.checkStatus(NativeLibraryHelpers.java:65)
05-18 12:17:32.693 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.azure.spatialanchors.CloudSpatialAnchorSession$3.call(CloudSpatialAnchorSession.java:393)
05-18 12:17:32.695 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.azure.spatialanchors.CloudSpatialAnchorSession$3.call(CloudSpatialAnchorSession.java:390)
05-18 12:17:32.696 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
05-18 12:17:32.697 5536-6286/com.microsoft.sampleandroid W/System.err:  ... 3 more
05-18 12:17:32.700 5536-6286/com.microsoft.sampleandroid W/System.err: java.util.concurrent.CompletionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
05-18 12:17:32.701 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:276)
05-18 12:17:32.701 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:282)
05-18 12:17:32.702 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1664)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
05-18 12:17:32.703 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
05-18 12:17:32.703 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.lang.Thread.run(Thread.java:764)
05-18 12:17:32.704 5536-6286/com.microsoft.sampleandroid W/System.err: Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
05-18 12:17:32.705 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.sampleandroid.AzureSpatialAnchorsManager.lambda$toEmptyCompletableFuture$2(AzureSpatialAnchorsManager.java:150)
05-18 12:17:32.705 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.sampleandroid.-$$Lambda$AzureSpatialAnchorsManager$8SSZbzB3fyFTuS1Rv6e_KEvy8B8.run(Unknown Source:2)
05-18 12:17:32.706 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1661)
        ... 3 more
05-18 12:17:32.707 5536-6286/com.microsoft.sampleandroid W/System.err: Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
        at java.util.concurrent.FutureTask.report(FutureTask.java:123)
05-18 12:17:32.708 5536-6286/com.microsoft.sampleandroid W/System.err:     at java.util.concurrent.FutureTask.get(FutureTask.java:193)
        at com.microsoft.sampleandroid.AzureSpatialAnchorsManager.lambda$toEmptyCompletableFuture$2(AzureSpatialAnchorsManager.java:147)
05-18 12:17:32.709 5536-6286/com.microsoft.sampleandroid W/System.err:  ... 5 more
05-18 12:17:32.710 5536-6286/com.microsoft.sampleandroid W/System.err: Caused by: java.lang.IllegalStateException: std::exception.Request CV: . Response CV: .
05-18 12:17:32.711 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.azure.spatialanchors.NativeLibraryHelpers.checkStatus(NativeLibraryHelpers.java:65)
        at com.microsoft.azure.spatialanchors.CloudSpatialAnchorSession$3.call(CloudSpatialAnchorSession.java:393)
05-18 12:17:32.713 5536-6286/com.microsoft.sampleandroid W/System.err:     at com.microsoft.azure.spatialanchors.CloudSpatialAnchorSession$3.call(CloudSpatialAnchorSession.java:390)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        ... 3 more

I just used the normal code and did nothing else

Ad

Answer

Check the credentials… Error occurs if trying to access with wrong credentials.

Ad
source: stackoverflow.com
Ad