arcore-unity-extensions
arcore-unity-extensions copied to clipboard
ErrorEarthNotReady causing black screen
Hello,
I'm trying to make a simple geospatial unity project on android but I'm having problems with a black screen.
I have suspicions that the cause of the black screen may be EarthState.ErrorEarthNotReady
, which does not disappear (screenshot below).
screenshot from android device
if I turn off the ARCoreExtensions component, the black screen disappears.
I traced the code to a call to the external function ExternApi.ArSession_acquireEarth
from the SessionAPI
class that I found in the ArCoreExtensions files, which, according to the information I found here, should return an earth object
, but in my case it returns null. It also says that the function returns null when #AR_GEOSPATIAL_MODE_DISABLED
.
ExternApi.ArSession_acquireEarth call in SessionAPI class
ArSession_acquireEarth method documentation I found
I double checked the GeospatialMode.Enabled state.
ARCoreExtensionsConfig.asset
Also earthManager.IsGeospatialModeSupported(GeospatialMode.Enabled)
returns supported
state, this is shown in the first screenshot.
My environment: Unity 2021.3.22f1 ARFoundation 4.2.10 ARCore 4.2.10 ARKit 4.2.10 ARCoreExtansions 1.41.0 Cesium 1.7.1
Mi 8 android device (ARCore supported), android version 10.
Any information on this would be very helpful and useful. Thanks.
Somehow it worked on POCO X3.
Do you get the same behavior on the GeospatialSample? https://github.com/google-ar/arcore-unity-extensions/tree/master/Samples~/Geospatial
Do you get the same behavior on the GeospatialSample? https://github.com/google-ar/arcore-unity-extensions/tree/master/Samples~/Geospatial
Yes
Hi, same issue here. I'm using:
- Unity 2022.3.5f1
- AR Core extension 1.42
- AR Foundation 5.0.7
- Cesium 1.9.0
- Host Machine: Win11
- Target: Android
It works fine initially but after some time AREarthManager.EarthState is always ErrorEarthNotReady. An API key is used for authorization.
P.S: posted this also on https://github.com/google-ar/arcore-unity-extensions/issues/147
One way to get an AREarthManager.EarthState is always ErrorEarthNotReady error with an unchanged sample is with a flaky internet connection.
For me it was a simple problem, I didn't have a sim card for my work phone for testing Geospatial outside and trying to use a building wifi can be tricky. In my case tethering my work phone no sim to my personal phone with a sim card made this work much better.
This does hint that if your network is flaky for other reasons and you can't talk to the VPS server and send your camera data you will see a similar issue.