svenjacobs / leon

Android app for removing tracking parameters from shared URLs
GNU General Public License v3.0
225 stars 16 forks source link

Crash when default browser doesn't support Custom Tabs #422

Closed serrq closed 1 week ago

serrq commented 3 months ago

Android 14 Leon 42 (fdroid) OnePlus CPH2399

1000113892

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

svenjacobs commented 3 months ago

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.

serrq commented 3 months ago

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

1000113894

serrq commented 3 months ago

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

1000113897

svenjacobs commented 3 months ago

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.

serrq commented 3 months ago

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

svenjacobs commented 3 months ago

What browser is installed on your device?

serrq commented 3 months ago

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?

svenjacobs commented 3 months ago

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.

serrq commented 3 months ago

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?

svenjacobs commented 3 months ago

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

serrq commented 3 months ago

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

1000113909

svenjacobs commented 3 months ago

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

serrq commented 1 month ago

Any updates on this issue?

svenjacobs commented 1 week ago

@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 commented 1 week ago

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

svenjacobs commented 1 week ago

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.