-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UnhandledPromiseRejectionWarning: TypeError: statusFind is not a function #1
Comments
he gets in scope now 2 callback venom.create("session-develop").then((client) => {
start(client)
}).catch(erro => console.log(erro)) OR venom.create("session-develop", ("statusFind") =>{
console.log(statusFind)
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) OR venom.create("session-name", (base64Qr, asciiQR) => {
console.log(asciiQR);
exportQR(base64Qr, "documentos/qrcode.png");
}, (statusFind) =>{
console.log(statusFind)
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) |
Tried using this samplecreate('sessionName', qrCallback, { |
Hello! 5 options: venom.create("session-name", {
headless: true, // Headless chrome
devtools: false, // Open devtools by default
useChrome: true, // If false will use Chromium instance
debug: false, // Opens a debug session
logQR: true, // Logs QR automatically in terminal
browserArgs: [''], // Parameters to be added into the chrome browser instance
refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) venom.create("session-develop", (base64Qr, asciiQR) => {
// To log the QR in the terminal
console.log(asciiQR);
// To write it somewhere else in a file
exportQR(base64Qr, "documentos/file.png");
}, (statusFind) =>{
console.log(statusFind+'\n\n')
},{
headless: true, // Headless chrome
devtools: false, // Open devtools by default
useChrome: true, // If false will use Chromium instance
debug: false, // Opens a debug session
logQR: true, // Logs QR automatically in terminal
browserArgs: [''], // Parameters to be added into the chrome browser instance
refreshQR: 15000, // Will refresh QR every 15 seconds, 0 will load QR once. Default is 30 seconds
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) venom.create("session-develop", (base64Qr, asciiQR) => {
// To log the QR in the terminal
console.log(asciiQR);
// To write it somewhere else in a file
exportQR(base64Qr, "documentos/file.png");
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) venom.create("session-develop",() =>{}, (statusFind) =>{
console.log(statusFind+'\n\n')
}).then((client) => {
start(client)
}).catch(erro => console.log(erro)) venom.create("session-develop").then((client) => {
start(client)
}).catch(erro => console.log(erro)) |
Updated documentation, Thank You! |
This is not working. Error result:
Not working also
Same Error...
This Sample is working, but I need to set the debug parameters to be true.
This is working, but need debug parameters to be true |
It is not normal to work this example which is just an example, but it is not a qr function, now and with you, here is only taught how to mess with the repo, more follows a part of the code: function exportQR(qrCode, path) {
qrCode = qrCode.replace("data:image/png;base64,", "");
const imageBuffer = Buffer.from(qrCode, "base64");
// Creates "marketing-qr.png" file
fs.writeFileSync(path, imageBuffer);
} look the documentation |
It's working now, thanks! |
Callback Status Session create('sessionName', qrCallback, (statusFind) => {
console.log(statusFind);
})
.then((client) => {
start(client);
})
.catch((erro) => console.log(erro)); |
Hi,
Trying to create instance with parameter getting error:
UnhandledPromiseRejectionWarning: TypeError: statusFind is not a function
at Object. (/../node_modules/venom-bot/dist/controllers/initializer.js:168:25)
The text was updated successfully, but these errors were encountered: