sceneform-android icon indicating copy to clipboard operation
sceneform-android copied to clipboard

Crash on App Start: NoSuchMethodError for acquireEnvironmentalHdrCubeMap

Open Subramanyarao11 opened this issue 11 months ago • 3 comments

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:

  • ARCore SDK version: [1.41.1]
  • Sceneform version: [1.23.0]
  • Android device and OS version: [Samsung Galaxy A14 5G, Android v13]

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.

Subramanyarao11 avatar Mar 15 '24 06:03 Subramanyarao11

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.

github-actions[bot] avatar Jun 14 '24 05:06 github-actions[bot]

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

dhatriparakal avatar Jun 20 '24 14:06 dhatriparakal

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

Mehequanna avatar Jun 25 '24 23:06 Mehequanna