Closed vincentfretin closed 2 years ago
I had the same timeout issue at the same time on both Android (Samsung S8) and iOS (iPad 2018 6th gen).
I see SDK 2.2.0 added a new HttpTimeout error code. I will assume this error code is used instead of ApplicationNotAuthenticated for the stacktraces I shown. I close the issue. I'll reopen if I get the issue again.
With SDK 2.2.0, after trying to save new anchor, I got a CloudSpatialException with error code ServerError triggered by a json error after a service timeout I believe. So this is not using the new HttpTimeout.
2020-02-21 11:19:24.030 12217-12490/? E/HttpRequestClient: Failed to execute async request
java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:232)
at okio.AsyncTimeout.exit(AsyncTimeout.java:285)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:355)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:227)
at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215)
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.net.SocketException: socket is closed
at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:584)
at okio.Okio$2.read(Okio.java:140)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:355)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:227)
at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215)
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:147)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2020-02-21 11:19:24.037 12217-12409/? I/Unity: N15SpatialServices47CreateNeighborhoodAnchorAndSpatialAnchorRequestE returned HTTP 0. ReqCV: ryEkiaccTxOvng26ML3ABw. RespCV: .
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020-02-21 11:19:24.042 12217-12409/? I/Unity: CreateNeighborhoodAnchorAndSpatialAnchor failed with HTTP error 0. ReqCV: ryEkiaccTxOvng26ML3ABw. ResCV: . JSON Error:
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
2020-02-21 11:19:24.044 12217-12485/? I/Unity: OnError - Service unavailable or unspecified error found
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
Microsoft.Azure.SpatialAnchors.OnLogDebugDelegate:Invoke(Object, OnLogDebugEventArgs)
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
Hi @vincentfretin , thanks for reporting! I've filed an internal issue (#26120953) for this so that we can take a look at it.
Hello, I closed this item as this was originally submitted close to two years ago. Our latest release is available here – please re-open this item should you have further feedback for the team. Alternatively, if you have any ideas or requests for new features or capabilities, or should you wish to upvote an existing idea, please visit our Feedback hub
Thank you
With the BasicDemo from this repo on
The watcher can trigger the following error (catched in the CloudManager_Error method) "Error: Application did not provide valid credentials and therefore could not authenticate" that is shown to the user in the feedbackBox. The message come from a CloudSpatialException exception with errorCode ApplicationNotAuthenticated. The error is misleading, the credentials are perfectly valid here, I made it works 5 minutes before that. It's actually the service that timeout with the following error "nError: gRPC error code [3] - msg [Unable to obtain authentication token: {The token service encountered an error.}] - ReqCV [] - ResCV []". I think the exception error code should really be in this case CannotConnectToServer.
example of stacktrace I saw from the logcat panel in android studio:
or