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

sendPoll is not working #3045

Closed
1 task done
manteguinha opened this issue Feb 10, 2023 · 5 comments
Closed
1 task done

sendPoll is not working #3045

manteguinha opened this issue Feb 10, 2023 · 5 comments

Comments

@manteguinha
Copy link

Are you using the latest version of the library?

  • I have checked and am using the latest version of the library.

What type of session are you experiencing this issue on?

Multi-device and I have set multiDevice to true in my config OR am using the --multi-device flag

What type of host account are you experiencing this issue on?

Business account

Mode

My own code

Current Behavior

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'id')
at b (https://web.whatsapp.com/lazy_loaded_low_priority_components.c4de6b8d051267e9fef1.js:2:44797)
at https://web.whatsapp.com/lazy_loaded_low_priority_components.c4de6b8d051267e9fef1.js:2:44528
at Generator.next ()
at t (https://web.whatsapp.com/vendor1~app.0c8e960e5dfd7020f562.js:2:66483)
at s (https://web.whatsapp.com/vendor1~app.0c8e960e5dfd7020f562.js:2:66694)
at https://web.whatsapp.com/vendor1~app.0c8e960e5dfd7020f562.js:2:66753
at Y (https://web.whatsapp.com/app.af1c9e40459f98eb9cf6.js:5:140402)
at new y (https://web.whatsapp.com/app.af1c9e40459f98eb9cf6.js:5:132969)
at https://web.whatsapp.com/vendor1~app.0c8e960e5dfd7020f562.js:2:66634
at y (https://web.whatsapp.com/lazy_loaded_low_priority_components.c4de6b8d051267e9fef1.js:2:44712)
at ExecutionContext._ExecutionContext_evaluate (/home/mantega/bots/MantegaBot/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:247:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (/home/mantega/bots/MantegaBot/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:125:16)

Expected Behavior

No response

Steps To Reproduce

await.client.sendPoll(chatId, "Title", ["Test", "test"])

create() code OR full CLI command + CONFIG

sessionId: 'session',
        headless,
        multiDevice: true, 
        qrTimeout: 0,
        authTimeout: 0,
        hostNotificationLang: 'pt-br',
        skipUpdateCheck: true,
        cachedPatch: true,
        cacheEnabled: false,
        restartOnCrash: start,
        useChrome: true,
        stickerServerEndpoint: true,
        killProcessOnBrowserClose: true,
        throwErrorOnTosBlock: false,
        chromiumArgs: [
            '--no-sandbox',
            '--disable-setuid-sandbox',
            '--aggressive-cache-discard',
            '--disable-cache',
            '--disable-gl-drawing-for-tests',
            '--disable-application-cache',
            '--disable-offline-load-stale-cache',
            '--disk-cache-size=0'
        ]

DEBUG INFO

┌─────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│       (index)       │                                                                   Values                                                                   │
├─────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│     WA_VERSION      │                                                                 '2.2306.7'                                                                 │
│       PAGE_UA       │ 'WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' │
│ WA_AUTOMATE_VERSION │                                                                  '4.55.2'                                                                  │
│   BROWSER_VERSION   │                                                       'HeadlessChrome/110.0.5481.77'                                                       │
│         OS          │                                                                'Linux 5.15'                                                                │
│      START_TS       │                                                               1676042312047                                                                │
│      RAM_INFO       │                                                      'Total: 1.87 GB | Free: 1.17 GB'                                                      │
│    PPTR_VERSION     │                                                                  '19.6.3'                                                                  │
└─────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

Environment

- OS: Ubuntu 22.04.1 LTS
- Node: v18.14.0
- npm: 9.3.1

Screenshots/Logs

No response

Anything else?

image

@smashah
Copy link
Member

smashah commented Feb 10, 2023

@github-actions run

⚡ Release! ⚡
(async () => {
function exec(cmd) {
try {
	execSync(cmd, {stdio: 'inherit'})
}  catch (error) {
    console.log(`Status Code: ${error.status} with '${error.message}'`);
 }
}
//set the version type
process.env.VERS = "patch"

// 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 -D`);
exec(`npm run release-ci $VERS`);

// types only package
exec('npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN')
exec(`npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm run types:publish `);
exec(`git commit -a -m 'updated types-only package'`);
exec(`git push --force`);

//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`);
  })();

@smashah
Copy link
Member

smashah commented Feb 10, 2023

Changelog

🚀 Release 4.55.2 (2023-01-21)

@smashah
Copy link
Member

smashah commented Feb 10, 2023

@manteguinha fixed. Now you can add a quoted message to the poll and by default it will only allow one response per user

CleanShot_2023-02-11_at_01.08.06.mp4

@smashah smashah closed this as completed Feb 10, 2023
smashah added a commit that referenced this issue Feb 10, 2023
@smashah
Copy link
Member

smashah commented Feb 10, 2023

@github-actions run

⚡ Release! ⚡
(async () => {
function exec(cmd) {
try {
	execSync(cmd, {stdio: 'inherit'})
}  catch (error) {
    console.log(`Status Code: ${error.status} with '${error.message}'`);
 }
}
//set the version type
process.env.VERS = "patch"

// 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 -D`);
exec(`npm run release-ci $VERS`);

// types only package
exec('npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN')
exec(`npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm run types:publish `);
exec(`git commit -a -m 'updated types-only package'`);
exec(`git push --force`);

//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`);
  })();

@smashah
Copy link
Member

smashah commented Feb 10, 2023

Changelog

🚀 Release 4.55.4 (2023-02-10)

@smashah smashah mentioned this issue Feb 13, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants