Camera App Failing to find main camera hardware

REPRODUCIBILITY: >90%
OS VERSION: 4.5.0.21
HARDWARE: XA2 Ultra
UI LANGUAGE:Default English
REGRESSION: Have experienced it for a lot of versions.

DESCRIPTION:

When I open the camera app, it takes a while to load and usually just opens with the front facing camera, and does not have the button to switch to the main camera. As if the main camera does not exist. Sometimes, it just opens black, and doesn’t work at all. Every now and then, it opens as it should, but during use may suddenly revert to only seeing the front facing camera, or no camera.

This can also affect the torch where it decides there’s only the front facing LED to be used.

It also, often means that there is no camera in Android apps - specifically secure ID ones, possibly because they expect a main camera for QR code scanning.

I never works without a restart, but even then, very rarely.

I have had this for many versions now (possibly since I had the phone), but I’ve only really needed the camera recently - it’s been a particular problem as I’ve needed to set up secure ID apps, and that’s much easier with QR code scanning.

I thought I had added a “mine too” comment to a camera bug report that matched this, but I can’t find it, and none of the ones I have just found match this exactly, or have been marked as fixed.

PRECONDITIONS:

None that I’m aware of.

STEPS TO REPRODUCE:

  1. Turn on camera.
  2. If it works as expected, leave it open and/or take a picture or two.
  3. If it doesn’t break, minimise/close it, and re-open.

EXPECTED RESULT:

The camera app should open the main camera, with a button in the UI to be able to switch to the front facing camera.

ACTUAL RESULT:

Camera app either opens with only front facing camera, or blank screen, and no UI button to switch.

MODIFICATIONS:

None. I also don’t have advanced camera or similar open.

ADDITIONAL INFORMATION:

Running dmesg, I do see a load of binder messages, but I’ve no idea if these are relevant. I can collect any logs necessary.

1 Like

A friend that also uses XA2 fixed a very similar issue with dconf reset -f /apps/jolla-camera/ after we brainstormed some on what it could be.
This will obviously will nuke your camera settings, but presumably you value those less than functionality.

4 Likes

Thanks. That’s not fixed it, unless it also requires a restart - can’t do that at the moment.

Only of the app. Too bad.

1 Like

Okay, thanks. I might try again after the next restart before I open it.Just in case.

On my XA2 Ultra, any such problems with the main camera can be fixed by tapping on the camera lense’s protective glass a few times. Sometimes lighter, other times a bit stronger, but it always works. Clearly a hardware issue, probably some poor contact of the camera module.

2 Likes

Thanks. I have thought it a hardware issue - the fact that it’s been intermittent and doesn’t seem to affect many other devices. I’m not sure how/when the tapping takes place, but just tried it, or a form of it, and it didn’t make any difference. I wonder if there’s a way to prove that’s the cause, and I’ll just know I have a broken device?

It would be nice to know one way or another, so I know it’s not a race condition or similar in the OS.

Well, I can’t really say much more than the above. The camera of my XA2U works OK for weeks, then out of a sudden it becomes not discoverable by camera apps, and depending on app I either only get the front camera or a black screen. Even trying to enable the flashlight results in the front camera’s flash lighting up. But when it happens, a few taps on the camera glass always fixes it, the camera becomes available and normally working again. Of course, your case may have completely different reasons, but try tapping it a bit stronger, just to make sure :slight_smile:

3 Likes

Since a few days my Jolla Camera app does not even try to open the main camera any more on an XA2+. It directly opens selfie camera. It shows the button to switch to main camera. Pressing that button doesn’t seem to do anything.
AdvancedCamera and Android’s OpenCamera work as expected.

If I run jolla-camera it shows this warning:

[W] unknown:20 - file:///usr/lib/qt5/qml/com/jolla/camera/settings/CameraDeviceToggle.qml:20: TypeError: Cannot read property 'length' of undefined

Closing the camera from the UI I get a core dump with this message:

corrupted double-linked list
Aborted (core dumped)

All directories such as ~/.config/com.jolla/camera, ~/.local/share/com.jolla/camera, and ~/.cache/com.jolla/camera are empty.
I tried to uninstall jolla-camera, howver pkcon refuses with the error that it would corrupt my system.

Do you have any hints how to recover the camera app?

1 Like

That is the exact problem description of what my friend solved with nuking the settings (see above).

2 Likes

I tried that before, of course.
However, I just found out it’s not /app/jolla-camera/. It should be /apps/jolla-camera/.
Also, I tried to run the command dconf as normal user, without devel-su and this worked for me.

Maybe you would like to adapt your post for future searches.
Just for reference, this was the command that worked for me, closing camera app first and reopen afterwords:

dconf reset -f /apps/jolla-camera/

Thanks @attah for your hint. This lead me to explore dconf dump /
@skanky maybe, you give it another try with the amended command.

2 Likes

Thanks for the clarification. Still doesn’t work. It could be a terminally loose connection.

I get those same errors, when I try and run from the command line.

Thanks for the update. I’ve tried both commands again and no luck. I do now get the camera seitch button, I think, I first noticed it yesterday but it may have appeared before that. It doesn’t work and exactly matches your issue.

Do other camera apps, such as AdvancedCamara or Android Cameras work for you?
Have your tried flashlight?

If none of them work, there may be a hardwre issue.

I haven’t tried the advanced camera, I’ll give it a go. The Android apps that I’ve used have all been build-tin QR scanners. One worked once, but generally they don’t - various results, from no camera, to front facing only. I am strongly leaning towards hardware issue - just wondered if there was any definitive method to know for sure. Thanks.

without installing new software, you may also test with CSD Tool:
Hardware Tests - All tests - Main Camera and flash

1 Like

I also had the stock cam app locked on the front cam since weeks on my XA2 single 4.5.0.19 with the difference that the switch button was visible.
It was working perfectly in adva’ced camera.
Many thanks @attah for the hint. That solved it instantly. Sorry that it doesn’t help the OP.

About the OT, can a camera be unplugged, inside? (as the phone doesn’t seem to even see it)

1 Like

Hi, thanks I’d completely forgotten about that tool. Anyway, when I run “Main Camera and flash” it opens the selfie/front facing camera. :man_shrugging:

Hi, is it Advanced Camera from the Jolla store, or one of the other installers (Chum/openrepos)? I installed the one from Jolla store and it just opens a blank/black screen. But then that’s what happens for the last few commenters there, so I wasn’t very hopeful. If there’s a more up to date version somewhere, I’ll try that.

I do think it may be a loose connection that finally failed. But if I can get it working, it would make things easier at times.