elias-sundqvist / obsidian-annotator

A plugin for reading and annotating PDFs and EPUBs in obsidian.
GNU Affero General Public License v3.0
1.44k stars 64 forks source link

Annotator broken after update to iPadOS 16.3.1 and iOS 16.3.1 (also broken when updated to 16.3) #289

Open msackeygh opened 1 year ago

msackeygh commented 1 year ago

iPadOS 6.3 and macOS 13.2 was just updated today by Apple. Since then, I have been unable to enable Annotator: can't annotate, and can't view PDFs, etc.

msackeygh commented 1 year ago

I have been able to re-enable the plugin, but it still doesn't work.

I re-enabled it by first deleting the plug in, re-installing it (which took a few moments, slower than usual) and then enabling it. However, Annotator still cannot read PDFs. When annotating, the PDF shows up as blank.

aladmit commented 1 year ago

@msackeygh do you see any errors in console? What obsidian and obsidian installer version do you use?

I updated my Mac up to 13.2 and didn't get any problems. Everything works as usual. Didn't test on iPad though.

I use obsidian 1.1.12, installer version 1.1.9

msackeygh commented 1 year ago

@msackeygh do you see any errors in console? What obsidian and obsidian installer version do you use?

I updated my Mac up to 13.2 and didn't get any problems. Everything works as usual. Didn't test on iPad though.

I use obsidian 1.1.12, installer version 1.1.9

I wish I knew how to answer your question regarding what installer version I'm using. I'm using whatever the version of Obsidian is latest in the App store for iOS and iPadOS. On the iOS, Obsidian is in version 1.4.1; plug-in for Annotator is indicated as v0.2.10

I tried Obsidian on my Mac yesterday and I seem to recall it did not have problems, but honestly I can't fully recall and will have to re-test when I get home later tonight. I was testing so much on the iPadOS I can't recall what I did on the Mac.

msackeygh commented 1 year ago

@aladmit , in checking my Mac version, I'm running Obsidian v1.1.9 and installer version 1.1.9. Annotator (v 0.2.10) is working on macOS 13.2.

However, it is not working on iPadOS 16.3 or iOS 16.3

aladmit commented 1 year ago

@msackeygh Great, at least Mac version works) I've tested on iOS 16.3 and got the same problem 😭 I guess it has something to do with WebKit changes.

I'll fix this asap, but I'm not sure how long it would take me to figure out why it happens. Best work around at the moment is to downgrade iOS to 16.2

msackeygh commented 1 year ago

@aladmit , thanks! Looking forward to the update.

aladmit commented 1 year ago

No progress yet. I see that epub and web annotation starts and only pdf reader fails. Maybe it has something to do with PDF.js that hypothesis use. Unfortunately I can't reproduce it on desktop or get any relevant errors, just guessing.

msackeygh commented 1 year ago

@aladmit, thanks for the update. Is there something on my end when using the iPad that I could forward? Is there some kind of log I can download and send?

aladmit commented 1 year ago

@msackeygh Unfortunately, obsidian on iOS has zero tools for debugging. No logs, no console, no dumps or breakpoints. So I'm just making a guess and break something to see if I'm right🤡

aladmit commented 1 year ago

