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

TypeError: window.Store.ProfilePic.profilePicFind is not a function #3015

Closed
1 task done
wustdjf opened this issue May 8, 2024 · 0 comments
Closed
1 task done

TypeError: window.Store.ProfilePic.profilePicFind is not a function #3015

wustdjf opened this issue May 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wustdjf
Copy link

wustdjf commented May 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

getProfilePicUrl cannot return the contact ID's profile picture URL

/**
* Returns the contact ID's profile picture URL, if privacy settings allow it
* @param {string} contactId the whatsapp user's ID
* @returns {Promise}
*/
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;
}

window.Store.ProfilePic have no "profilePicFind"

截屏2024-05-08 11 03 34

Expected behavior

As a user I expected get the contact ID's profile picture URL

Steps to Reproduce the Bug or Issue

as show

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Mac

Additional context

/**
     * Returns the contact ID's profile picture URL, if privacy settings allow it
     * @param {string} contactId the whatsapp user's ID
     * @returns {Promise<string>}
     */
    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;
    }
@wustdjf wustdjf added the bug Something isn't working label May 8, 2024
@alechkos alechkos marked this as a duplicate of #3005 May 8, 2024
@alechkos alechkos closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
Repository owner locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants