zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.13k stars 228 forks source link

Obsidian: failed to load obsidian-excalidraw-plugin | Huawei Matepad Pro (Android) #181

Closed jon5th5n closed 2 years ago

jon5th5n commented 3 years ago

Describe the bug I tried installing the excalidraw plugin on my Huawei Matepad Pro since on my PC I thought the plugin looked quite interesting but sadly when I try to enable it I get a message saying "failed to load plugin obsidian-excalidraw-plugin". I also tried finding the exact error message but failed at opening the developer console on android so this is all I have... Does somebody know of this problem and maybe how to fix it?

To Reproduce I am not really sure since on my Android Phone (with Google Services) it loads just fine, so I'm thinking it might actually be a problem with not having Google Services... Then to reproduce you would just have to try it on another device without them but I'm not certain.

Expected behavior The Excalidraw plugin to just be enabled.

Smartphone:

zsviczian commented 3 years ago

I am using Excalidraw on a Samsung Note 8/Android 9 phone. It works as expected on my phone. Since I can't reproduce the issue, I don't really have an idea how to help you.

richfan commented 3 years ago

I am using Excalidraw on a Mi9 Xiaomi /Android 10 phone. But it doesn't work.

zsviczian commented 3 years ago

hm... I'll get a hold of an Android 10 device to see if this has to do with the Android version...

zsviczian commented 3 years ago

This could be related to the Android WebView component. Could you open settings / developer options / WebView Implementation and let me know what you see there?

jon5th5n commented 3 years ago

Since I am using a Huawei Device without Google Services I run Huawei WebView instead of the Google one. Actually someone else also suspected it to be a problem with WebView and I also think that it's very likely to be the problem but after researching for a bit I could not find any articles or clues on if you could change to another WebView Implementaion without Google Services. I didn't know about the setting to set a WebView Implementation which highly suggests that another one can be used but I really have no idea how.

I would be willing to try basically everything if anyone has an idea also if it's a bit more hacky.

Thanks in advance.

zsviczian commented 3 years ago

If you install chrome browser, you will be able to set it as the WebView in the developer options/webview implementation menu.

jon5th5n commented 3 years ago

Well I just installed a Chrome APK so I now have the browser but in my setting I still only get shown the Huawei-WebView one. I also restarted the device in between. I'm not sure if this is a thing Huawei had to put in place or if I just did something wrong. Maybe there is a way to install Google WebView another way but I couldn't find one myself.

zsviczian commented 3 years ago

I don’t remember how I changed it. I don’t think this is a Huawei thing. Please google how to change WebView.

On 2021. Oct 12., Tue at 21:20, Jonathan Kappler @.***> wrote:

Well I just installed a Chrome APK so I now have the browser but in my setting I still only get shown the Huawei-WebView one. I also restarted the device in between. I'm not sure if this is a thing Huawei had to put in place or if I just did something wrong. Maybe there is a way to install Google WebView another way but I couldn't find one myself.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/181#issuecomment-941335153, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNRO6QR2F7JQ7FLQKMIXKLUGSDALANCNFSM5FPOH4SA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

montanus2019 commented 3 years ago

In my mi9 mobilephone, the webview is "Android system webview 83.0.4103.101"

jon5th5n commented 3 years ago

ok I'll try to get another WebView working for some time... I will update on this when I find something.

jon5th5n commented 3 years ago

I now tried for two days to install the Android System WebView or rather get it running but I just couldn't find anything on how to do it. It's quiet weird that I can't find anyone with the same problem or even better an answer for it. Since I couldn't even find a starting point to begin with I will for now just give up and accept the fact that it won't work on my device. Still I want to thank everyone who tried helping and if I'll ever find a fix or anything new I will update it here.

zsviczian commented 2 years ago

I think all I did was install Chrome Beta and it appeared as an alternative webview in developer options. https://play.google.com/store/apps/details?id=com.chrome.beta

F2C93661-7AD9-4F62-8F8B-36EFE8A41E69

zsviczian commented 2 years ago

I just noticed, that there was a bug at the initialization of the plugin. It might be worth trying 1.4.0 to see if it works on your Androids. I don't give it much chance, but it is worth a try. It worked previously, and still works on my Android using stock Google webview as well as Chrome Beta and Chrome webview components.

SantiPesce commented 2 years ago

I now tried for two days to install the Android System WebView or rather get it running but I just couldn't find anything on how to do it. It's quiet weird that I can't find anyone with the same problem or even better an answer for it. Since I couldn't even find a starting point to begin with I will for now just give up and accept the fact that it won't work on my device. Still I want to thank everyone who tried helping and if I'll ever find a fix or anything new I will update it here.

I had the same problem with this plugin and something similar with Templater; when I read the following comment (by zsviczian) I followed the steps and it seems that everything was fine, but then I remembered that I had not update Android System WebView a long time ago so that I did it and it worked! Now it doesn't throw the startup error and both plugins work properly.

This could be related to the Android WebView component. Could you open settings / developer options / WebView Implementation and let me know what you see there?

zsviczian commented 2 years ago

There is a small chance that I fixed this. Unfortunately, I don't have a device on which it does not work... therefore it is hard to test. I changed the target from es2020 to es2017 to match the core Excalidraw component. I think there is a chance this might resolve the issue with out-of-date WebViews.

jon5th5n commented 2 years ago

So after pretty much not thinking about this problem for the last few month I just now decided to check if there where any new updates on this and saw that you downgraded the JavaScript version to ES8. I immediatly tried reinstalling excalidraw, since it somehow didn't show the update, and... IT WORKED. I'm really happy about this and I hope downgrading hasn't brought too much work with it.

Thanks to everyone who tried to help.

subjektivdk commented 2 years ago

Just wanted to add that I can't get the plugin to load on my: Samsung Tab S6, Android 11, Google WebKit/webview Updated Obsidian, excalidraw-plugin

azmodude commented 2 years ago

Unfortunately same issue here on my Pixel 4, latest Android 12. There is no other Webview Integration showing up, so no way for me to change it (with both Chrome and Chrome Beta installed).

HoodyEz commented 2 months ago

I had this same problem with my Motorola G24. I installed the System WebView Beta, then in the developer options, I switched from System WebView to System WebView Beta. In Obsidian, I uninstalled Excalidraw and reinstalled it, which solved the problem.

https://android-system-webview-beta.uptodown.com/android