New problem with the last version and avatarURL function

Hi! Sometimes when we start a videocall with the last version we get the next error and the videocall can’t start:

2021-12-13T20:57:42.148Z [features/base/app] TypeError: Cannot destructure property ‘avatarURL’ of ‘Bh(…)’ as it is undefined.
at Object.changeLocalAvatarUrl (app.bundle.min.js:138)
at Object.avatar-url (app.bundle.min.js:138)
at app.bundle.min.js:138
at app.bundle.min.js:138
at Set.forEach ()
at see.on (app.bundle.min.js:138)
at Object.init (app.bundle.min.js:138)
at app.bundle.min.js:2
at app.bundle.min.js:138
at app.bundle.min.js:138
at app.bundle.min.js:138
at app.bundle.min.js:138
at app.bundle.min.js:138

We think is something about the avatarUrl function. Here the way that we send that parameter:


We really appreciate your important help!

I have an identical problem when I use IFrame API by and:

api.executeCommand('avatarUrl', '');

@Jose_Luis_Andrade Can you provide an example that reproduces the issue?
We are not able to reproduce it.
One thing I notice from your screenshot is that you set the avatar too early. its just after document ready … Maybe try loading it on videoConferenceJoined, does that work?

1 Like

I opened a new issue:

As damencho mentioned, your issue is that you are calling it too early.

It will work if you call it on videoConferenceJoined, e.g.

const api = new JitsiMeetExternalAPI(domain, options);

api.addListener('videoConferenceJoined', () => {
    api.executeCommand('avatarUrl', '');

Demo: JSFiddle

With this change it already works fine.
Thank you very much for your help!

This problem only arose with Chrome Mac version 97. In firefox and Safari there was never a problem.

Thanks to developpers : this solution works fine for me too !

The downside of this solution is that, when in the PreMeeting screen, the user will think that his AVATAR is wrong. Since it hasn’t been loaded yet. But it solves many cases.

As I really want the avatar to be seen on the preMeeting screen, I set it with a timeout of 1500ms. So far it’s working fine.

setTimeout(() => {
    api.executeCommand('avatarUrl', avatar);
}, 1500);

It would be very helpful to be able to do this:

userInfo: {
  email: '',
  displayName: 'Nobody',
  avatarUrl: 'URL'
1 Like

Hi, I would really appreciate if someone could let me know how can I pass userInfo to the my jitsi meet url dynamically.
As of now I am using to open a new page of jitsi meet from my other website and I wanted to know how can I pass user image and name for each user dynamically

You should look into JWT Tokens.