"string is undefined" @ /modules/utils.jsm

1 view
Skip to first unread message

sylver

unread,
Mar 17, 2009, 11:18:03 PM3/17/09
to SamePlace/xmpp4moz
Hi,

I got xmpp4moz v.2009031612 , from the official repo site and also
samplace.cc, when I tried to login using my own experimental login
window (works with any version of xmpp4moz before this), I bumped into
this error:

- with devel suite from sameplace.cc
- "string is undefined" @ /modules/utils.jsm
- but sameplace is working fine

- with xmpp4moz-2009031612.xpi from repo
- "string is undefined" @ /modules/utils.jsm

I ran this test on Firefox 3.07 + Windows XP.

Hope you guys can shed a light on this.

Thanks :D

Massimiliano Mirra

unread,
Mar 18, 2009, 4:44:56 AM3/18/09
to same...@googlegroups.com

Sorry, impossible to say with this data... If you can reproduce the
problem with a 10-20 lines sample and post it here, it would probably
be easier.

-m

sylver

unread,
Mar 19, 2009, 6:25:48 AM3/19/09
to SamePlace/xmpp4moz


On Mar 18, 4:44 pm, Massimiliano Mirra <hyperstr...@gmail.com> wrote:
Sorry for the insufficient code :D

I've tested again, and managed to break it down to this part of the
code:

account = {
jid: "st...@wars.com/lucas",
password: "coolstars",
connectionHost: 'talk.google.com',
connectionPort: '443'}

alert("Is this ok?"); //------> (A)
XMPP.up(account,
function() {
alert("is this ok again?"); //------------> (B)
processLoginSuccess();
);


(A) appeared.... but (B) didn't.

And now there's no error in Error Console.

Thanks :D

Massimiliano Mirra

unread,
Mar 19, 2009, 6:32:47 AM3/19/09
to same...@googlegroups.com
> I've tested again, and managed to break it down to this part of the
> code:
>
> account = {
>   jid: "st...@wars.com/lucas",
>   password: "coolstars",
>   connectionHost: 'talk.google.com',
>   connectionPort: '443'}
>
>   alert("Is this ok?");     //------> (A)
>   XMPP.up(account,
>      function() {
>            alert("is this ok again?");     //------------> (B)
>            processLoginSuccess();
>   );
>
>
> (A) appeared.... but (B) didn't.
>
> And now there's no error in Error Console.

Try adding this to the account object:

address: "st...@wars.com",
resource: "lucas"

Normally these two are computed based on jid, but since you're passing
a raw object instead of an account object, they're not. (A good
reason to use the account system in xmpp4moz instead of rolling your
own. ;) )

-m

sylver

unread,
Mar 20, 2009, 3:21:15 AM3/20/09
to SamePlace/xmpp4moz


On Mar 19, 6:32 pm, Massimiliano Mirra <hyperstr...@gmail.com> wrote:
>
> Try adding this to the account object:
>
> address: "s...@wars.com",
> resource: "lucas"
>
> Normally these two are computed based on jid, but since you're passing
> a raw object instead of an account object, they're not. (A good
> reason to use the account system in xmpp4moz instead of rolling your
> own. ;) )
>
> -m

Thanks again for the quick reply :D

I've added that piece of code you suggested, and followed the doc @
http://wiki.github.com/bard/sameplace/api-accounts, and the new code
look like this:

var account = XMPP.accounts;
account.jid = "st...@wars.com/lucas";
account.password = "coolstars";
account.address = "st...@wars.com";
account.resource = "lucas";
account.connectionHost = 'talk.google.com';
account.connectionPort = '443';

alert("Is this ok?"); //------> (A)
XMPP.up(account,
function() {
alert("is this ok again?"); //------------> (B)
processLoginSuccess();
);

(A) still appeared.... but (B) didn't.

also, can you redirect me to any doc regarding the xmpp4moz's account
system? Can't find it on this group or sameplace.cc.

Thanks a whole bunch :D

Massimiliano Mirra

unread,
Mar 20, 2009, 3:49:03 AM3/20/09
to same...@googlegroups.com
On Fri, Mar 20, 2009 at 8:21 AM, sylver <gamerg...@gmail.com> wrote:
>
>
>
> On Mar 19, 6:32 pm, Massimiliano Mirra <hyperstr...@gmail.com> wrote:
>>
>> Try adding this to the account object:
>>
>> address: "s...@wars.com",
>> resource: "lucas"
>>
>> Normally these two are computed based on jid, but since you're passing
>> a raw object instead of an account object, they're not.  (A good
>> reason to use the account system in xmpp4moz instead of rolling your
>> own. ;) )
>>
>> -m
>
> Thanks again for the quick reply :D
>
> I've added that piece of code you suggested, and followed the doc @
> http://wiki.github.com/bard/sameplace/api-accounts,

...which is out of date. :)

> and the new code
> look like this:
>
> var account = XMPP.accounts;
> account.jid = "st...@wars.com/lucas";
> account.password = "coolstars";
> account.address = "st...@wars.com";
> account.resource = "lucas";
> account.connectionHost = 'talk.google.com';
> account.connectionPort = '443';
>
>   alert("Is this ok?");     //------> (A)
>   XMPP.up(account,
>      function() {
>            alert("is this ok again?");     //------------> (B)
>            processLoginSuccess();
>   );
>
> (A) still appeared.... but (B) didn't.
>
> also, can you redirect me to any doc regarding the xmpp4moz's account
> system? Can't find it on this group or sameplace.cc.

There's no doc about that, just configure an account through SamePlace
then pass it's id (in the form node@domain, without /resource) to
XMPP.up().

-m

Message has been deleted

sylver

unread,
Mar 22, 2009, 9:33:39 PM3/22/09
to SamePlace/xmpp4moz
On Mar 20, 3:49 pm, Massimiliano Mirra <hyperstr...@gmail.com> wrote:

> There's no doc about that, just configure an account through SamePlace
> then pass it's id (in the form node@domain, without /resource) to
> XMPP.up().

> -m

Thanks for the reply :D

Is it possible to configure accounts without going through Sameplace?
Maybe through some API calls?

Also, when you do "XMPP.up()" (without any parameter) a small dialog
pops up where we can select accounts. Is that part of Sameplace or
XMPP4MOZ? Can we use that to configure accounts?

Thanks :D

Massimiliano Mirra

unread,
Mar 23, 2009, 3:43:24 AM3/23/09
to same...@googlegroups.com
On Mon, Mar 23, 2009 at 2:33 AM, sylver <gamerg...@gmail.com> wrote:
>
> On Mar 20, 3:49 pm, Massimiliano Mirra <hyperstr...@gmail.com> wrote:
>
>> There's no doc about that, just configure an account through SamePlace
>> then pass it's id (in the form node@domain, without /resource) to
>> XMPP.up().
>
>> -m
>
> Thanks for the reply :D
>
> Is it possible to configure accounts without going through Sameplace?
> Maybe through some API calls?

Well yes, that's how SamePlace does it. :) Look at wizard.js.

> Also, when you do "XMPP.up()" (without any parameter) a small dialog
> pops up where we can select accounts. Is that part of Sameplace or
> XMPP4MOZ? Can we use that to configure accounts?

It's part of xmpp4moz but the "configure" bit is part of SamePlace.

Also keep in mind that there's a good chance that xmpp4moz and
SamePlace will be merged (probably with a flag to not load part or
whole of SamePlace, for those who don't need it) so there's nothing
wrong with starting to use pieces of SamePlace.now, you'll have them
at your disposal anyway later.

-m

Reply all
Reply to author
Forward
0 new messages