SceneView / sceneform-android

Sceneform Maintained is an ARCore Android SDK with Google Filament as 3D engine. This is the continuation of the archived Sceneform
https://sceneview.github.io/sceneform-android/
Apache License 2.0
616 stars 143 forks source link

Crash on App Start: NoSuchMethodError for acquireEnvironmentalHdrCubeMap #463

Open Subramanyarao11 opened 4 months ago

Subramanyarao11 commented 4 months ago

Hello,

I'm encountering a runtime crash in my AR app that uses Sceneform. The crash occurs immediately after granting camera and AR permissions, and it seems related to the ARCore LightEstimate functionality, although my application does not explicitly use the LightEstimate.acquireEnvironmentalHdrCubeMap() method.

Error Message:

FATAL EXCEPTION: main Process: com.example.draw, PID: 17087 java.lang.NoSuchMethodError: No virtual method acquireEnvironmentalHdrCubeMap()[Lcom/google/ar/core/ArImage; in class Lcom/google/ar/core/LightEstimate; or its super classes (declaration of 'com.google.ar.core.LightEstimate' appears in /data/app/~~HqDIVrudygaS9gw55gIagg==/com.example.draw-CJtrcjl5EEp1CNnlpVOyNA==/base.apk) at com.gorisse.thomas.sceneform.light.LightEstimationKt.environmentalHdrEnvironmentLights(LightEstimation.kt:394)

Steps to Reproduce:

  1. Build and run the app on the device.
  2. Grant camera and AR permissions as requested.
  3. The app crashes immediately after permissions are granted.

Environment:

I've included all relevant code in a gist for review: Gist Link

Here's the screenshot of the run time error I am getting in logcat Screenshot (32)

Could you please help identify the cause of this issue or suggest a workaround?

Thank you for your support.

github-actions[bot] commented 1 month ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

dhatriparakal commented 1 month ago

I'm having the same issue, I'm also not using LightEstimate in my code

Mehequanna commented 1 month ago

The error is correct, ARCore version 1.41.1 does not have acquireEnvironmentalHdrCubeMap(). it's best to use the same ARCore version the Sceneform-Maintained release does. In this case, com.gorisse.thomas.sceneform:sceneform:1.23.0 is using ARCore version 1.31.0