dreadnaut / bordercolors-d

A Thunderbird add-on to color-code the compose window based on the selected identity.
GNU General Public License v3.0
18 stars 4 forks source link

No identities listed in the add-on options #18

Closed dougsmucker closed 3 years ago

dougsmucker commented 3 years ago

Windows 10 (64-bit) Thunderbird 68.6.0 (32-bit) 78.6.0 (32-bit)

I just installed this add-on and I cannot assign colors by identity. The box labeled "Assogn colors to your identities" is about 1 line high and is empty.

What am I doing wrong?

Thanks, Doug

dreadnaut commented 3 years ago

Hello Doug! I don't think you are doing anything wrong, but I don't know what might be causing this issue 🙁

Useful information to have:

I would suggest opening the error console, clearing it with the "bin" button in the top left, then opening the add-on options to see if anything new pops up.

dougsmucker commented 3 years ago

Thanks for the quick reply, and the detailed info gathering instructions.

I have 2 other extensions installed: Identity Chooser (disabling it has no effect) Manually sort folders

1) Yes.

2) 20.12.1

3) 2

4) yes

malformed URI sequence ext-mail.js:1473 TypeError: prin.URI is null ConduitsParent.jsm:123:58 Error: Unknown sender or wrong actor for recvCreateProxyContext ConduitsParent.jsm:321:13 Uncaught (in promise) Error: An unexpected error occurred undefined

Doug

dougsmucker commented 3 years ago

Major typo - I am Tbird 78.6.0

SORRY!

dreadnaut commented 3 years ago

Major typo - I am Tbird 78.6.0

Haha, no problem! That's actually better, as it would be more complex to fix the old version.

I get these two lines myself

TypeError: prin.URI is null | ConduitsParent.jsm:123:58
Error: Unknown sender or wrong actor for recvCreateProxyContext | ConduitsParent.jsm:321:13

but I see the list of identities, so the useful line is likely to be the last one

 Uncaught (in promise) Error: An unexpected error occurred undefined

I suppose "undefined" appears where the filename would be? Or is there anything you can click at the end of the line to find where the error happened?

dougsmucker commented 3 years ago

I don't see anything. I also turned on CSS, XHR and Requests.

I tried Debug-Add-ons: on the console tab I have: Uncaught (in promise) Error: An unexpected error occurred undefined Some cookies are misusing the recommended “sameSite“ attribute 4 Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). 5 panel.js:78:24 Webconsole context has changed Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). panel.js:78:24

Doug

dougsmucker commented 3 years ago

I think the last post is a red herring. I closed the add-on manger tab and got back to the bordercolor-d screen. I then cleared both console and opened the BC-D options.

I only got the original messages, NOT the additional messages I just posted.

dreadnaut commented 3 years ago

I have prepared a debug version of the add-on, that will log more information. Could you give it a try?

  1. uninstall your current version
  2. open the error console and clear it
  3. install the debug version - drag and drop on the add-ons tab should work
  4. visit the add-on options
dougsmucker commented 3 years ago

BorderColors-D: Rendering options, identities options.js:68:11 BorderColors-D: listing identities identities.js:8:13 BorderColors-D: Rendering options, styles options.js:77:11 BorderColors-D: Rendering style all-sides options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style top-and-bottom options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style top options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style left-side-gradient options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style background-top-right-gradient options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style background-four-corners-gradient options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style background-bottom-gradient options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering style background options.js:34:11 BorderColors-D: reading 'highlightStyle' settings.js:86:13 BorderColors-D: Rendering options, sizes options.js:86:11 BorderColors-D: Rendering size small options.js:51:11 BorderColors-D: reading 'highlightSize' settings.js:86:13 BorderColors-D: Rendering size medium options.js:51:11 BorderColors-D: reading 'highlightSize' settings.js:86:13 BorderColors-D: Rendering size large options.js:51:11 BorderColors-D: reading 'highlightSize' settings.js:86:13 malformed URI sequence ext-mail.js:1473 TypeError: prin.URI is null ConduitsParent.jsm:123:58 Error: Unknown sender or wrong actor for recvCreateProxyContext ConduitsParent.jsm:321:13 Uncaught (in promise) Error: An unexpected error occurred undefined

