Webwhatsapp-wrapper: getGroupParticipantIDs Timed out after 500000 ms

Created on 29 Jan 2020  路  5Comments  路  Source: mukulhase/WebWhatsapp-Wrapper

Version: geckodriver 0.24.0
Platform: Linux
Firefox: 61

when i try to get many groups participants i get very long time out 500000 ms
how i can decrease the time out to 10 seconds ?

Most helpful comment

I solved it. Here is:
window.WAPI.getGroupMetadata = async function (id, done) {
let output = window.Store.GroupMetadata.get(id);
if (output !== undefined) {
if (output.stale) {
await window.Store.GroupMetadata.update(id); // instead of output.update()
}
}
if (done !== undefined) done(output);
return output;
};

All 5 comments

any advise?

i dont use async in my code, i replaced
return self.driver.execute_async_script(command)
in wapi_js_wrapper.py : class JsFunction(object)
by
return self.driver.execute_script(command)
and if the error occurred i get the following error directly without time out 500000 ms :

getGroupParticipantIDs error: Error in function getGroupParticipantIDs (TypeError: output.update is not a function). Command: return WAPI.getGroupParticipantIDs('[email protected]', arguments[0])
note: this error not always appear.

I have the same problem. Do you solve it?

not yet

I solved it. Here is:
window.WAPI.getGroupMetadata = async function (id, done) {
let output = window.Store.GroupMetadata.get(id);
if (output !== undefined) {
if (output.stale) {
await window.Store.GroupMetadata.update(id); // instead of output.update()
}
}
if (done !== undefined) done(output);
return output;
};

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Zingers-ZA picture Zingers-ZA  路  6Comments

NolanWang picture NolanWang  路  5Comments

desstannoz picture desstannoz  路  4Comments

erickythierry picture erickythierry  路  5Comments

ItachiL18 picture ItachiL18  路  6Comments