eyalroz / bidimailui

BiDi Mail UI: Thunderbird extension for improved right-to-left language support
https://addons.thunderbird.net/en-US/thunderbird/addon/bidi-mail-ui/
Other
19 stars 2 forks source link

Attempt to call promptAndSetPreferredCharset, which doesn't exist #51

Closed Ronginat closed 3 years ago

Ronginat commented 3 years ago

Hi eyal, My bidi add-on has recently (few days) got updated to the latest version - 0.12 Unfortunately, the default RTL part of this add-on hasn't worked since :( I still have the direction buttons of course, but the initial direction is always LTR no matter what I do.

I had thunderbird 78.14.0 but thought maybe updating the software will help. So now I have the latest version, 91.1.2 - same problem.

I didn't have a mozilla account but do have github's, hence this issue and not a review in the add-on's site

eyalroz commented 3 years ago

Well, a bug report is not a review, so here is the right place to report this.

What exactly is not working for you? Message composition? Direction autodetection? Character set mis-detection correction? Please be more specific.

Also, if you see any error messages related to the extension in TB's Error Console, please post a copy of those here.

Ronginat commented 3 years ago

Tried to compose a new message and the default direction is LTR (the content's language is hebrew...) - even though the add-on's configured direction is RTL.

About TB's error console - probably should've led with that: image

Also copied the log's text ```TypeError: BiDiMailUI.MessageOverlay.promptAndSetPreferredCharset is not a function bidimailui-display-logic.js:19:41 charsetMisdetectionCorrection chrome://bidimailui/content/bidimailui-display-logic.js:19 onLoad chrome://bidimailui/content/bidimailui-messenger.js:128 TypeError: BiDiMailUI.MessageOverlay.promptAndSetPreferredCharset is not a function bidimailui-display-logic.js:19:41 charsetMisdetectionCorrection chrome://bidimailui/content/bidimailui-display-logic.js:19 onLoad chrome://bidimailui/content/bidimailui-messenger.js:116 TypeError: BiDiMailUI.MessageOverlay.promptAndSetPreferredCharset is not a function bidimailui-display-logic.js:19:41 charsetMisdetectionCorrection chrome://bidimailui/content/bidimailui-display-logic.js:19 onEverythingLoadedAndReady chrome://bidimailui/content/bidimailui-composer.js:575 NotifyComposeBodyReady chrome://bidimailui/content/bidimailui-composer.js:626 InitEditor chrome://messenger/content/messengercompose/MsgComposeCommands.js:7531 observe chrome://messenger/content/messengercompose/MsgComposeCommands.js:3349 1633117920903 addons.update-checker WARN onUpdateCheckComplete failed to parse update manifest: [Exception... "Update manifest is missing a required addons property." nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/addons/AddonUpdateChecker.jsm :: getRequiredProperty :: line 156" data: no] Stack trace: getRequiredProperty()@resource://gre/modules/addons/AddonUpdateChecker.jsm:156 parseJSONManifest()@resource://gre/modules/addons/AddonUpdateChecker.jsm:172 onLoad()@resource://gre/modules/addons/AddonUpdateChecker.jsm:359 UpdateParser/<()@resource://gre/modules/addons/AddonUpdateChecker.jsm:299 ```

​The above snapshot was taken from thunderbird v62.12.1 and bidi v0.12 after opening a new message window (using the 'write' button).
This was from a different computer (hence the older thunderbird version) that had v0.11rc1 installed - so I checked and it was working. Only after updating bidi to its latest version, the issue began.

eyalroz commented 3 years ago

Please try the build I'm attaching here. You'll need to unzip the XPI file, then install it using the gear-wheel menu-button in Thunderbird's add-on dialog.

If things seem to work for you, try playing with the different settings, composing and reading a few messages etc. If something fails - tell me what failed, and copy the Error Console text.

bidimailui_0.12.1b1_tbird.xpi.zip

Ronginat commented 3 years ago

Tried replying to and composing a few messages with the new fix - still the default direction is always LTR, got a different error now:

image

I'll say that the above error occur even when the "Left to Right" option is selected...

eyalroz commented 3 years ago

And this is with TB 91.1.2 ? What's your locale? Also, do you have any other extensions installed?

Also, try this: bidimailui_0.12.1b2_tbird.xpi.zip

Ronginat commented 3 years ago

No, that was with v68.12.1

I'll now try v91.1.2

eyalroz commented 3 years ago

Let's first make sure it works with 91.1.2, then I'll check 68.12.1.

Ronginat commented 3 years ago

I get the same error in v91.1.2 for both v0.12.1b1 and b2.

I have lightning extension installed

Ronginat commented 3 years ago

So, restarted the program a few times, disabled the lightning extension and now it's working!

Got one error log from a `Prompter` component Prompter: internal dialogs not available in this context. Falling back to window prompt. Prompter.jsm:1084 set modalType resource://gre/modules/Prompter.jsm:1084 ModalPrompter resource://gre/modules/Prompter.jsm:1040 pickPrompter resource://gre/modules/Prompter.jsm:44 confirmEx resource://gre/modules/Prompter.jsm:304 ComposeCanClose chrome://messenger/content/messengercompose/MsgComposeCommands.js:6189 chrome://messenger/content/messengercompose/MsgComposeCommands.js:217

That happens after choosing a charset (that I did once) and after closing (discarding) a message window with the 'discard changes' prompt. Don't think it's relevant to your add-on though.

eyalroz commented 3 years ago

@Ronginat : Which version is "it"? The b2 I posted? Also, does it work with both v68 and v91 ? And is the error console completely empty of bidiui-related entries?

Sorry for "grilling" you like this, but since I don't have your exact setup I can't reproduce most of what you're describing.

Ronginat commented 3 years ago

I don't exactly know. I upgraded my v68 to v91 and both of your betas didn't work for me.
Now, after removing the 'lightning' extension (which I cannot seem to reinstall anymore) they're both working.

eyalroz commented 3 years ago

@Ronginat : Lightining was integrated into Thunderbird at some point (in v78 maybe? I forget) - and you shouldn't even be able to install it :-(

But, ok. I'll soon make this a pre-release.

Ronginat commented 3 years ago

Well, I had it on my v68 thunderbird, which I installed at home and never use. Only opened it because you wanted more details and it is a weekend ✌️

Thank you for the super fast responses!