Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Exchange address books not shown in Directory/Contact panes #209

Closed
daoane opened this issue Oct 31, 2018 · 11 comments
Closed

Exchange address books not shown in Directory/Contact panes #209

daoane opened this issue Oct 31, 2018 · 11 comments
Assignees

Comments

@daoane
Copy link

daoane commented Oct 31, 2018

Exchange Calendar 5.0.0-alpha1
Thunderbird 60.2.1
(Ubuntu Linux 18.04LTS)

"Add exchange contact folder" seems to work for both hosted exchange and Office365 (folders discovered after "save" in first dialogue), but neither the added address books nor the addresses are shown in the Directory and Contact panes. However, it seems that the global address list of the hosted exchange account is working properly when composing an email.

@benken-parasoft
Copy link

benken-parasoft commented Nov 6, 2018

I see the same behavior in 5.0.0-alpha1 with Thunderbird 60.3.0 on Windows 10. The Directory pane in the Address Book dialog doesn't show the address book after being added. I thought my address book really wasn't added but then I noticed email address successfully auto completing from the GAL when composing email.

@Trim
Copy link
Member

Trim commented Nov 27, 2018

Hello,

Same for me with 5.0.0-alpha2 (of this week) and Thunderbird 60.3.1 on Windows 10 18.09 (Lightning 6.2.3.1).

I've checked in "about:options" and the address book seems well configured.

So, we are certainly just facing a display issue.

@Trim Trim self-assigned this Nov 27, 2018
@Trim
Copy link
Member

Trim commented Nov 28, 2018

Well, I think we have an issue with the interface implementation inside addressbook/interface/exchangeAbRootDirectory/exchangeAbRootDirectory.js.

I've found these two documentations, I'll need to first read:

@Trim
Copy link
Member

Trim commented Dec 1, 2018

Well, it seems that our implementation of /home/adrien/code/exchangecalendar/addressbook/interface/exchangeAbDirFactory is not loaded with the extension.

Indeed, in my console, I find no occurrence of exchangeAbDirFactory text which is used by our logging engine. Furhtermore the devlopper tools doesn't find the exchangeAbDirFactory.js in the debugger.

Unfortunately, I don't find why and I'm even not able to update the .idl (Debian removed thunderbird-devel package which had the tool to update idls...).

@advancingu
Copy link
Member

Hi @Trim, thanks for looking into all these issues!
I had trouble building .idl files too when I changed the logging mechanism. In the end I figured it out and added it to the documentation here.

@Trim
Copy link
Member

Trim commented Dec 2, 2018

Thanks, I didn't find the page to download the SDK before.

Now, I was able to update the sdk with this command:

FILE=/home/adrien/code/exchangecalendar/addressbook/interface/exchangeAbDirFactory/exchangeAbDirFactory
# comm-central comes from "hg clone https://hg.mozilla.org/comm-central
python ~/build/xulrunner-sdk/sdk/bin/typelib.py -I ~/code/comm-central/mailnews/addrbook/public -o $FILE.xpt $FILE.idl

Unfortunately that hadn't help and, currently, I have no other clue to fix this issue :/

Maybe the future of this addon should be either TbSync plug-in or WebExtensions.
I've seen this weekend, that the Thunderbird team is working on Web Extension API for mail and calendar.

@kewisch
Copy link

kewisch commented Dec 2, 2018

If at all possible, I'd suggest avoiding to build .xpt files. It would be better to just use raw js objects in js code, and only interface to xpcom when absolutely necessary. Use of WebExtension APIs is the future though, see also https://thunderbird-webextensions.readthedocs.io/en/latest/addressBooks.html

@advancingu
Copy link
Member

@Trim What do you mean by "that [didn't] help"? Do you not see your class modifications in the debugger? For example, after I compiled this change I was able to see these new methods wherever a mivFunctions instance was referenced.

@rdegelo
Copy link

rdegelo commented Dec 4, 2018

I've tried to add multiple times which created multiple entries in "about:options". Is it safe to just delete everything that starts with "extensions.exchangecontacts@"?

@Trim
Copy link
Member

Trim commented Dec 5, 2018

Well, I found the issue: for address books, Exchange Calendar defines it's own directory type.
This type is similar to LDAP directories except that the scheme in the URI is exchWebService-contactRoot-directory (so, we use URIs like exchWebService-contactRoot-directory://).

I've found that, if I use scheme like exchangecontacts everything works well.
So, I've checked the [RFC 3986] and especially its chapter about Scheme. The standard says clearly that the canonical form of scheme should be lower case and we should create new scheme with lowercase:

Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus
("+"), period ("."), or hyphen ("-"). Although schemes are case-
insensitive, the canonical form is lowercase and documents that
specify schemes must do so with lowercase letters. An implementation
should accept uppercase letters as equivalent to lowercase in scheme
names (e.g., allow "HTTP" as well as "http") for the sake of
robustness but should only produce lowercase scheme names for
consistency.

 scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

Then, I tried to replace exchWebService-contactRoot-directory by exchwebservice-contactroot-directory and everything worked smoothly :)

Although, this scheme seems very complicated, maybe I should take opportunity to use a simpler scheme name like exchangecalendar-addressbook ?

PS: I thought about this idea, as I was reading Thunderbird report 1482720 which seems not really related...

@advancingu
Copy link
Member

Fix merged into v5.0.0-alpha3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants