I've upgraded my sites to 8.x-1.0-beta1 this morning. I just started to deploy a brand new site this morning and decided to set up SMTP first. When attempting to send a test mail, I get this error:

[Mon Oct 17 11:13:31.524406 2016] [:error] [pid 16064] [client 96.53.90.11:49570] Uncaught PHP Exception Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: "You have requested a non-existent service "smtp.logger.channel"." at XXXX/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php line 157, referer: http://XXXX/admin/config/system/smtp

(XXXX's mine)

I tested two other sites across two different servers both upgraded to beta1, both are failing with the same error. Both sites were previously working with alpha2.

I'm uncertain if the failure is merely with sending a test mail, or with all messages across the system.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TrevorBradley created an issue. See original summary.

TrevorBradley’s picture

Title: Can't send test mail: Non-existent service "smtp.logger.channel" » Can't send mail: Non-existent service "smtp.logger.channel"
Priority: Major » Critical

Just tested - the server is failing to send out messages for any reason, with the same error.

For reference, both affected servers are running on Ubuntu 16.04LTS / PHP7. Different servers are attempting to either send out mail to Google's Gmail and Office 365 servers.

Time to revert back to the most recent alpha. :|

TrevorBradley’s picture

Version: 8.x-1.0-beta1 » 5.x-1.0

Verified: Downgrading to alpha2 via "drush dl smtp-8.x-1.0-alpha2" makes the problem go away.

TrevorBradley’s picture

Version: 5.x-1.0 » 8.x-1.0-beta1

(mouse slip)

estoyausente’s picture

I tested this patch and it was working correctly but the previous error was the same:
https://www.drupal.org/node/2742773

Maybe related? I think that yes but now I haven't enough time to test it. I try to test in my own environment again.

artecnico’s picture

The same happened to me: everything was working well with the alpha2 version, but when I updated to the beta1 version it stopped working and throwed the same error message.
I did the same as TrevorBradley above (thanks for the tip!), and downgrading it to the alpha2 version reverted things to "normal".

estoyausente’s picture

I just found the mistake. I think that we had a old version in the smtp environment and something was wrong.

I could replicate the error using the beta version and I thing the bug is fixed.

Could you test it please?

TrevorBradley’s picture

Status: Needs review » Reviewed & tested by the community

Test that mail still works before upgrading from alpha2 to beta1: Verified

Test that mail fails to work after upgrading to beta1: Verified

Applying patch, sending test mail: Verified - Mail sent and received with no errors.

The patch works for me! Thank you @estoyausente!

druroot’s picture

I was having this problem with the beta1 release, I can confirm that patch #7 fixes my issue. Thanks!

TrevorBradley’s picture

I'm curious if beta1 is actually functioning for anyone (the reason I flagged this as critical, I'd assumed it is universally broken).

Are we an edge case, or is beta1 completely broken and unable to send mail? (If so, hopefully we see a beta2 soon).

estoyausente’s picture

I don't know @TrevorBradley, when I tested the last patch my old environment worked ok but now I'm not sure if I didn't applied the patch correctly or if I did something wrong. I don't know.

But when I test the beta1 version it didn't run as you comment perfectly. Thanks for open this issue, I haven't update my module yet!

Metal3d’s picture

Patch worked for me, I was really afraid...

ToxaViking’s picture

Patch works for me

bigsony’s picture

bigsony’s picture

bigsony’s picture

After applying the patch #7 I got this message:

RuntimeException: Failed to start the session because headers have already been sent by "/var/www/xxxxx/public_html/modules/contrib/smtp/src/PHPMailer/SMTP.php" at line 646. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 140 of /var/www/xxxxx/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php) #0 /var/www/xxxxx/public_html/core/lib/Drupal/Core/Session/SessionManager.php(163): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() #1 /var/www/xxxxx/public_html/core/lib/Drupal/Core/Session/SessionManager.php(194): Drupal\Core\Session\SessionManager->startNow() #2 /var/www/xxxxx/public_html/vendor/symfony/http-foundation/Session/Session.php(181): Drupal\Core\Session\SessionManager->save() #3 /var/www/xxxxx/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(60): Symfony\Component\HttpFoundation\Session\Session->save() #4 /var/www/xxxxx/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #5 /var/www/xxxxx/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #6 /var/www/xxxxx/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #7 /var/www/xxxxx/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #8 /var/www/xxxxx/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #9 /var/www/xxxxx/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #10 /var/www/xxxxx/public_html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #11 /var/www/xxxxx/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #12 {main}.

Nathan_Hyde’s picture

Patch worked for me.

estoyausente’s picture

@bigsony Hi, I need more info to replicate this error. I think that is unrelated...

Hi, @Nathan_Hyde this isn't the correct place to ask this kind of question, this issue is about the issue discussion. You can go to IRC and choose a channel (https://www.drupal.org/irc) or seach in the Drupal documentation (https://www.drupal.org/patch/apply).

Regards!

frogdog_tech’s picture

#7 working for me as well.

TrevorBradley’s picture

Just a quick note that if you did use the "drush dl smtp-8.x-1.0-alpha2" trick to go back to the old version, that the patch will not apply properly if you upgrade back to beta1. You'll need to:

cd modules
rm -r smtp
drush dl smtp
cd smtp
patch -p1 ~/0001-Issue-2819793-Can-t-send-mail-Non-existent-service-s.patch 

(or wherever you've stowed the patch)

I've upgraded all my sites to smtp-beta1 patched this morning - all looks good so far.

heddn’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev

+1 on RTBC.

mwnemesis’s picture

I've installed the beta1 on a clean environment and i get the error:

[24-Oct-2016 13:28:13 Europe/Rome] Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "smtp.logger.channel"." at C:\xampp\htdocs\\core\lib\Drupal\Component\DependencyInjection\Container.php line 157

After that i removed the beta1 and installed alpha2 and it worked fine,
i saw that the exception happen when the plugin contructor is called (file "SMTPMailSystem.php" line 64):

$container->get('smtp.logger.channel')
bigsony’s picture

@estoyausente The patch #7 worked well for me. The mistake that I had came because I activated "Enable debugging" in configuration page SMTP Authentication. After I disabled it, worked fine.

KevinvdBurg’s picture

Reviewed the patch #7 works

+1 RTBC

Anonymous’s picture

Ugh how embarrassing - just discovered this as a potential client was trying to get in contact with me! Thanks @estoyausente for the patch in #7 - seems to work fine on my purkiss.com site - didn't have enable debugging on or anything, just standard install.

Would be great to get this released, anything I can do to help please let me know, I just 'composer update' every day to make sure stuff is up-to-date, for the moment I've linked the patch as described in this helpful article:

http://www.anexusit.com/blog/how-to-apply-patches-drupal-8-composer

+1 RTBC

vcouver’s picture

Hello,

The same for me.

Test that mail still works before upgrading from alpha2 to beta1: Verified
Test that mail fails to work after upgrading to beta1: Verified
Applying patch, sending test mail: Verified - Mail sent and received with no errors.
The patch works for me!
Thank you @estoyausente!

deminy’s picture

I probably experienced exactly same experience as #26 (from user @vcouver).

Fix #7 works for me. Thanks

jurgenhaas’s picture

Patch #7 works for me as well.

sd42’s picture

#7 works for me too, thanks!!!

cleaver’s picture

+1 on the patch #7.

jief’s picture

Patch #7 works for me too

estoyausente’s picture

I think that this patch can be committed. :)

rmcom’s picture

Yes, please commit to a new beta version. Thank you!1

simgui8’s picture

Patch #7 fix this problem here too. THX

Sebastien M.’s picture

Patch #7 fixes this problem too.
Many Thanks

Sebastien M.’s picture

Can you rapidly generate a new release with this patch ?
This issue is critical.
Thanks

Anonymous’s picture

@Sebastian @Actualys well 'critical' in terms of operation of the module sure, however as there's a patch it's possible to get the module working and include in your workflow as I have done with adding the patch to my composer.json. OK it's a pain but when you say "you" who do you mean? As free software there's no obligation to do this stuff, and by the looks of it there's been many maintainers over the years of this project and I've no idea what's going on in the lives of the current maintainers, or what their intentions are for the release cycle of this project, if indeed there is any.

If there's anyone on the list who desperately needs a release then perhaps offer to be co-maintainer, there's lots of info in the getting involved guide https://www.drupal.org/getting-involved-guide

Sadly no-one's paid to directly maintain this stuff, people have needs so they do stuff from time-to-time, if we're not getting what we want then we have to start to think different & find out what issues are & how we can approach them - a chip-in / funding widget if necessary & if that's what people want, offering to co-maintain, or whatever. Together we make it work, demanding service just drives people away further IMHO especially if it's mostly from people who are getting paid to do something asking people who aren't getting paid to do something to do something urgently.

I'm not directing this at any particular people, just making a note as obviously this issue isn't going anywhere fast, the thing I think is getting hurt the most is Drupal's image, as one of the heaviest used modules is broken, but simply posting isn't getting things moving.

I'm fine with waiting until a new release comes out as I've integrated the patch in my workflow, ok it's gonna break when it finally does get fixed, but I'll get an email and I'll sort it.

I'm sure it'll get fixed in time ;)

estoyausente’s picture

Hi @stevepurkiss you are totally right. Nobody have to demand a commit or a release (this is free software) but... really a module like this (very important because it has a lot of installations) is broke and maybe some of the users that use it haven't enough experience to apply a patch or review the IQ.

Drupal community have to have this feeling and have to try to resolve it (and really, it isn't a current mantainers problem).

I will try to talk with wundo and offer my help for commit it and co-mantain this module :)

Sebastien M.’s picture

Hi Steve,

No need to speak about free software and obligations regarding any other licensed product.
I'm co-maintainer and I have multiple modules and opensource projects too.
I know how hard is to maintain these.
So no need to make me any lesson.

I've just noted this module, which is very interesting and efficient, is not working on Drupal 8.x due to a critical issue (Priority:
Critical).
Not everybody is able to easily patch a module, it requires some knowledge.
So there is a real need to release a new version.

Keep calm and have a coffee.
BR

Anonymous’s picture

@estoyausente awesome, you rock!

Anonymous’s picture

@Sebastien @Actualys yes, I have seen the many contributions you have made to the project! As mentioned, it was more of a 'heads up' for the many replying, and that there may be other issues at hand as to why there hasn't been a release which we simply don't know, and if not and it's just 'bad maintainer' then others need to step up to the plate, as it seems some have done.

So was just doing my bit to move things on by trying to get us out of what I could see may be spiralling into a repetitive loop of +1s and increasingly frustrated replies ;)

btw, I'm always chilled ;)

  • wundo committed 3cb703f on 8.x-1.x authored by estoyausente
    Issue #2819793 by estoyausente: Can't send mail: Non-existent service "...
wundo’s picture

Status: Reviewed & tested by the community » Fixed

Hey guys,
Sorry I missed all the discussions here, when something is really urgent send me a direct message (e-mail or twitter works). As you can see from my profile I collaborate with several projects, and sometime a issue falls through the cracks.

I've committed the patch from #7 by the way.

Cheers,
Fabiano

Sebastien M.’s picture

Many thanks

Anonymous’s picture

Awesome, that works! Now how does it get into a release so those who don't use -dev will get it? I see 8.x-1.0-beta1 so presume there needs to be a 8.x-1.0-beta2. Does this involve email and/or twitter or is there a general procedure?

After all these years of Drupal I've never read up on contrib module maintenance so trying to short-cut no doubt much reading to find out ;)

Thanks!

TrevorBradley’s picture

Thank you @wundo!

@stevepurkiss: Rushing from -dev to -beta2 may not be the wisest course of action. There may be other bugs in -dev that have been introduced and not ironed out yet. We're on the right track though! (Hopefully that -beta1 is completely broken will be a catalyst to get out -beta2 soon).

If it helps, you can install the -dev version via drush, which will be properly upgraded by drush to -beta2 when it comes out.

wundo’s picture

Actually beta2 is already out, I did it after pushing this.
The only difference between beta1 and beta2 is this issue, given the several +1 on this thread I thought it should be safe to update.

TrevorBradley’s picture

@wundo: Sweet! Just tested it and verified it's working.

Anonymous’s picture

@wundo thanks, that's perfect! Think I must've been too trigger-happy & composer updated before the systems updated to beta2, all working great now!

vcouver’s picture

It's ok with the version: 8.x-1.0-beta2
Thank's.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.