dougsmucker commented 3 years ago

sorry - i thought I posted the console log 3 days ago.

dreadnaut commented 3 years ago

Whops, I forgot about this 🤦 The logs lines are not very helpful, it only tells me that rendering the options works, but not the identities. I'll put aside some time this weekend to come up with better logging, and add a few safety checks.

Apologies for leaving you waiting!

dougsmucker commented 3 years ago

It would be a really nice addon - IF it worked properly. It is still broken.

dreadnaut commented 3 years ago

Argh. I've had a look in the past weeks, but I don't really know how to debug this issue 🙁 I can't see the reason why the API fails to return your identities.

I've prepared another debug build, could you give it a try? Here's the release, and you can also see the changes.

This should show your accounts and identities in the error console. It replaces addresses with "xxxxxx", but double check that there's no personal information when you copy-paste.

dougsmucker commented 3 years ago

I installed the new debug version. I went to BorderColors D and clicked the options. No identity info listed. Here is the Error Console:

Hello there, I'm BorderColors-D! background.js:10:9 This is the first time BorderColors-D starts, look for legacy settings background.js:15:11 BorderColors-D: listing identities identities.js:8:13 malformed URI sequence 2 ext-mail.js:1477 Uncaught (in promise) Error: An unexpected error occurred undefined Uncaught (in promise) Error: An unexpected error occurred undefined malformed URI sequence ext-mail.js:1477 malformed URI sequence ext-mail.js:1477 TypeError: prin.URI is null ConduitsParent.jsm:123:58 Error: Unknown sender or wrong actor for recvCreateProxyContext ConduitsParent.jsm:321:13 Uncaught (in promise) Error: An unexpected error occurred undefined Uncaught (in promise) Error: An unexpected error occurred undefined

dougsmucker commented 3 years ago

I then went to reply to an email. The Error console added the following 2 lines: New compose tab 12 with identity id1 styleswitcher.js:31:15 Applying new border style for identity id1 to tab 12

Tbird=78.10.0(32-bit) Extensions = BorderColors D, Identity Chooser, Manually sort folders

dreadnaut commented 3 years ago

Thank you, I think those messages give us a direction: ext-mail.js, line 1477 in the Thunderbird code tries to convert folder names:

/**
 * Convert a folder URI to a human-friendly path.
 * @return {String}
 */
function folderURIToPath(uri) {
  let path = Services.io.newURI(uri).filePath;
  return path
    .split("/")
    .map(decodeURIComponent)
    .join("/");
}

And that seems to fail when the add-on asks for information about your accounts. Do you have any oddly named folders, or anything unusual in the structure?

At this point I would say that the problem is with Thunderbird, and not with the add-on. I'm still interested in getting to the bottom of this, so that we can find a workaround for you, and have the issue fixed in Thunderbird!

dreadnaut commented 3 years ago

You got it, I think! The problem seems to be the folder called %Save. I tried to create a folder called %Test on my profile, and got the same "malformed URI sequence" error.

I would suggest these steps:

If that solves the issue with BorderColors, then:

[edit: feel free to remove the screenshot above if you prefer!]

dougsmucker commented 3 years ago

Thank you so very much. That fixed everything. Is it a TBird bug? I don't recalll anything saying I couldn't have a % - I think I did it to affect the sort order for a while when Manually sort folders was broken.

I have renamed %Save to Save, installed the production version of BorderColors D, set up my account options, deleted my post with the screen shot, and all is well.

Again thanks for creating this extension and debugging my (or Tbird's) error.

dreadnaut commented 3 years ago

Great to hear your issue it's solved. Yes, it's possibly a Thunderbird bug, or something to do with Gmail/IMAP folders. Adding a % in a local folder works fine 🤷‍♀️

[edit] Bug opened with TB: https://bugzilla.mozilla.org/show_bug.cgi?id=1707408