locked
What's mean async task error hresult 0x80860003 ?

    Question

  • Hello!

    I am trying to logging into Live.

    OnlineIdAuthenticator ^auth = ref new OnlineIdAuthenticator ();
    OnlineIdServiceTicketRequest ^request = ref new OnlineIdServiceTicketRequest ("wl.signin", "DELEGATION");
    Platform::Collections::Vector <OnlineIdServiceTicketRequest ^> ^request_vec = ref new Platform::Collections::Vector <OnlineIdServiceTicketRequest ^> ();
    request_vec->Append (request);
    
    Concurrency::create_task (auth->AuthenticateUserAsync (request_vec, CredentialPromptType::PromptIfNeeded)).then ([this] (UserIdentity ^ident)
    {
    	auto ticket = ident->Tickets->GetAt (0);
    	token = std::wstring (ticket->Value->Data ());
    });

    And get an exception:

    "An invalid parameter was passed to a function that considers invalid parameters fatal."

    Please, can anybody tell me what this error code mean 0x80860003 ?

    The exception thrown just after create_task.

    I used code samples from the Connecting to Live with the C++ REST SDK article. I seems like I did something wrong.

    Tuesday, May 14, 2013 12:30 PM

Answers

  • Thanks for reply.
    Yes I did.
    The problem was that I was changing the 'Package name' in the Package.appxmanifest in Packaging tab, by my script in PreBuild Events.

    But to me the behavior is a bit strange: when I was using the code above I've gotten the exception which I've described above.

    When I've used some changed code the behavior was interesting too:

    auto auth = ref new OnlineIdAuthenticator ();
    auto request = ref new OnlineIdServiceTicketRequest ("wl.signin wl.basic wl.photos", "DELEGATION");
    auto request_vec = ref new Platform::Collections::Vector <OnlineIdServiceTicketRequest ^> ();
    request_vec->Append (request);
    
    Concurrency::task <UserIdentity ^> authenticateUser (auth->AuthenticateUserAsync (request_vec, CredentialPromptType::RetypeCredentials));
    authenticateUser.then ([] (UserIdentity ^ident)
    {
    	ADDLOG_INFO ("Hello there!");
    	auto ticket = ident->Tickets->GetAt (0);
    	token = std::wstring (ticket->Value->Data ());
    });

    The program just never reach the continuation after then. I supposed at least the nullptr in response.

    • Marked as answer by hellobody Wednesday, May 15, 2013 7:48 AM
    Wednesday, May 15, 2013 7:47 AM

All replies

  • Looks like you also need to start the app submission process and associate your solution with the name that is reserved in the store.  Did you do that?
    Tuesday, May 14, 2013 1:11 PM
  • Thanks for reply.
    Yes I did.
    The problem was that I was changing the 'Package name' in the Package.appxmanifest in Packaging tab, by my script in PreBuild Events.

    But to me the behavior is a bit strange: when I was using the code above I've gotten the exception which I've described above.

    When I've used some changed code the behavior was interesting too:

    auto auth = ref new OnlineIdAuthenticator ();
    auto request = ref new OnlineIdServiceTicketRequest ("wl.signin wl.basic wl.photos", "DELEGATION");
    auto request_vec = ref new Platform::Collections::Vector <OnlineIdServiceTicketRequest ^> ();
    request_vec->Append (request);
    
    Concurrency::task <UserIdentity ^> authenticateUser (auth->AuthenticateUserAsync (request_vec, CredentialPromptType::RetypeCredentials));
    authenticateUser.then ([] (UserIdentity ^ident)
    {
    	ADDLOG_INFO ("Hello there!");
    	auto ticket = ident->Tickets->GetAt (0);
    	token = std::wstring (ticket->Value->Data ());
    });

    The program just never reach the continuation after then. I supposed at least the nullptr in response.

    • Marked as answer by hellobody Wednesday, May 15, 2013 7:48 AM
    Wednesday, May 15, 2013 7:47 AM