unfortunatly, recently with TB 3.0.X I encounter problem using that featrure
cf
https://developer.mozilla.org/index.php?title=en/MCD%2C_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird
Although I did recompiled thunderbird-3.0-2.3.beta2.fc11.src.rpm with
--enable-extensions=pref and +MOZ_LDAP_XPCOM=1 I now get the following
error message while starting thunderbird with an all.js file calling a
thunderbird.cfg file that eventuallaly lockprefs with ldap retrieved
value for usernane and mail adress (uid,cn,mail).
here's the error message:
Netscape.cfg/AutoConfig failed. Please contact your system administrator.
Error: getLDAPAttibutes failed: [Exception... "Component returned failure
code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsILDAPURL.spec]" nsresult:
"0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame ::
file:////usr/lib/thunderbird-3.0b2/defaults/autoconfig/prefcalls.js ::
getLDAPAttributes :: line 174" data: no]
that used to work in previous versions ,
anyone else using that feature (autoconfig),
any advice on this error message ?
Regards .
My suspicion is that it may actually make sense to move the autoconfig
code to an extension rather than continuing to keep it in core, but
there's probably some discussion that needs to happen around that.
Thanks,
Dan
thanks.
All of the xpcom wrapper code now lives under comm-central:
http://mxr.mozilla.org/comm-central/source/directory/xpcom/
Regarding the error you're getting with nsLDAPURL, the code was changed
in this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=419595
You probably want to change the code here:
http://mxr.mozilla.org/comm-central/source/mozilla/extensions/pref/autoconfig/src/prefcalls.js#172
in a similar manner to the patch we did here:
https://bug479438.bugzilla.mozilla.org/attachment.cgi?id=363307 on bug
479438.
>>> Although I did recompiled thunderbird-3.0-2.3.beta2.fc11.src.rpm with
>>> --enable-extensions=pref and +MOZ_LDAP_XPCOM=1 I now get the
>>> following error message while starting thunderbird with an all.js
>>> file calling a thunderbird.cfg file that eventuallaly lockprefs with
>>> ldap retrieved value for usernane and mail adress (uid,cn,mail).
>> I'd suggest that the best way to get things back on track is to pull
>> Tb3 source from comm-central (see
>> <https://developer.mozilla.org/en/Comm-central_source_code_(Mercurial)>)
>> and build from there, rather than starting with the Fedora-packaged
>> version. Then, assuming things are still broken, which I suspect they
>> will be, filing a bug in Bugzilla would be great. If you can figure
>> out a patch to fix it, even better. Please CC dm...@mozilla.org on the
>> bug.
> OK, I am starting to retrieve "Mercurial" source code, but as I am not
> used to play with that tool I wonder If I am taking the righ way ...
> I started a note/debug on this subject at my doc page:
> https://developer.mozilla.org/index.php?title=en/MCD%2C_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird.c2.a0Comm-central_source_code_(Mercurial)
You don't need to pull mozilla-central and comm-central as independent
items.
Just follow the comm-central source code page that Dan referenced and
you'll end up with this:
hg clone http://hg.mozilla.org/comm-central/ commsrc
python client.py checkout
That will give you the comm-central source code in commsrc with the
mozilla-1.9.1 in commsrc/mozilla. That is the current version of the
Thunderbird 3 source code. You are also able to build SeaMonkey and
Firefox from those repositories.
>> My suspicion is that it may actually make sense to move the autoconfig
>> code to an extension rather than continuing to keep it in core, but
>> there's probably some discussion that needs to happen around that.
>>
> Indeed, any roadmap on that ? I suspect that I if I want autoconfig to
> run within 1 or 2 mounth, I'll have to build my own packages !? or
> worst, downgrade to Thunderbird 2.X ...
> by the way, in that worst case, from which version all these major
> changes (mercurial, autoconfig and nsLDAPURL code) happened ?
These have been ongoing changes. I suggest we just get you up and
running with the latest as it shouldn't be too hard.
We probably then need to start a discussion on the future of autoconfig
and how it can moved forward.
Standard8
/mailnews/extensions/smime/resources/content/certFetchingStatus.js
I don't see any similarities between what is proposed there:
let url = prefs.getCharPref(gDirectoryPref + ".uri");
+
+ gLdapServerURL = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService)
+ .newURI(url, null, null).QueryInterface(Components.interfaces.nsILDAPURL);
and what I have from
prefcalls.js#172
var url = Components.classes[LDAPURLContractID].createInstance(nsILDAPURL);
url.spec = "ldap://" + host + "/" + base + "?" + attribs
+ "?sub?" + filter;
var ldapquery = Components.classes[LDAPSyncQueryContractID]
.createInstance(nsILDAPSyncQuery);
I'am lost in what to do from that ... !? I'll appreciate a cut&paste
exemple of what to change .
anyway, here's how my thunderbird.cfg call this function
getLDAPAttributes("ldap2.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid="
+ env_user,"uid,cn,mail");
should it be called differently ?
>> OK, I am starting to retrieve "Mercurial" source code, but as I am not
>> used to play with that tool I wonder If I am taking the righ way ...
>> I started a note/debug on this subject at my doc page:
>> https://developer.mozilla.org/index.php?title=en/MCD%2C_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird.c2.a0Comm-central_source_code_(Mercurial)
>>
>
> You don't need to pull mozilla-central and comm-central as independent
> items.
>
> Just follow the comm-central source code page that Dan referenced and
> you'll end up with this:
>
> hg clone http://hg.mozilla.org/comm-central/ commsrc
> python client.py checkout
>
> That will give you the comm-central source code in commsrc with the
> mozilla-1.9.1 in commsrc/mozilla. That is the current version of the
> Thunderbird 3 source code. You are also able to build SeaMonkey and
> Firefox from those repositories.
>
OK, I updated my build procedure at
https://developer.mozilla.org/index.php?title=en/MCD,_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird.c2.a0Comm-central_source_code_(Mercurial)
<https://developer.mozilla.org/index.php?title=en/MCD,_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird.c2.a0Comm-central_source_code_%28Mercurial%29>
Thunderbird is --enable-application=mail not
--enable-application=mailnews !? (what is mailnews anyway ?)
I also hope that .mozconfig is correct:
[root@b008-02 commsrc]# cat .mozconfig
mk_add_options AUTOCONF=autoconf-2.13
ac_add_options --enable-application=mail
ac_add_options --prefix="/usr/local/thunderbirdDebug"
ac_add_options --libdir="/usr/local/thunderbirdDebugLibs"
ac_add_options --enable-extensions=pref
but I don't know where sould I set MOZ_LDAP_XPCOM=1 ?
Then I start the build,
unfortunatly, after ~10mn It ends with the error below :-(
[root@b008-02 commsrc]# make -f client.mk build
Adding client.mk options from /usr/local/Moz/commsrc/.mozconfig:
AUTOCONF=autoconf-2.13
make
make[1]: Entering directory `/usr/local/Moz/commsrc'
/usr/bin/gmake -C mozilla default
... ~10 minutes Zzzzzz
rm -f libbreakpad_common_s.a
ar cr libbreakpad_common_s.a convert_UTF.o md5.o string_conversion.o
ranlib libbreakpad_common_s.a
/usr/local/Moz/commsrc/mozilla/config/nsinstall -R -m 644
libhost_breakpad_common_s.a ../../../../../dist/host/lib
gmake[7]: Leaving directory
`/usr/local/Moz/commsrc/mozilla/toolkit/crashreporter/google-breakpad/src/common'
gmake[7]: Entering directory
`/usr/local/Moz/commsrc/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux'
dump_symbols.cc
c++ -o host_dump_symbols.o -c -I./../.. -I. -I.
-I../../../../../../dist/include
-I../../../../../../dist/include/breakpad_linux_common
-I/usr/local/Moz/commsrc/mozilla/dist/include/nspr
-I/usr/local/Moz/commsrc/mozilla/dist/sdk/include
-I/usr/local/Moz/commsrc/mozilla/dist/include/nspr dump_symbols.cc
dump_symbols.cc: In function �bool<unnamed>::WriteFormat(int, const
char*, ...)�:
dump_symbols.cc:176: error: �vsnprintf� was not declared in this scope
dump_symbols.cc: In function
�bool<unnamed>::ComputeSizeAndRVA(Elf32_Addr, <unnamed>::SymbolInfo*)�:
dump_symbols.cc:487: error: �stderr� was not declared in this scope
dump_symbols.cc:488: error: �fprintf� was not declared in this scope
dump_symbols.cc: In function �bool<unnamed>::LoadSymbols(Elf32_Ehdr*,
<unnamed>::SymbolInfo*)�:
dump_symbols.cc:586: error: �stderr� was not declared in this scope
dump_symbols.cc:586: error: �fprintf� was not declared in this scope
gmake[7]: *** [host_dump_symbols.o] Error 1
gmake[7]: Leaving directory
`/usr/local/Moz/commsrc/mozilla/toolkit/crashreporter/google-breakpad/src/common/linux'
gmake[6]: *** [libs] Error 2
gmake[6]: Leaving directory
`/usr/local/Moz/commsrc/mozilla/toolkit/crashreporter'
gmake[5]: *** [libs] Error 2
gmake[5]: Leaving directory `/usr/local/Moz/commsrc/mozilla/toolkit'
gmake[4]: *** [libs_tier_toolkit] Error 2
gmake[4]: Leaving directory `/usr/local/Moz/commsrc/mozilla'
gmake[3]: *** [tier_toolkit] Error 2
gmake[3]: Leaving directory `/usr/local/Moz/commsrc/mozilla'
gmake[2]: *** [default] Error 2
gmake[2]: Leaving directory `/usr/local/Moz/commsrc/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/local/Moz/commsrc'
make: *** [build] Error 2
Any idea ? Am I missing somthing to build it ?
mailnews is the shared mail and newsgroups code used by both Thunderbird
and the SeaMonkey suite.
Robert Kaiser
Not much help, but autoconfig without ldap (using autoconfig to set/lock
settings, but using %username% and %home% for user settings, with rdf as
backup-plan) still works on TB3.0.2 (and I would appreciate it autoconfig
was continued to be a part of Thunderbird having (counting) 9683
installations of Thunderbird and no extensions :)
A global ini-file would be welcome though (for those of us who use
profiles.ini to redirect profile to %home% letting users use the same
profile on any (no-mac) computer (if ini-file present -> use) )
Mvh/
JarrE
You want to make this bit:
var spec = "ldap://" + host + "/" + base + "?" + attribs + "?sub?" + filter;
var url = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(spec, null,
null).QueryInterface(Components.interfaces.nsILDAPURL);
> Thunderbird is --enable-application=mail not
> --enable-application=mailnews !? (what is mailnews anyway ?)
> I also hope that .mozconfig is correct:
> [root@b008-02 commsrc]# cat .mozconfig
> mk_add_options AUTOCONF=autoconf-2.13
> ac_add_options --enable-application=mail
> ac_add_options --prefix="/usr/local/thunderbirdDebug"
> ac_add_options --libdir="/usr/local/thunderbirdDebugLibs"
> ac_add_options --enable-extensions=pref
>
> but I don't know where sould I set MOZ_LDAP_XPCOM=1 ?
The default settings for Thunderbird have MOZ_LDAP_XPCOM=1 set anyway.
> Then I start the build,
> unfortunatly, after ~10mn It ends with the error below :-(
...
Try adding ac_add_options --disable-crashreporter to your .mozconfig it
is probably you haven't got a library needed for that, and you don't
need it anyway on self builds.
Standard8
Netscape.cfg/AutoConfig failed. Please contact your system administrator.
Error: getLDAPAttibutes failed: TypeError:
Components.classes[LDAPSyncQueryContractID] is undefined
Perhaps that change to prefcalls.js is to work only on new versions
(comm_central) ? not on previous ?
>> Then I start the build,
>> unfortunatly, after ~10mn It ends with the error below :-(
> ...
>
> Try adding ac_add_options --disable-crashreporter to your .mozconfig
> it is probably you haven't got a library needed for that, and you
> don't need it anyway on self builds.
> Standard8
Good hint, now it compiles fine:
[root@b008-02 commsrc]# time make -f client.mk build
...
real 23m33.845s
However ... sorry I'am not used with theses tools..., I can't find how
to install and run my freshly compiled thunderbird !
I tried a fake (-n) traditional make install
[root@b008-02 commsrc]# make install -n
/usr/bin/gmake -C mail/installer install
gmake[1]: Entering directory `/usr/local/Moz/commsrc/mail/installer'
Makefile:66: *** you need a "--enable-static --disable-shared" build to
create an installer. Stop.
gmake[1]: Leaving directory `/usr/local/Moz/commsrc/mail/installer'
make: *** [install] Error 2
and for preffcalls/js
[root@b008-02 commsrc]# find ./ -name prefcalls.js
./mozilla/extensions/pref/autoconfig/src/prefcalls.js
./mozilla/dist/bin/defaults/autoconfig/prefcalls.js
these files contains the usual code (broken !?) for getLDAP* functions
maybe it's there that I should replace code with that one :
var spec = "ldap://" + host + "/" + base + "?" + attribs + "?sub?" +
filter;
var url = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(spec, null,
null).QueryInterface(Components.interfaces.nsILDAPURL);
Let me know how to install it, so that I test that new code a the
comm_central version !
thanks
Netscape.cfg/AutoConfig failed. Please contact your system administrator.
Error: getLDAPAttibutes failed: TypeError:
Components.classes[LDAPSyncQueryContractID] is undefined
while changing prefcalls.js this way:
[root@b008-02 autoconfig]# diff -ur prefcalls.js.orig prefcalls.js
--- prefcalls.js.orig 2009-07-02 11:09:12.173190131 +0200
+++ prefcalls.js 2009-07-02 11:10:45.393703564 +0200
@@ -169,10 +169,11 @@
function getLDAPAttributes(host, base, filter, attribs) {
try {
- var url =
Components.classes[LDAPURLContractID].createInstance(nsILDAPURL);
-
- url.spec = "ldap://" + host + "/" + base + "?" + attribs
- + "?sub?" + filter;
+var spec = "ldap://" + host + "/" + base + "?" + attribs + "?sub?" +
filter;
+var url = Components.classes["@mozilla.org/network/io-service;1"]
+ .getService(Components.interfaces.nsIIOService)
+ .newURI(spec, null,
null).QueryInterface(Components.interfaces.nsILDAPURL);
+
var ldapquery = Components.classes[LDAPSyncQueryContractID]
.createInstance(nsILDAPSyncQuery);
// default to LDAP v3
If I leave the prefcalls.js without any change I get the 1st error
message I had
Netscape.cfg/AutoConfig failed. Please contact your system administrator.
Error: getLDAPAttibutes failed: [Exception... "Component returned
failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsILDAPURL.spec]"
nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame
::
file:////usr/local/thunderbirdDebugLibs/thunderbird-3.0b3pre/defaults/autoconfig/prefcalls.js
:: getLDAPAttributes :: line 174" data: no]
So I confirm that autoconfig with ldap support is still broken on latest
thunderbird mercurial release .
Should I open a new bug report ?
Is there a way to debug those .js files without running the whole
thunderbird ? just try to call getLDAPAttibutes & processLDAPValues in
a small javascirpt out of thunderbird so that I check syntax an how I
should call the functions ?
for now I do it this way, pehaps incompatible with the new definition
proposed by Mark ?
getLDAPAttributes("ldap2.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid="
+ env_user,"uid,cn,mail,labeledURI");
> However ... sorry I'am not used with theses tools..., I can't find how
> to install and run my freshly compiled thunderbird !
> I tried a fake (-n) traditional make install
> [root@b008-02 commsrc]# make install -n
> /usr/bin/gmake -C mail/installer install
> gmake[1]: Entering directory `/usr/local/Moz/commsrc/mail/installer'
> Makefile:66: *** you need a "--enable-static --disable-shared" build
> to create an installer. Stop.
> gmake[1]: Leaving directory `/usr/local/Moz/commsrc/mail/installer'
> make: *** [install] Error 2
OK I just added --enable-static --disable-shared to .mozconfig and now
it installs fine :-)
check compile and install details at
https://developer.mozilla.org/index.php?title=en/MCD%2C_Mission_Control_Desktop_AKA_AutoConfig#Thunderbird.c2.a0Comm-central_source_code_(Mercurial)
thanks
OK I filled a bug in bugzilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=502597
I hope we'll get reponses and solutions !
Thanks.
OK I filled a bug in bugzilla:
I did opened a bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=502597
I tested this mornig with latest Thunderbird 3 Beta 3 , same problem :-(
> Is there a way to debug those .js files without running the whole
> thunderbird ? just try to call getLDAPAttibutes & processLDAPValues in
> a small javascirpt out of thunderbird so that I check syntax an how I
> should call the functions ?
Indeed, is there a way I can participate in debuging this problem !?
is this a core developpement or a simple test/debug of javascript that I
could test myself ...
please let me know how to run those javascripts calls (getLDAPAttibutes
& processLDAPValues) outside of thunderbird , is is possible ?
Thanks.
PS: our new term for 2500 students using Thunderbird autoconfig is due
to start 1st September 2009 !
having autoconfig for large enterprise deployment is capital to us.
plese let me know how to advance.
regards .
I did opened a bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=502597
I tested this mornig with latest Thunderbird 3 Beta 3 , same problem :-(
> Is there a way to debug those .js files without running the whole
> thunderbird ? just try to call getLDAPAttibutes & processLDAPValues in
> a small javascirpt out of thunderbird so that I check syntax an how I
> should call the functions ?
Indeed, is there a way I can participate in debuging this problem !?
> Thanks.
>
> PS: our new term for 2500 students using Thunderbird autoconfig is due
> to start 1st September 2009 !
> having autoconfig for large enterprise deployment is capital to us.
> plese let me know how to advance.
You can probably override the proper url in the config editor to point
to a server you control - which would contain your configuration.
We are working on bringing a process to make auto-configure usable by
more people.
Ludo
--
Ludovic Hirlimann MozillaMessaging QA lead
http://www.spreadthunderbird.com/aff/79/2
https://developer.mozilla.org/index.php?title=en/MCD%2C_Mission_Control_Desktop_AKA_AutoConfig
>
> Although I did recompiled thunderbird-3.0-2.3.beta2.fc11.src.rpm with
> --enable-extensions=pref and +MOZ_LDAP_XPCOM=1 I now get the following
> error message while starting thunderbird with an all.js file calling a
> thunderbird.cfg file that eventuallaly lockprefs with ldap retrieved
> value for usernane and mail adress (uid,cn,mail).
> here's the error message:
>
> Netscape.cfg/AutoConfig failed. Please contact your system administrator.
> Error: getLDAPAttibutes failed: [Exception... "Component returned failure
> code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsILDAPURL.spec]" nsresult:
> "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame ::
> file:////usr/lib/thunderbird-3.0b2/defaults/autoconfig/prefcalls.js ::
> getLDAPAttributes :: line 174" data: no]
>
> that used to work in previous versions ,
> anyone else using that feature (autoconfig),
> any advice on this error message ?
This seems to be an issue with the LDAP code could you file a bug in
thunderbird/address book on bugzilla.mozilla.org
Ludo: as per the other parts of this thread a bug has already been
filed: https://bugzilla.mozilla.org/show_bug.cgi?id=502597
Standard8