Start a new topic

ArchitectView.CamNotAccessibleException crash

Hi, 


We have an app using Wikitude SDK 9.5, the JS version, on Android.


A crash report came up originating from the AR View and the error seems to be: 

(Console Logs) 30-07 21:15:00.036 E/AndroidRuntime(21892): java.lang.RuntimeException: Unable to start activity ComponentInfo{*/*/*.presentation.home.ar.ARViewContentController}: com.wikitude.architect.ArchitectView$CamNotAccessibleException: Could not find a camera with the given position


The device is: Xiaomi M2010J19CG

Android 10


Any idea why this is happening or how we can protect against it?  I am not sure when can the camera not be accessible. 


Thank you,

George


Hi,


I did check the piece of code where that specific error log is placed and it looks weird to me since the only thing we are trying to do is to get a camera ID from the first camera of the device that matches the position you are sending (BACK in this case).


Unfortunately, in this case it doesn't really matter the rest of the camera settings. If there is no camera IDs with that position, it is impossible for us to open the camera at all. Also I can't find an easy workaround so that you can easily apply into your code, but to check with that specific device different settings than the one you are currently applying.


Nevertheless, I will open an internal ticket to take this issue into account and to implement a fix as soon as possible or as soon as we are able to reproduce it.


Regards,


Aitor.

Hi Aitor,


Thank you for your reply. 

1. The camera 2 is not enabled.

2. Yes, I am setting CameraPosition.BACK and CameraResolution.HD_1280x720

3. I am attaching the file.


Testing on the devices we have, the crash did not come up. This crash came from the Play Store reports from a user, as the app is live already. We do not have the Xiaomi device to test on.

How should the camera settings be approached, so that the image quality will be good, but not force and crash in case the setting is not possible?


Thank you,

George

java

Hi,


I would like to know more details about how are you opening the camera:

  1. Are you using the camera 1 or enabling the camera 2?
  2. Are you applying some StartUpConfiguration values such as CameraPosition and CameraResolution?
  3. Could you send the piece of code where you are starting the Wikitude SDK?


That error is happening when we are trying to find a camera with some values, and could not be found in that specific device. Did you try with a different device? Did you try our sample app to check if the same issue is reproducible with the same device?


Regards,


Aitor.

Login or Signup to post a comment