yomichan icon indicating copy to clipboard operation
yomichan copied to clipboard

Google Docs HTML Render appears broken

Open Mageinta opened this issue 2 years ago • 17 comments

It's March 25th rn and it was working fine, I think yesterday but March 23rd for sure. I've done some poking around and idk, seems like Google may have decided to change some render rules and stuff. Opening in console an error appears to be thrown where it wants a "trusted" data structure. Anyway, I'm sure you knew it but I wanted to put it up here anyway. So now you cannot Yomichan scan google docs. Really tragic, gonna set my project back until it's fixed. Love the work, cheers.

Mageinta avatar Mar 25 '22 11:03 Mageinta

Can you screenshot the error you're seeing?

toasted-nutbread avatar Mar 25 '22 23:03 toasted-nutbread

image

Mageinta avatar Mar 25 '22 23:03 Mageinta

What web browser are you using? Do you have any addons?

toasted-nutbread avatar Mar 25 '22 23:03 toasted-nutbread

I use Chrome and I've got a few addons. image image The reason I started poking around is because Dark Mode also ceased working and removing it didn't fix the issue

Mageinta avatar Mar 26 '22 00:03 Mageinta

The error is probably unrelated to why GDocs is no longer working, as I don't get the error in my testing. However, GDocs still does not work, so I assume Google is removing the HTML rendering fallback.

See also: https://github.com/melink14/rikaikun/issues/881 https://github.com/birchill/10ten-ja-reader/issues/782 https://github.com/Amaimersion/google-docs-utils/issues/10 https://github.com/OpenSchooling/AccentPress/issues/29

toasted-nutbread avatar Mar 26 '22 16:03 toasted-nutbread

@FooSoft Maybe this is something worth looking into, just to see what they say, but Google provides a form that can be filled out to indicate that the canvas changes negatively affect extensions.

https://workspaceupdates.googleblog.com/2021/05/Google-Docs-Canvas-Based-Rendering-Update.html

If your company has developed a private Chrome Extension that you believe will be impacted and you are unable to migrate to the Google Workspace Add-ons framework, you can submit this form to provide feedback and notify our team.

Granted this document is pretty old, so who knows if they're still monitoring it.

I've previously looked into their recommendation of migrating extensions to the Google Workspace Add-ons framework, but not only is that not viable for Yomichan as a whole, it's also not even clear if they have the APIs that Yomichan would need, i.e. text detection under cursor.

toasted-nutbread avatar Mar 26 '22 16:03 toasted-nutbread

Yeah, doubt they care at this point, but I'll give it a try.

FooSoft avatar Mar 27 '22 15:03 FooSoft

I don't have high hopes either, I'd just be curious what they give as a reply, if anything. And it at least gives the peace of mind that "we tried" ¯\_(ツ)_/¯.

This certainly won't be the last time that Google does its best to break functionality that Yomichan depends on *ᶜᵒᵘᵍʰ* ᵐᵛ³ *ᶜᵒᵘᵍʰ*

toasted-nutbread avatar Mar 27 '22 19:03 toasted-nutbread

Random comment since I happened across this issue: I believe the annotated canvas fall back is planned to be supported for the forseeable future so getting whitelisted for that adding a bit of code to support the canvas annotations is a possibility. (done in 10ten and rikaikun)

melink14 avatar Apr 04 '22 05:04 melink14

I can help with the annotated canvas whitelisting and API. Please let me know if this would be useful.

While the extension with ID ogmnaimimemjmbakcfefmnahgdfhfami is already whitelisted, there may be some additional steps that need to be taken.

pkch avatar Jul 03 '22 12:07 pkch

Hello, I wanted to share my "alternative" since I didn't find any solutions to this issue. I basically just migrated from google docs to cryptpad, which it's also a free self hosted text editor. Yomichan works, also the site loads documents way faster than google docs so it's better for me. It's actually a bit broken if you use it a bit you'll get what I mean, however blocking some UI elements can produce a very minimalistic online text editor without annoying bugs. Mine looks like this:

https://i.imgur.com/ENNKie8.jpg

It's perfect for my purpose which is to just write random words to review later, I don't need any of the buttons like "chat" and others that just clutter the UI. I used ublock origin with these filters:

! 2022-07-18 https://sandbox.cryptpad.info sandbox.cryptpad.info##.cp-toolbar-userlist-drawer sandbox.cryptpad.info##.cp-toolbar-notification sandbox.cryptpad.info###cp-app-pad-comments > .btn-default.btn.cp-pad-show sandbox.cryptpad.info##.cp-comment-bubble sandbox.cryptpad.info##.fa-expand.fa.cp-pad-show.btn-default.btn sandbox.cryptpad.info###cp-app-pad-toc > .cp-pad-show.btn-default.btn sandbox.cryptpad.info###cp-toolbar-userlist-drawer-open > .cp-toolbar-button-active

lordcat64 avatar Jul 18 '22 00:07 lordcat64

Is there any way for yomichan to function on google docs anymore, now or in the future? I think the html fallback has been gone for sometime. (or at least i haven't been able to use it for a couple months now)

Latrolage avatar Sep 07 '22 09:09 Latrolage

@pkch This is late since I probably briefly looked at this thread a while back but then forgot about it.

I just now got around to implementing a new fix for Google Docs, which is in #2235, but if you have other useful information about this topic, please feel free to share! I've seen myself and some other extension developers struggle with dealing with what the proper approach is, since there doesn't seem to be much in the way of documentation on this subject.

toasted-nutbread avatar Sep 24 '22 22:09 toasted-nutbread

Hi @toasted-nutbread, thanks for the work you've done.

Unfortunately, as of today, with the latest version of Yomichan, I'm still unable to pick up words from a Google Docs document :(

My config is the following:

Extension version: Yomichan 22.9.9.2
Platform: Windows
Browser: Firefox
Language: en-US
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
AnkiConnect version: 6
Installed dictionaries: Innocent Corpus, KireiCake, JMdict (English), JMnedict, KANJIDIC (English)

to-ny avatar Oct 03 '22 06:10 to-ny

Do you have the Enable Google Docs compatibility mode option enabled on the settings page?

toasted-nutbread avatar Oct 03 '22 22:10 toasted-nutbread

Hi @toasted-nutbread, no indeed, I didn't have the option enabled. Now that I do, it works. I'm sorry for the false alarm, somehow I didn't see this information. Thanks!

to-ny avatar Oct 04 '22 06:10 to-ny

No worries, I'll probably default the option to "enabled" at some point also.

toasted-nutbread avatar Oct 04 '22 22:10 toasted-nutbread