google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.97k stars 1.22k forks source link

Earth state is INTERNAL when starting the app without an active internet connection #1671

Closed Tom3652 closed 1 month ago

Tom3652 commented 2 months ago

SPECIFIC ISSUE ENCOUNTERED

Build the sample app and turn off your wifi / internet connection. See that Earth.EarthState is ERROR_INTERNAL.

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

  1. Turn off all internet connectivity on your phone
  2. Log the earth state
  3. Run the sample quickstart
  4. See the earth state is in ERROR_INTERNAL

WORKAROUNDS (IF ANY)

No workarounds unfortunately

ADDITIONAL COMMENTS

Note : turning on wifi when the app is already running doesn't make it work, you have to kill the app and restart it with internet connection to get a "normal" earth state.

Tom3652 commented 2 months ago

I just think about it now, but is it possible that the ARCore sdk is checking for the API availability before starting the session ? And thus encounter an error because there is no internet connection ?

15kingben commented 1 month ago

Geospatial requires an internet connection, so you will get EarthState Error Internal starting the app without an internet connection. I think at that point the only way to fix the issue would be to call Session.configure twice and disable/reenable the geospatial api once internet has been restored (or wait for internet access before configuring the arcore session initially).