Still no progress. Tried to log all exceptions to a file with onerror events on main window and readers iframe, but there is no exceptions :(

msackeygh commented 1 year ago

@aladmit, thanks for continuing to try!

j-xzy commented 1 year ago

have same problem

msackeygh commented 1 year ago

I can confirm that with the update to iOS and iPadOS 16.3.1, Annotator is still broken.

fritzcloud commented 1 year ago

Doesn't work on ipados 16.4 beta

aladmit commented 1 year ago

Unfortunately, I'm stuck and I don't know what else to try :(

@elias-sundqvist Could you have a look on this? Maybe you would see something I don't.

patrickongwong commented 1 year ago

Hi @aladmit, thanks so much for the updates on this. I'll downgrade my iOS for now. Nothing is more important in my iPad than Obsidian and the Obsidian annotator. It's such a great product and plug-in combination.

Thank you so much.

elias-sundqvist commented 1 year ago

I'd be happy to take a look, but I don't have an iOS device to test on 😕

fritzcloud commented 1 year ago

I'd be happy to take a look, but I don't have an iOS device to test on 😕

Can I help with testing on my iPad? I can't code but I want to help.

msackeygh commented 1 year ago

Unfortunately, I'm stuck and I don't know what else to try :(

@elias-sundqvist Could you have a look on this? Maybe you would see something I don't.

Thank you for trying. I keep checking back every so often to see if a fix has been made. Also, I'm not able to downgrade (and wouldn't want to for security reasons). I believe Apple has stopped signing any iOS lower than 16.3.1

VileEnd commented 1 year ago

looks like the file can't be found (maybe how its beeing referenced has been changed?) (dont really have more time atm, sry) but here the console log from the ipad; hope that helps; ( thx xcode) err404

aladmit commented 1 year ago

@VileEnd how did you get this log?

VileEnd commented 1 year ago

@VileEnd how did you get this log?

@aladmit

I used this plugin here: https://github.com/KjellConnelly/obsidian-dev-tools

And added it to my .obsidian/plugin dir Other way is to do it with xcode but that's a bigger hustle (or use xcode and use in there the plugin so you don't have to own an iPad)

aladmit commented 1 year ago

@VileEnd Thanks for helping with this! I investigated this error, but unfortunately it doesn't have anything to do with iOS problems. Hypothesis tries to download favicon, but gets 404 and returns the error. I commented favicon requests out, error went away, but problem with iOS stayed the same :(

Looks like we will struggle with this for a while. Added this as known issue to README.

aladmit commented 1 year ago

I have a new hypothesis on this. I found that there is a canceled network request. It's possible to see it on desktop too.

Hypothesis makes request to https://hypothes.is/app.html, but browser cancels it because of strict-origin-when-cross-origin.

iOS 16.3 update brought a few related security fixes: 1.Fixed Cross-Origin-Embedder-Policy incorrectly blocking scripts. https://developer.apple.com/documentation/safari-release-notes/safari-16_3-release-notes#Resolved-Issues

  1. Fixed: Check for strict-dynamic in script-src and default-src directives. https://developer.apple.com/documentation/safari-release-notes/safari-16_3-release-notes#Resolved-Issues

So. Maybe webview on iOS blocks whole iframe with plugin because of strict policy violation 🤔

Plugin creates iframe and catches in it all fetch requests to hypothes.is and replaces responses with local data. But misses this one because it goes from iframe created by hypothesis boot script >.<

@elias-sundqvist do you see a way to catch this request too? I believe you know about catching fetch requests much more than me.

fritzcloud commented 1 year ago

Getting a new error on IOS 16.4

IMG_0311

Edit: Nevermind that error, my fault. It seems to be fixed on iPadOS 16.4 beta now. Annotator works again.

aladmit commented 1 year ago

Huh, that's weird. But it would be great if problem would fix itself with 16.4 release😄

baseliners commented 1 year ago

In case this helps - I'm able to open the annotation view on my iPad (16.3) for an epub. However, the UI is messed up when I open the annotation sidebar on the iPad (see screenshot). Works fine on my Mac though.

Was thinking of converting PDF to epub for use on mobile. Maybe fixing the sidebar issue on mobile is easier?

IMG_2D99FB629A0A-1

patrickongwong commented 1 year ago

I'm confirming it works with iPadOS 16.4.

It seems the best is for everyone to just upgrade to (if Beta is acceptable) or wait to upgrade this version.

Thank you so much for the effort @aladmit @elias-sundqvist

baseliners commented 1 year ago

Thx @patrickongwong ! I installed the 16.4 Beta and can also confirm that it's working!

One thing - the resolution is quite low so when I zoom in, the text is very pixelated. I don't see the same issue on the Mac (for the same file) and also tried opening the same PDF using PDFExpert on my iPad and that also renders fine. Not sure if this is new behavior or if it's always been like this on mobile? Any way to get the full res view in Annotator?

msackeygh commented 1 year ago

Welp, iPadOS 16.4 was released today to the general public and it looks like Annotator is working again in this platform! At least this seems to be so with preliminary testing :)

maiixu commented 1 year ago

Hooray! Here to confirm that annotator does work again after updating to IPadOS 16.4.1. 🎉🎉

Welp, iPadOS 16.4 was released today to the general public and it looks like Annotator is working again in this platform! At least this seems to be so with preliminary testing :)

jfs commented 1 year ago

Don’t forget to update the README.

Pchatain commented 11 months ago

This plug in does not work as far as I can tell on IOS 16.6, iPhone 12. False alarm! I forgot to add the setting to download pdf’s from sync.

fritzcloud commented 10 months ago

It‘s also broken on iPadOS 17 stable

LuGHuaaa commented 10 months ago

Any news or updates?

jonas886 commented 9 months ago

IT WORKS !

I am in M1 and macos 14.0 (23A344)

deekayone commented 8 months ago

I have macOS 14.0 and annotator works great. I have iPadOS 16.6 and annotator does not work. Is this the current state? Or have some found a way to make iPadOS16.6 work?

891680996 commented 7 months ago

does not work on iPadOS 17.1

DrKitsune14 commented 6 months ago

does not work on iPadOS 17.1

ess-seb commented 5 months ago

Same here – iPad Pro M1 iPadOS 17.4 beta, Annotator doesn’t work :(

Jamaladinho commented 2 months ago

I guess still no solution? It is really a pitty, as not being able to use annotator on the ipad significantly decreases its usability - whilst this is overall such a great extension.

axulonash commented 1 month ago

Doesn't work on IPad Pro M1@IPadOS 17.5.1