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

Annotator 0.2.2 fails to load on iPad #176

Closed
bobcat-hubcap opened this issue May 23, 2022 · 15 comments
Closed

Annotator 0.2.2 fails to load on iPad #176

bobcat-hubcap opened this issue May 23, 2022 · 15 comments
Labels
bug Something isn't working

Comments

@bobcat-hubcap
Copy link

bobcat-hubcap commented May 23, 2022

Using Obsidian 1.2.0(50) API v0.14.2 on iPad Pro running iOS 15.5 receive message "Failed to load plugin obsidian annotator'". Cannot toggle "enable" switch to ON position. Have uninstalled/re-installed plugin and have of course closed and re-started Obsidian all to no avail.

Many thanks.

Best,

Richard

@aladmit aladmit added the bug Something isn't working label May 24, 2022
@aladmit
Copy link
Collaborator

aladmit commented May 24, 2022

Tested this on iPad, got the same behaviour. Plugin installs/updates normally, but doesn't start.

@aladmit
Copy link
Collaborator

aladmit commented May 24, 2022

@bobcat-hubcap Looks like this problem exists since 0.2.1, so the only advice I can give at the moment is to manually install 0.1.9 or 0.2.0 :(

@aladmit
Copy link
Collaborator

aladmit commented May 24, 2022

@elias-sundqvist FYI. I guess that adding node-fetch caused that. Because it tries to use node's modules like http, fs, etc. but obsidian on mobile doesn't have nodejs at all. Only browser api available.

@elias-sundqvist
Copy link
Owner

@elias-sundqvist FYI. I guess that adding node-fetch caused that. Because it tries to use node's modules like http, fs, etc. but obsidian on mobile doesn't have nodejs at all. Only browser api available.

That sounds strange. 2.2 seems to work fine on Android, and I would expect the same issue to show up there if node modules were required.

Node-fetch takes a custom function for requiring packages.

https://github.com/elias-sundqvist/obsidian-annotator/blob/master/src/node-fetch.tsx#L5-L16

It is used here https://github.com/elias-sundqvist/obsidian-annotator/blob/master/src/corsFetch.tsx#L1-L23

Basically, these node modules should only be imported if they can be, otherwise node-fetch shouldn't be used. Not sure why it doesn't work as expected on ipad.

@aladmit
Copy link
Collaborator

aladmit commented May 24, 2022

I removed node-fetch and plugin started after that on ipad ¯_(ツ)_/¯ Everything works on PC without node-fetch, but on iPad PDF/Epub readers can't render files 😫

0.2.0(release before node-fetch) starts fine, epub reader works, but pdf reader doesn't show annotations. At least on my files.
0.1.9 PDF shows, but annotator doesn't start at all. Epub reader works fine.

Well, looks like iOS has its own magic going on.

@bobcat-hubcap
Copy link
Author

Annotator broke in 15.4 as well which is why I updated to 15.5. However, Annotator used to work in 15.4. If I recall, as lately as 2.1. Was all good on Saturday evening (-6 UTC) and then without being used all day Sunday, would not load.

Dunno how to manually revert versions on iPad as there's no view of file system... Seems as though am stuck on the laptop for a bit unless there's some workaround that I could do...

Many thanks.

Richard

@bobcat-hubcap
Copy link
Author

Manually installed 0.1.9 on my iPad by reverting to it on my laptop and synching. Was unable to enable the plugin on the iPad (same behavior - move toggle and it moves back and displays message). This is odd as I certainly was able to use 0.1.9 for a number of months. Does this point to Apple voodoo as noted above?

@aladmit
Copy link
Collaborator

aladmit commented May 27, 2022

Dunno how to manually revert versions on iPad

Looks like you can't downgrade ipad lower than 15.5 anymore :(

Does this point to Apple voodoo as noted above?

No, I think in it's something else, because 0.1.9 starts successfully on my ipad with iPadOS 15.5. Did u restart obsidian after downgrading the plugin? Obsidian applies plugin changes only after reopening vault or full restart.

@bobcat-hubcap
Copy link
Author

Thanks.

These are instructions for anyone experiencing the bug described above. This will allow you to get back to work using an earlier version of the Annotator Plug-in. Closed Obsidian on my iPad. Downloaded v. 1.9 and dropped it in my plug-ins folder in the desktop instance of Obsidian. Left the existing .css file there as 1.9 doesn't come with one. Closed Obsidian and re-started it. Opened Obsidian on iPad and enabled Annotator Plug-in v.1.9. Pdfs now display and are fully functional.

@Jopp-gh
Copy link

Jopp-gh commented Jun 21, 2022

On Android 12 and Obsidian 1.2.2, api 0.14.15
I'm unable to install Annotator 0.2.2.
And after a manual installation, I'm unable to activate this plugin

@Avocation
Copy link

Is there a resolution to this problem so I can use Annotator on the iPad or a workaround that is available please?

@aladmit
Copy link
Collaborator

aladmit commented Jul 16, 2022

@Avocation The issue isn't fixed yet, current workaround is to manually install obsidian-annotator v1.9 as bobcat-hubcap described. You can download version 1.9 right here

@aladmit
Copy link
Collaborator

aladmit commented Jul 23, 2022

Hello everyone! I just published 0.2.4 version with fix to the issue. I tested this on iPadOS 15.6, worked fine

@aladmit aladmit closed this as completed Jul 23, 2022
@Avocation
Copy link

On iPadOS 15.6 on M1 iPad Pro and Annotator plugin v0.2.4 - still get failure to load plugin when I try and switch Annotator plugin on…?

@Avocation
Copy link

Deleted the plugin, re-installed and now all working - thanks @aladmit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants