obsidian-map-view icon indicating copy to clipboard operation
obsidian-map-view copied to clipboard

Map View dead in Obsidian Android app

Open delbian opened this issue 2 years ago • 15 comments

Map View (4.0.0) is working correctly in Obsidian Desktop (linux) but seems dead in the Obsidian Android App (1.4.6)

Once enabled, settings are not shown, and the commands are not present in the command palette

What kind of additional info should I provide to better identify the problem?

delbian avatar Aug 14 '23 14:08 delbian

Seeing the same thing happening on my end. Mapview (v4.0.0) on windows, but does not work on android (app v1.4.6).

Mkassabov avatar Aug 14 '23 15:08 Mkassabov

Wow that's incredibly surprising (I'm using Android too). Getting debug info from the mobile app is trickier than desktop. If any of you know how to connect USB debugging and check the console it would be extremely helpful, but I'll try to dig around for clues regardless.

esm7 avatar Aug 14 '23 15:08 esm7

check the console

do you mean just using ADB logcat? or is there some way to get access to the actual webview console?

Mkassabov avatar Aug 14 '23 15:08 Mkassabov

When USB debugging is enabled on the phone, it's possible to connect to Obsidian running on the device from within Chrome at chrome://inspect#devices. From there you can inspect the mobile app (as it is based on Capacitor), control it and see its console remotely.

esm7 avatar Aug 14 '23 15:08 esm7

Getting this error:

image

Mkassabov avatar Aug 14 '23 15:08 Mkassabov

That is super helpful, thank you! It's awesome you managed to get that.

esm7 avatar Aug 14 '23 15:08 esm7

I'm guessing its something to do with the webview version being based on an outdated version of chromium (I'm on a huawei device and they have their own system webview that is based on a slightly older version).

I can play around with getting a polyfill to work tonight if you're unable to get to it / recreate it

Mkassabov avatar Aug 14 '23 15:08 Mkassabov

That's spot on. I started using structuredClone in 4.0.0 for better state management and seems like the web view in some Android releases don't have it (seems like mine does). If you manage to get it to work with a polyfill it will be awesome, since I'm in a family vacation abroad and have very limited development time :-/

esm7 avatar Aug 14 '23 15:08 esm7

I'm on LineageOS 18.1 (android 11), with Google apps installed

On Mon, Aug 14, 2023, 17:59 esm7 @.***> wrote:

That's spot on. I started using structuredClone in 4.0.0 for better state management and seems like the web view in some Android releases don't have it (seems like mine does). If you manage to get it to work with a polyfill it will be awesome, since I'm in a family vacation abroad and have very limited development time :-/

— Reply to this email directly, view it on GitHub https://github.com/esm7/obsidian-map-view/issues/192#issuecomment-1677612147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAWQPTZL7WN74G2WWKJDRLXVJDNPANCNFSM6AAAAAA3PZ3NDE . You are receiving this because you authored the thread.Message ID: @.***>

delbian avatar Aug 14 '23 16:08 delbian

I'm on LineageOS 18.1 (android 11), with Google apps installed

What matters a lot more is the version of your sytem webview not the version of your operating system. See if there is something like "Android System WebView" installed and figure out what version of that you have, also maybe try updating it to see if that helps.

Mkassabov avatar Aug 14 '23 16:08 Mkassabov

thank you all! I managed to solve it

in case you are interested:

  • In my LineageOS 18.1 WebView is version 94.0.4606.71
  • I've installed from Google Play the current Android System WebView (115.0.5790.166)
  • I have a user Work profile (I've enabled it through Shelter) so I installed Android System WebView in there as well
  • in Developer Options I changed the WebView implementation to the most recent one (I could not do this without installing it in my Work Profile as well)

On Mon, Aug 14, 2023 at 6:26 PM Michael Kassabov @.***> wrote:

I'm on LineageOS 18.1 (android 11), with Google apps installed

What matters a lot more is the version of your sytem webview not the version of your operating system. See if there is something like "Android System WebView" installed and figure out what version of that you have, also maybe try updating it to see if that helps.

— Reply to this email directly, view it on GitHub https://github.com/esm7/obsidian-map-view/issues/192#issuecomment-1677660397, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAWQPW2ZGQ3GAC2QS65KEDXVJGVBANCNFSM6AAAAAA3PZ3NDE . You are receiving this because you authored the thread.Message ID: @.***>

delbian avatar Aug 14 '23 17:08 delbian

Awesome finding! @Mkassabov are you using LineageOS or another custom ROM with an older Google Play as well? I wonder what's the scope of systems affected by not having structuredClone available, compared to how problematic it is to add a polyfill to when it is not available.

esm7 avatar Aug 14 '23 17:08 esm7

I am using Haromony OS 3.0.0 on a huawei device. They run their own system webview not googles android web view. For these devices changing the webview provider is not an option and IDK how long it would be until they update their web viewis updated. (and most likely for any other users on huawei devices). There are slightly newer versions of the webview but I don't really know of a way to update the webview short of the device receiving a system update (and IDK if they actually address this).

Im gonna try and fix it regardless since I want it to work on my device. If you think it doesn't effect enough users to warrant merging into the main project thats understandable.

Mkassabov avatar Aug 14 '23 18:08 Mkassabov

Android is so fragmented, I'm sure this affects a meaningful percentage of devices, so fixing it for everybody is extremely important IMHO.

On Mon, Aug 14, 2023, 21:30 Michael Kassabov @.***> wrote:

I am using Haromony OS 3.0.0 on a huawei device. They run their own system webview not googles android web view. For these devices changing the webview provider is not an option and IDK how long it would be until they update their web viewis updated. (and most likely for any other users on huawei devices). There are slightly newer versions of the webview but I don't really know of a way to update the webview short of the device receiving a system update (and IDK if they actually address this).

Im gonna try and fix it regardless since I want it to work on my device. If you think it doesn't effect enough users to warrant merging into the main project thats understandable.

— Reply to this email directly, view it on GitHub https://github.com/esm7/obsidian-map-view/issues/192#issuecomment-1677863659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRZ2YGO3CF5PJXGEU7AWVTXVJVF5ANCNFSM6AAAAAA3PZ3NDE . You are receiving this because you commented.Message ID: @.***>

esm7 avatar Aug 14 '23 18:08 esm7

@esm7

PR for it here: #193. Tested this and it works fine.

Mkassabov avatar Aug 15 '23 13:08 Mkassabov