FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

Yomichan doesn't load on Google Chrome #2188

Closed boopnbop closed 2 years ago

boopnbop commented 2 years ago

Description Yomichan doesn't load. On the extension bar, it shows a yellow box with 3 dots over it. By default the switch is "off", and everytime I click "on" it goes right back to "off" again. None of the other buttons do anything. I am only able to access yomichan's settings by going to "manage extension" and clicking "extension options". When I get to the settings, everything is blank and at the top there is an error stating "This page is taking longer than expected to load." I am not able to configure dictionaries, or import or export settings. Uninstalling and reinstalling yomichan didn't work, and neither did loading the extension from zip files from this github page or using developer mode. This problem is very similar to this issue, except I do not use Kiwi Browser (I don't even know what that is haha). The solution to their issue did not work for me though, and I was unable to log my issue using the debug release. When I went to "log" nothing showed up (likely because that zip file was from 2020). This only started happening when I closed and reopened Chrome, so this seems very sudden, I don't know what to do.

Browser version Google Chrome 103.0.5060.53

Yomichan version (e.g. 20.11.1.1)

Exported settings file As the title of the file shows, this is from the 18th, before this error occurred, so it likely isn't relevant but thought I'd share anyway. yomichan-settings-2022-06-18-22-52-19.txt

toasted-nutbread commented 2 years ago
  1. Open chrome://extensions/
  2. Enable Developer mode on the top right
  3. Find Yomichan's card
  4. Under Inspect views, click background.html (or click the # more... link if it's not the first one listed)
  5. Open the Console tab of the developer window that opens
  6. Check to see if any errors or other messages show up
boopnbop commented 2 years ago

An error didn't show up, but an "issue" did. image There was an "error" box on Yomichan's card, but it doesn't seem like something that would be causing this error. Idk though I'm not a developer haha image image btw the same things showed up when I downloaded it from the Chrome Web Store as when I downloaded it from GitHub

toasted-nutbread commented 2 years ago

Those issues/warnings should be harmless and wouldn't be causing the issue. When you say you downloaded it from Github, did you install the repository's source code folder? Or did you download one of the zipped builds? I can generate a debug version that you could test.

boopnbop commented 2 years ago

I downloaded yomichan-chrome-dev.zip and yomichan-chrome.zip from the 22.4.4.0 releases page When I tried loading the source code (clicking the green button, downloading the zip file, and unzipping it) into Chrome I got this error image

toasted-nutbread commented 2 years ago

You have to select the "ext" folder inside the main folder.

I've created a debug branch which includes some logging to see where the background is stalling at. Branch | Download | Diff

boopnbop commented 2 years ago

Alright, I don't know if this is what you wanted me to do, but when I clicked on background.html this time I got this: image

toasted-nutbread commented 2 years ago

That's what I wanted, thanks. Looks like it's stalling on setting up the database for some reason. I've pushed an update to that same branch with some more logs, could you download it again and update the files / reinstall? Links are the same as above.

boopnbop commented 2 years ago

Here's what I got this time: image

toasted-nutbread commented 2 years ago

Can you open the Application tab, and then under Storage on the left, expand IndexedDB and see what's under there?

boopnbop commented 2 years ago

Isn't showing anything: image

toasted-nutbread commented 2 years ago

Hmm, interesting. I've made another update, try this new one out.

boopnbop commented 2 years ago

Update in the console but still nothing in IndexedDB if that was what you were looking for image image

toasted-nutbread commented 2 years ago

Okay, I've pushed one last update with a few extra logs, but it's still not clear what's happening, or rather, why. IndexedDB is expected to be empty, so that's fine.

boopnbop commented 2 years ago

I'm praying this means something to you lmaoooo image

toasted-nutbread commented 2 years ago

Effectively what this info tells me is that Chrome is stalling opening the database, and it isn't triggering any of the events that should happen when the database is successfully opened. Have you tried restarting your browser and computer entirely? I'd suggest doing that if you haven't already, in case there's something wrong with the file system. Does your device have adequate free space also?

Following that, I'd say check the URL chrome://indexeddb-internals, search for the extension ID (ghbepcc... given your screenshot), and screenshot what it says there.

boopnbop commented 2 years ago

hmmmm I only have about 94 gigabytes on my C: drive so that could be the problem. I'll try restarting my PC when I have the time and see what happens. If that doesn't work I'll just try to free up some more storage. Thank you so much for your help! I'll get back to you if I have any more questions

toasted-nutbread commented 2 years ago

Yeah, it seems like it's an issue with Chrome. 94GB should be fine and shouldn't be crashing the database process, I'd be more worried if it was something less than 1GB.

Overall, the issue seems very similar to this issue: https://stackoverflow.com/questions/35276061/indexeddb-open-callbacks-not-called-on-chrome Which was resolved by restarting the browser.

boopnbop commented 2 years ago

Thank you so much, that worked! I tried x'ing out of my browser and opening it again a few times beforehand but I needed to do chrome://restart to get it to work. I'm importing my settings and dictionaries rn and it's working again so tysm