-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
helllo_ar_java emulator failed to create AR session #1647
Comments
I download and run the sample today and it seems like this error persists. I am using the hello_ar_kotlin version |
Same issue here. Emulator Properties Arcore SDK for Andriod version v1.43. It can detect 2 cameras. But fails to find the default camera. |
@devbridie Could you suggest which version of AR core SDK can be used while this bug is being fixed including compatible OS version and API level. |
SPECIFIC ISSUE ENCOUNTERED
Failed to create AR session com.google.ar.core.exceptions.fatalexception
hello_ar_java displays this error and a black screen when trying to run in emulator.
I downloaded the google play services for AR apk and installed on the emulator.
I have tried many different hardware profiles and API versions and none will successfully display.
Front camera is set to emulated in AVD and rear is virtualscene.
Logcat logs are pasted below.
Some APIs display this error, and in some, the app just crashes.
024-03-30 22:03:53.259 4873-4873 native com....core.examples.kotlin.helloar E E0000 00:00:1711850633.259084 4873 session_create_implementation_shared.cc:1283] UNKNOWN:
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1283
Failed to create java data source utils.
ARCoreError: third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc:84
getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2)
=== Source Location Trace: ===
third_party/arcore/ar/infrastructure/android/jni_util.cc:111
third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc:84
2024-03-30 22:03:53.259 4873-4873 native com....core.examples.kotlin.helloar E E0000 00:00:1711850633.259215 4873 session_create_implementation_shared.cc:1424] UNKNOWN:
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1424
Failed to create cameras using image subsystem from java stack.
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1283
Failed to create java data source utils.
ARCoreError: third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc:84
getCameraCharacteristics:851: Unable to retrieve camera characteristics for unknown device 0: No such file or directory (-2)
=== Source Location Trace: ===
third_party/arcore/ar/infrastructure/android/jni_util.cc:111
third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc:84
third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1283
2024-03-30 22:03:53.261 4873-5014 third_part..._helper.cc com....core.examples.kotlin.helloar V ~JniHelper: about to detach thread (Called from line 368).
2024-03-30 22:03:53.261 4873-5014 third_part..._helper.cc com....core.examples.kotlin.helloar V ~JniHelper: detached thread (Called from line 368).
2024-03-30 22:03:53.261 4873-4873 native com....core.examples.kotlin.helloar E E0000 00:00:1711850633.261404 4873 error_policy_util.cc:263]
################ ARCore Native Error ##################
BUILD_CHANGELIST:612958796
BUILD_BASELINE_CHANGELIST:604173239
################### Stack Trace Begin ################
ARCoreError: third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc:84 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/infrastructure/android/java_data_source_utils.cc?g=0&l=84
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1283 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc?g=0&l=1283
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:1424 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc?g=0&l=1424
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:2674 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc?g=0&l=2674
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc:3040 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation_shared.cc?g=0&l=3040
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation.cc:398 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation.cc?g=0&l=398
ARCoreError: third_party/arcore/ar/core/android/implementation/session_create_implementation.cc:512 https://cs.corp.google.com/piper///depot/google3/third_party/arcore/ar/core/android/implementation/session_create_implementation.cc?g=0&l=512
################### Stack Trace End #################
2024-03-30 22:03:53.263 4873-4873 HelloArActivity com....core.examples.kotlin.helloar E ARCore threw an exception
com.google.ar.core.exceptions.FatalException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at com.google.ar.core.Session.throwExceptionFromArStatus(Session.java:16)
at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Native Method)
at com.google.ar.core.Session.(Session.java:11)
at com.google.ar.core.examples.kotlin.common.helpers.ARCoreSessionLifecycleHelper.tryCreateSession(ARCoreSessionLifecycleHelper.kt:88)
at com.google.ar.core.examples.kotlin.common.helpers.ARCoreSessionLifecycleHelper.onResume(ARCoreSessionLifecycleHelper.kt:96)
at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged(FullLifecycleObserverAdapter.java:42)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:361)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:300)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:339)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:145)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:131)
at androidx.lifecycle.ReportFragment.dispatch(ReportFragment.java:123)
at androidx.lifecycle.ReportFragment.onResume(ReportFragment.java:90)
at android.app.Fragment.performResume(Fragment.java:2556)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1346)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642)
at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3052)
at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:3014)
at android.app.FragmentController.dispatchResume(FragmentController.java:207)
at android.app.Activity.performResume(Activity.java:8767)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4952)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4995)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:180)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2024-03-30 22:03:53.272 4873-4873 Compatibil...geReporter com....core.examples.kotlin.helloar D Compat change id reported: 210923482; UID 10192; state: ENABLED
2024-03-30 22:03:53.318 4873-4962 Compatibil...geReporter com....core.examples.kotlin.helloar D Compat change id reported: 247079863; UID 10192; state: DISABLED
2024-03-30 22:03:53.318 4873-4934 EGL_emulation com....core.examples.kotlin.helloar D app_time_stats: avg=2037.11ms min=14.23ms max=4059.99ms count=2
2024-03-30 22:03:53.348 4873-4934 OpenGLRenderer com....core.examples.kotlin.helloar E Unable to match the desired swap behavior.
2024-03-30 22:03:54.337 4873-4962 BLASTBufferQueue com....core.examples.kotlin.helloar E SurfaceView[com.google.ar.core.examples.kotlin.helloar/com.google.ar.core.examples.kotlin.helloar.HelloArActivity]#1 rejecting buffer:active_size=1080x2268, requested_size=1080x2268 buffer{size=1080x2205 transform=0}
2024-03-30 22:03:54.369 4873-4873 Choreographer com....core.examples.kotlin.helloar I Skipped 61 frames! The application may be doing too much work on its main thread.
VERSIONS USED
Android Studio: Android Studio Iguana | 2023.2.1 Patch 1
Build #AI-232.10300.40.2321.11567975, built on March 13, 2024
Runtime version: 17.0.9+0--11185874 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4064M
Cores: 24
Registry:
ide.experimental.ui=true
ARCore SDK for Android: v1.42.0
Device manufacturer, model, and O/S: Pixel 8 and Pixel 3 XL API 34 (tested on API 33 through 29 and some crash, some display this error)
Google Play Services for AR (ARCore): v1.42.0
On Windows, use:
adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"
versionName=1.42.240360593
On macOS, use:
adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:
Output of
adb shell getprop ro.build.fingerprint
:-google/sdk_gphone64_x86_64/emu64xa:14/UE1A.230829.036.A1/11228894:userdebug/dev-keys
STEPS TO REPRODUCE THE ISSUE
WORKAROUNDS (IF ANY)
ADDITIONAL COMMENTS
The text was updated successfully, but these errors were encountered: