0

I'm trying this:

ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:
                               [NSURL URLWithString:my_url]];
[request setPostValue:id_ forKey:@"id_source"];
[request setPostValue:email forKey:@"email"];

[request startSynchronous];

And I got from console

wait_fences: failed to receive reply: 10004003

Which is something internal.

Do you have idea why? I'm trying the form for real, from browser, and it works with no problems. Don't have error in the URL, or in any parameter.

VLAZ
  • 26,331
  • 9
  • 49
  • 67
Danail
  • 10,443
  • 12
  • 54
  • 76

1 Answers1

1

To debug the request, try getting the `response in this way:

NSError *error = [request error];
if (!error) {
  NSString *response = [request responseString];
}

error should tell you everything you need to know, and should shield your response from any problems. Here's a good post on NSError, if you haven't done this before.

About the existing wait_fences thing... I think I've got this one figured out, based on some other sources listed below.

it looks like this issue comes about when an input field fails to resign its firstResponder status. My long shot guess is that the keyboard that's helping you populate the form you're processing isn't resigning its status as firstResponder.

so, in your view controller, assuming you've got a text field declared, you might try this:

- (void)viewDidLoad
{
    // set up the text field
    [self.textField setDelegate:self];

    [self.textField addTarget:self
                  action:@selector(textFieldFinished:)
        forControlEvents:UIControlEventEditingDidEndOnExit];

    [super viewDidLoad];
}

- (IBAction)textFieldFinished:(id)sender
{
    [sender resignFirstResponder];
}

Some posts I looked at to form this opinion:

"wait_fences: failed to receive reply: 10004003"?

http://www.iphonedevsdk.com/forum/iphone-sdk-development-advanced-discussion/17373-wait_fences-failed-receive-reply-10004003-a.html

http://discussions.apple.com/thread.jspa?threadID=2014220

Community
  • 1
  • 1
Sam Ritchie
  • 10,988
  • 4
  • 42
  • 53