arcore-unity-extensions icon indicating copy to clipboard operation
arcore-unity-extensions copied to clipboard

ErrorEarthNotReady causing black screen

Open Ivan1Kot opened this issue 11 months ago • 10 comments

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). image 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.

image ExternApi.ArSession_acquireEarth call in SessionAPI class

image ArSession_acquireEarth method documentation I found

I double checked the GeospatialMode.Enabled state. image 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.

Ivan1Kot avatar Mar 16 '24 11:03 Ivan1Kot

Somehow it worked on POCO X3.

Ivan1Kot avatar Mar 16 '24 12:03 Ivan1Kot

Do you get the same behavior on the GeospatialSample? https://github.com/google-ar/arcore-unity-extensions/tree/master/Samples~/Geospatial

15kingben avatar Mar 21 '24 18:03 15kingben

Do you get the same behavior on the GeospatialSample? https://github.com/google-ar/arcore-unity-extensions/tree/master/Samples~/Geospatial

Yes

Ivan1Kot avatar Mar 21 '24 18:03 Ivan1Kot

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

mrossi-os avatar Apr 08 '24 09:04 mrossi-os

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.

swardle avatar May 14 '24 17:05 swardle