Failed to save to data store: The operation couldn’t be completed. (Cocoa error 133020.)

Posted by poslinski.net on Stack Overflow See other posts from Stack Overflow or by poslinski.net
Published on 2011-01-07T11:56:34Z Indexed on 2011/01/07 17:53 UTC
Read the original article Hit count: 535

Filed under:
|
|

I am working on quite complex app with huge sync procedure beetwen iphone and web server. I have no troubles with adding records, until I run sync procedure in separete thread, and It will update data on serwer, and send them back to iphone. But after this procedure, inserting new data cause error, such as this:

2011-01-07 12:49:10.722 App[1987:207] Failed to save to data store: The operation couldn’t be completed. (Cocoa error 133020.)
2011-01-07 12:49:10.724 App[1987:207]   {
    conflictList =     (
        "NSMergeConflict (0x5ac1ea0) for NSManagedObject (0x5a2d710) with objectID '0x5a27080 <x-coredata://E82E75ED-96DB-4CBF-9D15-9CC106AC0052/uzytkownicy/p10>' with oldVersion = 9 and newVersion = 21 and old object snapshot = {\n    adres = \"<null>\";\n    haslo = xxxxxxxxxxxxxxxxxxxxxx;\n    \"id_uzytkownika\" = 3;\n    imie = Jan;\n    \"kod_jednorazowy\" = 0;\n    komorka = \"<null>\";\n    login = nowakjan;\n    nazwisko = Nowak;\n    pesel = 0;\n    rodzaj = 2;\n    \"stan_konta\" = 0;\n    telefon = \"<null>\";\n    \"uzytkownicy_uczniowie\" = \"<null>\";\n    \"zmienna_losowa\" = 8G9e1;\n} and new cached row = {\n    adres = \"<null>\";\n    haslo = xxxxxxxxxxxxxxxxxxxxxx;\n    \"id_uzytkownika\" = 3;\n    imie = Jan;\n    \"kod_jednorazowy\" = 0;\n    komorka = \"<null>\";\n    login = nowakjan;\n    nazwisko = Nowak;\n    pesel = 0;\n    rodzaj = 2;\n    \"stan_konta\" = 0;\n    telefon = \"<null>\";\n    \"uzytkownicy_uczniowie\" = \"<null>\";\n    \"zmienna_losowa\" = 8G9e1;\n}",
        "NSMergeConflict (0xd266990) for NSManagedObject (0xcd05950) with objectID '0x5a453b0 <x-coredata://E82E75ED-96DB-4CBF-9D15-9CC106AC0052/uczniowie/p125>' with oldVersion = 5 and newVersion = 10 and old object snapshot = {\n    adres = \"Warszawa; ul. Lwowska 32\";\n    \"data_urodzenia\" = \"1997-02-01 23:00:00 +0000\";\n    dysfunkcje = \"\";\n    email = \"<null>\";\n    frekwencja = 0;\n    \"id_ucznia\" = 86;\n    imie2 = Marian;\n    \"imie_ucznia\" = \"S\\U0142awomir\";\n    klasa = \"0x5a47820 <x-coredata://E82E75ED-96DB-4CBF-9D15-9CC106AC0052/zespoly/p9>\";\n    komorka = \"<null>\";\n    \"miejsce_urodzenia\" = Warszawa;\n    \"nazwisko_ucznia\" = \"S\\U0142awek\";\n    \"numer_ewidencyjny\" = 20;\n    opiekun1 = \"Mariusz S\\U0142awek\";\n    opiekun2 = \" \";\n    pesel = 97020298919;\n    plec = 1;\n    telefon = 890000002;\n    \"uzytkownicy_uczniowie\" = \"<null>\";\n    \"web_klasa\" = 50;\n} and new cached row = {\n    adres = \"Warszawa; ul. Lwowska 32\";\n    \"data_urodzenia\" = \"1997-02-01 23:00:00 +0000\";\n    dysfunkcje = \"\";\n    email = \"<null>\";\n    frekwencja = 0;\n    \"id_ucznia\" = 86;\n    imie2 = Marian;\n    \"imie_ucznia\" = \"S\\U0142awomir\";\n    klasa = \"0x5a8e7c0 <x-coredata://E82E75ED-96DB-4CBF-9D15-9CC106AC0052/zespoly/p9>\";\n    komorka = \"<null>\";\n    \"miejsce_urodzenia\" = Warszawa;\n    \"nazwisko_ucznia\" = \"S\\U0142awek\";\n    \"numer_ewidencyjny\" = 20;\n    opiekun1 = \"Mariusz S\\U0142awek\";\n    opiekun2 = \" \";\n    pesel = 97020298919;\n    plec = 1;\n    telefon = 890000002;\n    \"uzytkownicy_uczniowie\" = \"<null>\";\n    \"web_klasa\" = 50;\n}",
        "NSMergeConflict (0xd2669b0) for NSManagedObject (0x5a44480) with objectID '0x5a47830 <x-coredata://E82E75ED-96DB-4CBF-9D15-9CC106AC0052/przedmioty/p12>' with oldVersion = 7 and newVersion = 15 and old object snapshot = {\n    \"id_przedmiotu\" = 1;\n    \"nazwa_przedmiotu\" = Historia;\n    \"skrot_nazwy\" = Hist;\n} and new cached row = {\n    \"id_przedmiotu\" = 1;\n    \"nazwa_przedmiotu\" = Historia;\n    \"skrot_nazwy\" = Hist;\n}"
    );
}

I've been looking for any solution but without luck.

Thank You in advance for any usefull help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios