cancel
Showing results for 
Search instead for 
Did you mean: 

'SUPPersistenceException', reason: 'constraint failed'

Former Member
0 Kudos

Hi everyone,

i am developing ios native app using SUP 2.1.2

app is working fine in online mode i.e. proper login and logout many times

and in offline mode i.e. when it giving me the error

Terminating app due to uncaught exception 'SUPPersistenceException', reason: 'constraint failed'

any help

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi everybody,

We are running SUP 2.2 SP04 on iOS 6.1.4 and 7.0.2. The local database throws a SUPPersistenceException while doing queries. We have not found a way to reproduce this issue at will. We are currently testing the application and the problems can be seen on a daily basis on several devices. Can you please advice on how to avoid the 102 error?

Thanks

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Juan Ramon Azcarate Velazquez

Please raise a new thread.

Rgrds,

Jitendra

midhun_vp
Active Contributor
0 Kudos

Is this issue resolved ?

- Midhun VP

midhun_vp
Active Contributor
0 Kudos

What you are trying to do in offline mode ?

In SCC check whether you registered user has any pending items and other properties of the user is proper (domain is assigned to this user or not). Are you using offlineLogin API while running app in offline (even its deprecated).

- Midhun VP

Former Member
0 Kudos

Hi,

i found some more description

Error: 514 Detail: Unable to start traveler session Source: /Users/iotabuilder/svn/Pioneer/MOClients/iPhone/../Common/C/moClient.cpp 951.","connstatus":"Disconnected"

midhun_vp
Active Contributor
0 Kudos

Firstly, I don't understand why you are doing a submitpending in logout? In the world of smartphones the logout is required when you want to delete every data in that app and come out. Smartphones are based on multi tasking. It allows you to run the multiple apps at a time. When the stack is full the last app will be killed automatically by the mobile OS.

So when the user wants to logout from the app you can write the code to clear the local DB and unregister the user. The submit pending you can use when the user do some operations when the device is offline.

Have a look at how other apps like Facebook or Gmail or SAP released app itself. The user never logout from the app each time after a transaction.

The issue is like the app is not connected when you are running the app for second time. That result in this issue. When you can do is, add a splash screen, in the background run the code for registration/connection when the app runs for the second time if the app is killed by OS or user. If the device is offline you can use offlineLogin API to login to the app (but it is deprecated).

- Midhun VP

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ajim,


and in offline mode i.e. when it giving me the error


how is sync happening once you do any transaction in offline and make it available online?

manual or automatic?

can you please look at server log for more details. I am sure you will get some more inputs from there itself.

Rgrds,

Jitendra

Former Member
0 Kudos

Hi Jitendra,

ok , i explain where app is crashing,

when the internet connection is there it allow me to log in and log out

but when net connection is not there and i do logout after that it showing the above errors on login time i am using submitpending operations on logout code