10ten-ja-reader icon indicating copy to clipboard operation
10ten-ja-reader copied to clipboard

Rikaichamp disappears from toolbar and stops working until it's reloaded

Open rococode opened this issue 4 years ago • 14 comments

Recently, rikaichamp has been disappearing on me. I haven't noticed it the exact moment when it disappears yet, but every once in a while I'll see that the toolbar no longer has the rikaichamp addon icon, and hovering Japanese no longer does anything.

Saw #440 mention similar issues, though for me it starts working again if I disable and then re-enable in about:addons.

This is with version 0.3.0 released Nov 25, so I guess something broke in this update as it never used to happen. It only started disappearing/crashing in the past few days.

Thanks so much for creating this great add-on, been using it for years almost every day. Let me know if there's any other info I can provide that would be helpful! Love the new pitch display feature.

Here's what I see in about:debugging when it has disappeared. It's the only add-on that looks like this, every other one has an internal UUID.

If I click Inspect I get this possibly helpful error message:

When I reload the addon after it crashes the internal uuid shows up. So I guess it's also disappearing from whatever causes the whole thing to crash.

The internal id for your convenience: 7221f174-ea3b-4aa9-987d-b28e0ee5f9f3

rococode avatar Nov 30 '20 05:11 rococode

Thank you! This is an excellent and very helpful report.

Yes, I think this is the same as #440. That said, I have no idea why the add-on would be forcefully disabled like that.

The latest version of the add-on uses slightly more memory that previous versions so perhaps it is being terminated due to memory constraints? That said, a few months ago it used even more memory still so I am surprised that this problem would show up now. (I will make it use substantially less memory in the next major release.)

That's my best guess for now. Can I ask what version of Firefox you are using and if there's any chance there's a memory issue?

The internal id for your convenience: 7221f174-ea3b-4aa9-987d-b28e0ee5f9f3

Thank you for this! Unfortunately that didn't turn up any error reports.

birtles avatar Nov 30 '20 09:11 birtles

For my reference, what do you mean by reloading the add-on? Re-installing it? Or re-starting Firefox?

birtles avatar Nov 30 '20 09:11 birtles

Posted a comment on the add-ons discourse to see if anyone has ideas: https://discourse.mozilla.org/t/is-there-any-reason-an-add-on-my-automatically-be-disabled-on-some-machines/71382

birtles avatar Nov 30 '20 09:11 birtles

Thanks for raising this issue on Discourse. Currently I'm not seeing actionable details in this report, but I'll follow comments on this bug with interest.

Rob--W avatar Nov 30 '20 17:11 Rob--W

Can I ask what version of Firefox you are using and if there's any chance there's a memory issue?

Was on 82.0.3 64-bit, just updated to 83. I don't know how memory works for add-ons but system-wide I normally have plenty of free memory to go around.

For my reference, what do you mean by reloading the add-on? Re-installing it? Or re-starting Firefox?

Toggling off and back on in about:addons

Will keep an eye on it to see if it disappears again - it's been stable for a while but I haven't hovered anything since I last reloaded it.

rococode avatar Nov 30 '20 20:11 rococode

Thanks for raising this issue on Discourse. Currently I'm not seeing actionable details in this report, but I'll follow comments on this bug with interest.

Thanks @Rob--W! Any suggestions for other useful information that would help narrow this down. So far we have at least one other user encountering this (in #440) and I'll bet there are hundreds of others experiencing it without the time or know-how to file an issue.

We know from this report that the toolbar icon disappears which seems to suggest Firefox is terminating the add-on (as opposed to the background extension process simply dying). Yet, the comment above this suggests that in about:addons it is still enabled. We also know from #440 that there are no errors shown in the browser console.

birtles avatar Dec 01 '20 01:12 birtles

Thanks so much for the extra information @rococode!

If you are able to reproduce this consistently and have some time, one other thing we could try:

  1. Open about:debugging while the add-on is still working
  2. Click Inspect next to Rikaichamp
  3. See if any errors show up in the console after Rikaichamp disappears.

birtles avatar Dec 01 '20 01:12 birtles

Haven't been able to reproduce yet (it hasn't disappeared after a full day today, though I didn't read much Japanese stuff), but I've opened the Inspect window and will keep it open in the background to report back here if it crashes again.

rococode avatar Dec 01 '20 08:12 rococode

From the problem description, it seems that the extension is present in the internal database of add-ons, but not able to start for some reason. The following information can help me with debugging this:

  1. How was the extension installed? In the normal way (via addons.mozilla.org or a xpi link) or something else (e.g. sideloaded)?
  2. Do you have any software that could be messing with your Firefox profile / directory?
  3. Does this issue happen at browser startup, or later, while using the browser?
  4. Was the extension being updated when this happened?
  5. Any relevant errors in the global browser console? Ctrl-Shift-J to open it (documented at https://developer.mozilla.org/en-US/docs/Tools/Browser_Console).
    • Copy its content, include a screenshot.
  6. Go to your profile directory (if you don't know where, the path is listed as "Profile Directory" at about:support ), and copy the following files:
    • extensions.json
    • addonStartup.json.lz4.
  7. Open the directory containing the startup cache. Its path is listed at "Disk Cache Path" (remove the last part, e.g. "startupCache.8.little"; the directory itself is called "startupCache"), and copy the following file:
    • webext.sc.lz4
  8. Copy the content of about:support

Send this to me (by mail). These files contain a list of your extensions and local file paths to Firefox files, but no sensitive personal data.

PS. If you're interested in some technical details: I am going to turn these files in human-readable files in the following ways:

  • extensions.json is plain just JSON and can be pretty-printed with one of the many tools, such as json_pp or jq.
  • webext.sc.lz4 can be read with the first three lines of the code snippet at https://bugzilla.mozilla.org/show_bug.cgi?id=1651838#c1 (change the path to the file of the .sc.lz4 file)
  • addonStartup.json.lz4 can be decompressed, e.g. with mozlz4a.py from https://gist.github.com/kaefer3000/73febe1eec898cd50ce4de1af79a332a/a266410033455d6b4af515d7a9d34f5afd35beec (and the be turned into readable JSON as before).

Rob--W avatar Dec 01 '20 17:12 Rob--W

@Rob--W Thank you so much! I've asked the reporter of #440 to answer those questions. @rococode if you have time would you be able to provide Rob with the information he requested? Thank you in advance!

birtles avatar Dec 01 '20 23:12 birtles

Rob, here is my effort to answer your questions.

  1. How was the extension installed? In the normal way (via addons.mozilla.org or a xpi link) or something else (e.g. sideloaded)?

As an add-on

  1. Do you have any software that could be messing with your Firefox profile / directory?
    

Not that I know of. I did have Firefox on Strict Tracking Protection but changing it to Standard made no difference.

  1. Does this issue happen at browser startup, or later, while using the browser?
    

Rikaichamp allows you to mouse over Japanese Kanji (Chinese characters) and it will provide HIragana reading(s) and English definitions. So the issue occurs when using the browser, since when you mouse over, nothing happens.

  1. Was the extension being updated when this happened?
    

No, but there had been a quite recent update.

  1. Any relevant errors in the global browser console? Ctrl-Shift-J to open it (documented at https://developer.mozilla.org/en-US/docs/Tools/Browser_Console).
    
      Copy its content, include a screenshot.
    

Screen shot attached, but whether relevant, don't know.

  1. Go to your profile directory (if you don't know where, the path is listed as "Profile Directory" at about:support ), and copy the following files:
     extensions.json
    
     addonStartup.json.lz4.
    
  2. Open the directory containing the startup cache. Its path is listed at "Disk Cache Path" (remove the last part, e.g. "startupCache.8.little"; the directory itself is called "startupCache"), and copy the following file: webext.sc.lz4

  3. Copy the content of about:support

I have tried to attach these files in a Zip file, but I am not sure the attaching process worked. But if you want me to mail them to you, I need your email address.

Firefox.zip

mjkarlin avatar Dec 02 '20 00:12 mjkarlin

Rob, here is my effort to answer your questions.

3. Does this issue happen at browser startup, or later, while using the browser?

Rikaichamp allows you to mouse over Japanese Kanji (Chinese characters) and it will provide HIragana reading(s) and English definitions. So the issue occurs when using the browser, since when you mouse over, nothing happens.

According to the initial bug report, the button disappeared from the toolbar. It seems that you're experiencing a different issue.

Your files show that the extension has correctly been registered in the extension databases (extensions.json + addonStartup.json.lz4). The screenshot confirms that the extension has been started at some point (it shows several error messages from the extension itself). The webext.sc.lz4 file shows that there is an attempt to start up the extension, but that the startup didn't complete, possibly due to an error or due to it being stuck somewhere.

To investigate this further, I need the full output of your browser console. Can you copy the text (Ctrl-A, Ctrl-C) and/or take multiple screenshots and send it to me?

I have tried to attach these files in a Zip file, but I am not sure the attaching process worked. But if you want me to mail them to you, I need your email address.

I retrieved the zip file. You can edit your comment and remove the link if you'd like. FYI: my e-mail is visible on my Github profile.

Rob--W avatar Dec 02 '20 10:12 Rob--W

I am sorry that I did not get back to you sooner (on a new computer, which arrived in the middle of all of this). Rikaichamp is now working and I do at least want to thank you for your efforts - I really appreciate it.

mjkarlin avatar Jan 23 '21 15:01 mjkarlin

@mjkarlin Thank you for following up on this. If you encounter this again, please let me know. For now, I will close #440 and leave this issue open.

birtles avatar Jan 25 '21 00:01 birtles