Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get conact avatar. #3005

Closed
1 task done
hcfw007 opened this issue May 3, 2024 · 0 comments · Fixed by #3001
Closed
1 task done

Unable to get conact avatar. #3005

hcfw007 opened this issue May 3, 2024 · 0 comments · Fixed by #3001
Labels
bug Something isn't working v2.3000.xx The issue specifically relates to WWeb v2.3000.xx

Comments

@hcfw007
Copy link

hcfw007 commented May 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When trying to call client.getProfilePicUrl method Error: Evaluation failed: TypeError: window.Store.ProfilePic.profilePicFind is not a function will be thrown.

Expected behavior

Get the url of the avatar of the contact.

Steps to Reproduce the Bug or Issue

  1. login.
  2. get the avatar of yourself

Relevant Code

Client.js

async getProfilePicUrl(contactId) {
        const profilePic = await this.pupPage.evaluate(async contactId => {
            try {
                const chatWid = window.Store.WidFactory.createWid(contactId);
                return await window.Store.ProfilePic.profilePicFind(chatWid);
            } catch (err) {
                if(err.name === 'ServerStatusCodeError') return undefined;
                throw err;
            }
        }, contactId);
        
        return profilePic ? profilePic.eurl : undefined;
    }

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Mac
Node: 18
Whatsapp-web.js: 1.23.1-alpha.6
Whatsapp Web: 2.3000.1013249969

Additional context

No response

@hcfw007 hcfw007 added the bug Something isn't working label May 3, 2024
@alechkos alechkos linked a pull request May 3, 2024 that will close this issue
6 tasks
@alechkos alechkos added the v2.3000.xx The issue specifically relates to WWeb v2.3000.xx label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.3000.xx The issue specifically relates to WWeb v2.3000.xx
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants