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

Integração com typebot trava quando envia um Location #1143

Open
1 task done
rotivjr opened this issue Jan 10, 2025 · 1 comment
Open
1 task done

Integração com typebot trava quando envia um Location #1143

rotivjr opened this issue Jan 10, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@rotivjr
Copy link

rotivjr commented Jan 10, 2025

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Integrando o Typebot com Evolution funciona bem até que seja enviada um objeto Location (Localização do WhatsApp). Ocorre um erro nos logs do Evolution devido ao "objeto" não ser esperado e trava o bot.

What did you expect?

Retornar uma string com Lat/Long da Localização enviada

What did you observe instead of what you expected?

Travou o bot e erro nos logs

Screenshots/Videos

erro-evolution

Which version of the API are you using?

2.2.0

What is your environment?

Linux

Other environment specifications

No response

If applicable, paste the log output

[Evolution API] v2.2.0 184 - Fri Jan 10 2025 09:54:49 LOG [TypebotController] [string] Debounce complete. Processing message: -16.36928367614746
[Evolution API] v2.2.0 184 - Fri Jan 10 2025 09:54:49 ERROR [unhandledRejection] [object]
{
origin: Promise {
TypeError: m.toLowerCase is not a function
at nt.processTypebot (/evolution/dist/main.js:161:6320)
at async /evolution/dist/main.js:282:33304
},
stderr: 2
}
[Evolution API] v2.2.0 184 - Fri Jan 10 2025 09:54:49 ERROR [unhandledRejection] [object]
TypeError: m.toLowerCase is not a function
at nt.processTypebot (/evolution/dist/main.js:161:6320)
at async /evolution/dist/main.js:282:33304

Additional Notes

No response

@rotivjr rotivjr added the bug Something isn't working label Jan 10, 2025
@rotivjr
Copy link
Author

rotivjr commented Jan 10, 2025

No codigo que pega o conteudo (content) para validar a "trigger" está aplicando o toLowercase() em um Float (location).

...ndParticipants(e){try{let t=(await this.client.groupMetadata(e.groupJid)).participants,s=await this.prismaRepository.contact.findMany({
where: {
enabled: true,
triggerType: "keyword",
triggerOperator: "equals",
triggerValue: -16.36972999572754,
~~~~~~~~~~~~~~~~~~
instanceId: "14129a02-9f1f-4260-8ab4-60e07950e3f6"

}
})
Argument triggerValue: Invalid value provided. Expected StringNullableFilter, String or Null, provided Float.
at Dn (/evolution/node_modules/@prisma/client/runtime/library.js:114:8082)
at Mn.handleRequestError (/evolution/node_modules/@prisma/client/runtime/library.js:121:7396)
at Mn.handleAndLogRequestError (/evolution/node_modules/@prisma/client/runtime/library.js:121:7061)
at Mn.request (/evolution/node_modules/@prisma/client/runtime/library.js:121:6745)
at async l (/evolution/node_modules/@prisma/client/runtime/library.js:130:9633)
at async Do (/evolution/dist/main.js:273:6690)
at async ks.findBotTrigger (/evolution/dist/main.js:274:1037)
at async ks.emit (/evolution/dist/main.js:278:12840)
at async ae.emit (/evolution/dist/main.js:273:8017)
at async messages.upsert (/evolution/dist/main.js:250:22789) {
clientVersion: '5.21.1'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant