Open erickmourasilva opened 6 years ago
Mine still returns eurl, img and imgFull when I do:
window.Store.ProfilePicThumb.find("14078007750@c.us").then(function(d) {
console.log(d);
})
The only issue I have about this command is that sometimes whatsapp returns an image link even when the number doesn't have any photo so it tries to download and stays there "forever" trying until the 50000ms timeout exceeds
This happens when the number you requested has an image, but it is restricted to the contacts!
In my case is generated error in the store itself. Any solution guys?
This happens when the number you requested has an image, but it is restricted to the contacts!
Would you suggest something about it? It happens everytime and doesn't even raise an error or something like that
not contain more elements imgFull, imgSmall or eurl
Were you using selenium remote or firefox when that happened?
You could try to handle the timeout and generate an exception.
I am using remote selenium with chrome.
Did you try with firefox? There are a lot of things incompatible with chrome, and firefox is the default, that's why I stopped using it. Mozilla's Geckodriver
In both, the problem persists.
I noticed that the function only works when there is a chat with the number consulted, if there is no chat it is not possible to consult more.
Is there a solution?
Following @lfdelphino comment, i've tried this.
window.Store.ProfilePicThumb.find("34657676760@c.us").then(function(d) { return(d['__x_imgFull']); })
And worked perfectly, so I can fill profile picture calling this on the serialize function, but still digging how to apply correctly ...
@erickmourasilva.
As far as i've understand, it's a whatsapp rule that you can't fetch picture untill you have chat with "contact". Once you did, you're able to fetch than info, even if you don't have a current chat open. This is a "protection" feature of whatsapp disabling people watching other people that might don't want. So, it's not a problem of the wapi.js at all.
Hello, after updating WhatsApp function getProfilePicFromId is no longer working, when debugging it the object returned contains the following error: Model: Name: "ModelCreateError" Stack: "ModelCreateError: t at t.n (https://web.whatsapp.com/app.1c6cccbeae5d099f4d1e.js:19:20325) at new t (https://web.whatsapp.com/app.1c6cccbeae5d099f4d1e.js:20:2887) at https://web.whatsapp.com/app.1c6cccbeae5d099f4d1e.js:9:31640 at x (https://web.whatsapp.com/app.1c6cccbeae5d099f4d1e.js:30:31007) at MutationObserver.I (https://web.whatsapp.com/app.1c6cccbeae5d099f4d1e.js:30:30499) "
not contain more elements imgFull, imgSmall or eurl
Any solution?
** EDIT **
I noticed that the function only works when there is a chat with the number consulted, if there is no chat it is not possible to consult more.