Describe the bug
When i try to decrypt a media inside a message wich was sent by me it fires an error and doesn't decrypt correctly.
Steps to Reproduce
Steps to reproduce the behavior:
create() code
This is the code you use to create the client. e.g
create('session', {
headless: true,
autoRefresh: true,
args: [
'--proxy-server="direct://"',
'--proxy-bypass-list=*'
]
}).then(client => start(client));
Expected behavior
receive a file decrypt to be saved on a folder.
DEBUG INFO
This is the info printed to the console when you start your app. It should look like this
Debug Info {
WA_VERSION: '2.2017.6',
PAGE_UA: 'WhatsApp/0.4.613 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
WA_AUTOMATE_VERSION: '1.9.9',
BROWSER_VERSION: 'HeadlessChrome/81.0.4044.0'
}
Screenshots
If applicable, add screenshots to help explain your problem. Use headless: false to get screenshots
Host (please complete the following information):
Additional context
Some screenshot image
@weverkley Please attach all relevant images to the issue next time. That page is full of garbage ads.
This is happening because you get the message when the file starts uploading. At that point, there is no clientUrl leading to the error.
@github-actions run
âš¡ Release! âš¡
(async () => {
function exec(cmd) {
console.log(execSync(cmd).toString());
}
// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";
exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);
//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
})();
@weverkley try the new version. It now waits for the clientUrl before firing the callback. Let me know if it works for you.
@weverkley try the new version. It now waits for the clientUrl before firing the callback. Let me know if it works for you.
awesome, thanks ill try it now

Still the same error, its not waiting
@weverkley how are you testing this? I've fixed it for when you upload a file from the host phone. But yeah it doesn't seem to work when sending a file from the bot for which I would ask why you need to decrypt media that you just sent with the bot??
@weverkley how are you testing this? I've fixed it for when you upload a file from the host phone. But yeah it doesn't seem to work when sending a file from the bot for which I would ask why you need to decrypt media that you just sent with the bot??
I am reproducing whatsapp web so i need to send and save them in a local cache to display in the client side, to do it am using onAnyMessage to capture files, decrypt and write to local file system
ok, give me a few mins.
This should fix it: 170e296
@github-actions run
âš¡ Release! âš¡
(async () => {
function exec(cmd) {
console.log(execSync(cmd).toString());
}
// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";
exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);
//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();
await postComment(result);
//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
})();
@weverkley try it out let me know if it's working now.
@smashah now its working, i can decrypt and save the media, thank you!