MailChimp.Api.Net icon indicating copy to clipboard operation
MailChimp.Api.Net copied to clipboard

not responding

Open mpevreuls opened this issue 8 years ago • 8 comments

Installed versions : [MailChimp.Api.Net 3.0.0]

Description I want to create a new campaign. Before that i want to collect a list of existing campaigns to verify if this one exist. I run the following command

MailChimpCampaigns _Campaigns = new MailChimpCampaigns();
 var x = _Campaigns.GetCampaignsAsync().Result;

The x should be a rootcampgain object with a list of campaigns in it. But this command times out/never gives results.

if i run
var x = _Campaigns.GetCampaignsAsync() i got an instant reply back, but not with a collection of existing campaigns. Just

Any ideas/suggestoins what i am doing wrong here?

Best regards, Marcel

mpevreuls avatar Nov 03 '16 11:11 mpevreuls

You are trying to read the Result before the async has completed. something like this should work... MailChimpCampaigns _Campaigns = new MailChimpCampaigns(); var m = _Campaigns.GetCampaignsAsync(); while (m.Status == TaskStatus.WaitingForActivation || m.Status == TaskStatus.WaitingForChildrenToComplete || m.Status == TaskStatus.WaitingToRun) { Thread.Sleep(100); } var x = m.Result; However when I tried it I am getting an exception Could not convert string to integer: {listID}. Path 'campaigns[0].settings.folder_id', line 1, position 643. {listID} was one of my lists. The lsitId is not necessarily numeric characters only. This might be a bug, I am not sure.

RusselRillema avatar Nov 03 '16 11:11 RusselRillema

It seems to get stuck in a loop. Below the code. If i put a breakpoint on the sleep it will hit it, so i am sure it still runs. Also the status of M in the watchwindow keeps (not yet completed).

Could it take that long??

image

mpevreuls avatar Nov 03 '16 12:11 mpevreuls

So to confirm the break point on line 29 never gets hit?

RusselRillema avatar Nov 03 '16 12:11 RusselRillema

Correct. Up to this moment (13.39 ) it is not being hit. It is running now for over 15 minutes

mpevreuls avatar Nov 03 '16 12:11 mpevreuls

That is kind of strange. It worked perfectly for me. Took a couple seconds for the async operation to finish. I am not so sure what else to suggest. I only just started using Mailchimp.Api.Net this morning. Sorry I couldn't be more help.

RusselRillema avatar Nov 03 '16 12:11 RusselRillema

now worries, i will keep digging until i find the cause of this.

mpevreuls avatar Nov 03 '16 12:11 mpevreuls

I have the same issue, was it solved somehow?

villian avatar May 05 '17 16:05 villian

I'm also gettting same issue.

gopalsingh51 avatar Jul 17 '17 17:07 gopalsingh51