leon icon indicating copy to clipboard operation
leon copied to clipboard

Crash when default browser doesn't support Custom Tabs

Open serrq opened this issue 1 year ago • 13 comments

Android 14 Leon 42 (fdroid) OnePlus CPH2399

1000113892

This crash happen after I pushed on "open URLs in a custom tab..." in settings

serrq avatar Jun 20 '24 11:06 serrq

I currently only find version 41 on F-Droid. However I cannot reproduce this crash with 41 from F-Droid or 42 from Play Store. Please clear the app data and try if it helps. If not please provide a crashlog (Android logcat) if possible.

svenjacobs avatar Jun 20 '24 11:06 svenjacobs

Wiping app data solve the "launch" issue, but not the bug itself.

1000113894

serrq avatar Jun 20 '24 12:06 serrq

Try this move and then update again Droid-ify or something-ify... (to find 42)

1000113897

serrq avatar Jun 20 '24 12:06 serrq

I installed 42 via Droid-ify. I only used the official F-Droid client before. Still no crash. Please provide a crashlog or I have no idea what's going on.

svenjacobs avatar Jun 20 '24 12:06 svenjacobs

I have no idea about how to building a crash log. I am not a developer. Sorry.

serrq avatar Jun 20 '24 12:06 serrq

What browser is installed on your device?

svenjacobs avatar Jun 20 '24 12:06 svenjacobs

I have three browsers: DuckDuck, Mull, Fennec. All taken from droid-ify.

Okay, the crash occurs because there are three available options...

Could be so?

serrq avatar Jun 20 '24 12:06 serrq

Do you know if any of those browsers support Custom Tabs? It is a functionality that browsers must implement to support. Could you maybe as a test install the regular Firefox and see if it still crashes? I assume it has something to do with this code.

svenjacobs avatar Jun 21 '24 06:06 svenjacobs

Yes, with the official "Firefox for Android" browser Leon doesn't crash, but only if Firefox is set as default browser. Having it installed is not enough, it needs to be set as default.

So what do you will do? Make an exception?

serrq avatar Jun 21 '24 06:06 serrq

I probably need to add a check if the current default browser even supports Custom Tabs.

svenjacobs avatar Jun 21 '24 06:06 svenjacobs

Ehm... default browser is Leon in my device...

1000113909

serrq avatar Jun 21 '24 06:06 serrq

Hm, that's interesting. Maybe having Leon as the default browser means Custom Tabs are not possible.

svenjacobs avatar Jun 21 '24 06:06 svenjacobs

Any updates on this issue?

serrq avatar Aug 23 '24 11:08 serrq

@serrq I'm sorry, but I can't reproduce this crash. Even when Leon is set as the default browser and custom tabs are enabled, the app does not crash. Nothing happens when I click "open" because Leon as default browser can't handle custom tabs.

Can you please try with the latest version? Also please install via official F-Droid app, just to be sure.

Screenshot_20240921_161411

svenjacobs avatar Sep 21 '24 14:09 svenjacobs

Forget what I said. I can reproduce this crash when restarting Leon. A fix is incoming.

svenjacobs avatar Sep 21 '24 15:09 svenjacobs

The fix just addresses the crash.

However, the situation where Leon is the default browser and thus can't open links from within Leon (because it's not a real browser) needs more attention. This also relates to #372.

svenjacobs avatar Sep 21 '24 15:09 svenjacobs