Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ErrorEarthNotReady causing black screen #183

Open
Ivan1Kot opened this issue Mar 16, 2024 · 10 comments
Open

ErrorEarthNotReady causing black screen #183

Ivan1Kot opened this issue Mar 16, 2024 · 10 comments

Comments

@Ivan1Kot
Copy link

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
Copy link
Author

Somehow it worked on POCO X3.

@15kingben
Copy link

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

@Ivan1Kot
Copy link
Author

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

Yes

@mrossi-os
Copy link

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 #147

@swardle
Copy link

swardle commented May 14, 2024

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.

@mrossi-os
Copy link

@swardle thanks but I suppose this is not my problem :(
I tried with WiFi and 5G on many different devices, at work and at home, with my old project or a new one (https://github.com/google-ar/codelab-geospatial-creator-places-api). Still no results.

@eplesse
Copy link

eplesse commented Jun 27, 2024

For what is worth, i have been struggling with this for the last 3 days. Closing Unity, erasing "Library" folder, reopening projet within UNITY and rebuilding apk seems to have helped.

My conf:

  • Windows 10
  • Unity 2022.3.9.f1
  • ARCore XR Plugin 5.0.7
  • ARFoundation 5.0.7
  • ARCore Extensions 1.44.0
  • Cesium for UNITY 1.10.1
  • Geospatial sample scene "GeospatialArf5"

@JooonseoP
Copy link

JooonseoP commented Jul 4, 2024

I'm creating an AR Map program, but I'm experiencing the same problem.

Every time I build, sometimes it works and sometimes it doesn't, so I'm trying various ways to solve the problem, but I don't know what the difference is. Does the problem occur when building, or when the program is turned off and on?

If the above method doesn't work, I thought I could clear the build cache and build again, but that wasn't the case. Accurate problem analysis and solution are required. This problem has been bugging me for a week.

My conf:

  • Windows 10
  • Unity 2022.3.32.f1
  • ARCore XR Plugin 5.1.4
  • ARFoundation 5.1.4
  • ARCore Extensions 1.44.0
  • Cesium for UNITY 1.10.1
  • build : Android
  • Android Machine : Galaxy Note10 5G, SM-N971N
  • Android Version : 12

@emremustu
Copy link

Hi,
I was experiencing the same issue on Unity 2022.3.35f1 and AR Core Extensions 1.44.0. I switched my Unity version to 2021.3.17f and AR Core Extensions to 1.37.0 . I did not switch Cesium version (1.11.0) I guess it doesn't matter. Now my app is working. I know, of course this is not a solution for the problem but if you are not going to use new features you can use these stable versions.

@zerozero
Copy link

zerozero commented Aug 8, 2024

Have a look here - If you run Android Logcat and see the error AR_ERROR_GOOGLE_PLAY_SERVICES_LOCATION_LIBRARY_NOT_LINKED then this is the cause. You need to make sure this library is included in the build. For me, I had to check Custom Main Manifest, Custom Base Gradle Template, Custom Gradle Properties Template, Custom Gradle Settings Template in Publishing Settings. Then Force Resolve in Assets -> External Dependency Manager -> Android Resolver.
Fixed it for me in 2023.2, AR Core Extensions 1.44.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants