Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vequa opened this issue Oct 6, 2021 · 16 comments
Closed

Comments

@vequa
Copy link

@vequa vequa commented Oct 6, 2021

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:

  • Device: Huawei Matepad Pro (2020)
  • OS: Android 10.x.x
  • Browser: Brave (Chromium I guess)
@zsviczian
Copy link
Owner

@zsviczian zsviczian commented Oct 10, 2021

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
Copy link

@richfan richfan commented Oct 11, 2021

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

@zsviczian
Copy link
Owner

@zsviczian zsviczian commented Oct 11, 2021

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

@zsviczian
Copy link
Owner

@zsviczian zsviczian commented Oct 12, 2021

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?

@vequa
Copy link
Author

@vequa vequa commented Oct 12, 2021

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
Copy link
Owner

@zsviczian zsviczian commented Oct 12, 2021

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

@vequa
Copy link
Author

@vequa vequa commented Oct 12, 2021

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
Copy link
Owner

@zsviczian zsviczian commented Oct 12, 2021

@montanus2019
Copy link

@montanus2019 montanus2019 commented Oct 13, 2021

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

@vequa
Copy link
Author

@vequa vequa commented Oct 13, 2021

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

@vequa
Copy link
Author

@vequa vequa commented Oct 16, 2021

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
Copy link
Owner

@zsviczian zsviczian commented Oct 23, 2021

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
Copy link
Owner

@zsviczian zsviczian commented Oct 25, 2021

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
Copy link

@SantiPesce SantiPesce commented Oct 31, 2021

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
Copy link
Owner

@zsviczian zsviczian commented Dec 11, 2021

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.

@vequa
Copy link
Author

@vequa vequa commented Jan 4, 2022

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.

@vequa vequa closed this Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants