Error message:
NewsletterStudio, SendNewsletterService: Sequence contains no matching element : at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at NewsletterStudio.Bll.Providers.SubscriptionProviderFactory.GetReceiversBySubscriptionAlias(String value, SendOutParams parameters)
at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems()
at NewsletterStudio.Services.SendNewsletterService.SendEmails()
In the log it quotes the following:
2019-06-04 16:24:53,896 [P7408/D31/T477] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioSendout has been called with response: True
trying to send to members. It used to work for quite a while now without any troubles. Nothing changed as far as I can tell. There are about 150 members in that specific member group.
every 2-5 minutes it creates a couple of lines in the log:
2019-06-05 06:20:14,541 [P7408/D31/T979] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioSendout has been called with response: True
2019-06-05 06:25:14,600 [P7408/D31/T955] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioBounces has been called with response: True
Umbraco version running is 7.11.1 and has not been updated for a year or so.
Same for Newsletter Studio running on v2.1.9.3
In my Newsletter Studio Draft folder I now see the Newsletter with the following error:
This newsletter has the status error, something probably went wrong during the send out
Error message:
NewsletterStudio, SendNewsletterService: Sequence contains no matching element : at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at NewsletterStudio.Bll.Providers.SubscriptionProviderFactory.GetReceiversBySubscriptionAlias(String value, SendOutParams parameters)
at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems()
at NewsletterStudio.Services.SendNewsletterService.SendEmails()
You can try to continue to send the newsletter by going to the "Send options" and follow the instructions.
the member group has not changed for a while. The newsletter sendout was not scheduled. We did everything exactly the same way as we did it the first time... strange.
After deleting the old newsletter I checked the log but those two lines are still beeing written.
I compared old log files (2016-12-22 please find below) and discovered that these lines are in all of the logs. Is this an expected behaviour?
2016-12-22 23:56:13,832 [P5224/D27/T157] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioSendout has been called with response: True
2016-12-22 23:59:13,850 [P5224/D27/T99] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioBounces has been called with response: True
The log entry that you see is just the scheduled task (from /config/umbracoSettings.config) that sends any scheduled newsletters - this is not an error. You could change the "log"-attribute to false on that entry and you would not get these entries in the log.
2019-06-11 21:58:23,460 [P5532/D3/T108] INFO Umbraco.Web.Scheduling.ScheduledTasks - newsletterstudioBounces has been called with response: False
2019-06-11 21:58:25,474 [P5532/D3/T35] ERROR Umbraco.Web.Scheduling.ScheduledTasks - An error occurred calling web task for url: http://localhost:64310/umbraco/NewsletterStudio/Actions/NewsletterCheckForScheduledSendOut
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:64310
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Scheduling.ScheduledTasks.
The error that you posted looks like there might be something wrong with the url for the scheduledTask in umbracoSettings.config that performs scheduled send outs, does is this URL correct?
Reg. why the members don't show up, your configuration looks good, do you have member groups created as well? Not sure if I asked but did this work before? Do you see any other errors in the log?
If a subscription providre (which the UmbracoNewSubscriptionProvider is) throws an error this error should be logged.
The URL for the scheduledTask should start with the domain that you are hosting the site on, let' say its www.foo.com and we have a test.foo.com, stage.foo.com
And of course if you are running on https, the urls should start with https. And also note: If you're not using the feature to schedule a newsletter you don't even need the scheduled task.
Regarding the problem with the subscription providers.
It looks like something goes wrong when loading the lists from the UmbracoNewSubscriptionProvider, this uses the underlaying Umbraco APIs to fetch member groups and fetch members from these group. There is quite some logging around this so I'm surprised that you don't find anything in your log files.
I have some more questions to try to narrow it down:
Have you changed names of the member groups or removed any of them since the newsletter content item was first created? If you did change or remove a group that might be a problem since we can't find subscribers for a group that was removed.
Did you select any of the member groups before saving the content item?
Here are some thing that I would like you to have in mind and to try:
Please search your trace log files (app_data/logs/{date}.log) again for "NewsletterStudio" and see if you find any historical error message related to this.
If you see this issue again, try the following:
Create a new newsletter (without removing the old on) and see if the member groups are shown?
Clear the trace log file (rename the file or remove it) and load the newsletter where you have the issues, any entries in the log?
Also, regarding this issue, the first error that you posted:
Error message: NewsletterStudio, SendNewsletterService:
Sequence contains no matching element : at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at NewsletterStudio.Bll.Providers.SubscriptionProviderFactory. GetReceiversBySubscriptionAlias(String value, SendOutParams parameters)
at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems() at NewsletterStudio.Services.SendNewsletterService.SendEmails()
Was this a scheduled newsletter or did you get that error when pressing the "send out"-button? And this was from the content-section right?
I've tried a clean install of Umbraco and Newsletter Studio 2.1.9.5 and in my case it loads members both in the Newsletter Studio-section and the Content Section so we need to figure out what's wrong in your senario.
thank you very much for your detailed answer. Please find my comments below:
If you're not using the feature to schedule a newsletter you don't even need the scheduled task
Where can I switch it off?
Have you changed names of the member groups or removed any of them since the newsletter content item was first created? If you did change or remove a group that might be a problem since we can't find subscribers for a group that was removed.
Yes, I have deleted membergroups via a webservice.
Will this lead to problems with future sendouts?
Create a new newsletter (without removing the old on) and see if the member groups are shown?
I will test this and let you now
Was this a scheduled newsletter or did you get that error when pressing the "send out"-button? And this was from the content-section right?
It happend when pressing the "send out"-button in the content-section.
One day after the issue appeared, I could see the membergroups again, too. So it seemes to be a sporadic problem.
Error sending Newsletter
Hi there,
im stuck with a problem sending out a newsletter:
In the log it quotes the following:
Any ideas?
Thanks
Hi!
Is this something that hade to work?
Are you sending to a mailing list in newsletter studio or to members?
Are you sure that the list contains subscribers?
/ m
Hi Markus,
trying to send to members. It used to work for quite a while now without any troubles. Nothing changed as far as I can tell. There are about 150 members in that specific member group.
Thanks for your reply!
Hi!
Okey, thanks for getting back.
So do you know if there has been any work done in terms of upgrades to Umbraco or Newsletter Studio? What versions are you running?
Can you see any further details about the error in the trace log? (app_data/logs/...)
// m
Hi Markus,
every 2-5 minutes it creates a couple of lines in the log:
Umbraco version running is 7.11.1 and has not been updated for a year or so.
Same for Newsletter Studio running on v2.1.9.3
In my Newsletter Studio Draft folder I now see the Newsletter with the following error:
Hi Markus,
I have now copied the Newsletter and sent it without any problems. Same member group but everything went just fine.
Hard to tell what went wrong the first time.
One question: Is there a way to prevent the previous newsletter from trying to sent?
Hi!
Thanks for letting me know.
I think that it might be that it was scheduled to send or something and that a mailing list that was deleted was selected - could that be the case?
Is it an option just to remove the old letter? That would make it disappear and not trying to send anymore.
Hi Markus,
the member group has not changed for a while. The newsletter sendout was not scheduled. We did everything exactly the same way as we did it the first time... strange.
After deleting the old newsletter I checked the log but those two lines are still beeing written. I compared old log files (2016-12-22 please find below) and discovered that these lines are in all of the logs. Is this an expected behaviour?
Hi!
The log entry that you see is just the scheduled task (from /config/umbracoSettings.config) that sends any scheduled newsletters - this is not an error. You could change the "log"-attribute to false on that entry and you would not get these entries in the log.
All the best!
// m
Hi Markus,
its me again. I'm having trouble sending out a Newsletter on a different project. Same error as described above.
Strange thing is, that the member groups are not listet anymore in the sendout tab:
How can this happen?
Hi!
What version of Umbraco and what version of Newsletter Studio are you on?
Do you see any errors in the trace log?
If you look in newsletterStudio.config - what subscription providers do you have configured?
/ m
Umbraco version 7.14.0 assembly: 1.0.7009.26199
lastInstalledVersion="2.1.9.2"
Trace log: this error occurs every 5 min:
newsletterStudio.config:
HI!
The error that you posted looks like there might be something wrong with the url for the scheduledTask in umbracoSettings.config that performs scheduled send outs, does is this URL correct?
http://localhost:64310/umbraco/NewsletterStudio/Actions/NewsletterCheckForScheduledSendOut
Reg. why the members don't show up, your configuration looks good, do you have member groups created as well? Not sure if I asked but did this work before? Do you see any other errors in the log?
If a subscription providre (which the UmbracoNewSubscriptionProvider is) throws an error this error should be logged.
// m
Hi Markus,
thanks for getting back to me.
Which URL should be declared an where can I set it?
Today I managed to copy the Newsletter, delete the old and send the new one. Yesterday the member groups did not show up but today they did.
I am a bit worried since it happend twice now and there is not much room for me to interact or debug, etc...
I'm not shure what would be the best way to go on this problem?
Thanks
Hi!
The URL for the scheduledTask should start with the domain that you are hosting the site on, let' say its www.foo.com and we have a test.foo.com, stage.foo.com
Test: http://test.foo.com/umbraco/NewsletterStudio/Actions/NewsletterCheckForScheduledSendOut
Stage: http://stage.foo.com/umbraco/NewsletterStudio/Actions/NewsletterCheckForScheduledSendOut
Prod: http://www.foo.com/umbraco/NewsletterStudio/Actions/NewsletterCheckForScheduledSendOut
And of course if you are running on https, the urls should start with https. And also note: If you're not using the feature to schedule a newsletter you don't even need the scheduled task.
Regarding the problem with the subscription providers.
It looks like something goes wrong when loading the lists from the UmbracoNewSubscriptionProvider, this uses the underlaying Umbraco APIs to fetch member groups and fetch members from these group. There is quite some logging around this so I'm surprised that you don't find anything in your log files.
I have some more questions to try to narrow it down:
Here are some thing that I would like you to have in mind and to try:
Also, regarding this issue, the first error that you posted:
Was this a scheduled newsletter or did you get that error when pressing the "send out"-button? And this was from the content-section right?
I've tried a clean install of Umbraco and Newsletter Studio 2.1.9.5 and in my case it loads members both in the Newsletter Studio-section and the Content Section so we need to figure out what's wrong in your senario.
Hi Markus,
thank you very much for your detailed answer. Please find my comments below:
Where can I switch it off?
Yes, I have deleted membergroups via a webservice. Will this lead to problems with future sendouts?
I will test this and let you now
It happend when pressing the "send out"-button in the content-section. One day after the issue appeared, I could see the membergroups again, too. So it seemes to be a sporadic problem.
is working on a reply...