I’m trying to develop a simple Perl script to send instant messages via the Jabber protocol to my Gmail contacts, but I’m encountering some errors. Here’s the code I’ve written so far:
However, I’m now getting an error saying “No SASL mechanism found” in Authen/SASL.pm at line 74, even though I have the Authen::SASL module installed. Any ideas on how to resolve this?
yeah, gmail disabled xmpp support ages ago, so jabber::simplesend is toast now. ya gotta switch to the gmail api or google chat api instead. those sasl errors just show the old endpoints are dead.
The SASL mechanism error you’re experiencing indicates that your authentication setup isn’t compatible. This was a typical issue even when Gmail supported XMPP, often due to missing Perl modules like Authen::SASL::Perl or Authen::SASL::XS required for proper authentication. However, given that Google has discontinued its XMPP gateway service, it’s no longer worth troubleshooting. I recommend migrating to the Google Chat API instead. You will need to set up OAuth2 authentication, register your application in the Google Cloud Console, and utilize something like LWP::UserAgent for HTTP requests instead of relying on the outdated Jabber protocol.
That undefined value error in XML/Stream.pm was pretty common with Jabber::SimpleSend, even when it worked. Usually happened when connections timed out or got interrupted during handshake. The module had quirky socket handling that caused these issues. But you’re fighting a losing battle here - Google killed XMPP support completely. I went through the same frustration trying to get old Jabber scripts working again. Switch to the official Google Chat API instead, though it’s way more complex with all the OAuth requirements.