nolanlawson / cordova-plugin-sqlite-2

Native SQLite database API for Cordova/PhoneGap/Ionic, modeled after WebSQL (UNMAINTAINED)
https://nolanlawson.com/2016/04/10/introducing-the-cordova-sqlite-plugin-2/
Apache License 2.0
168 stars 28 forks source link

Unhandled Promise Rejection: TypeError: JSON.stringify cannot serialize cyclic structures #77

Closed yoprogramo closed 4 years ago

yoprogramo commented 4 years ago

I have a websql database that I'm trying to convert (apple does not support anymore websql) and my table have a field with the same name of the table (in the table I have problems with) and, when I try to insert some values I receive this error:

Unhandled Promise Rejection: TypeError: JSON.stringify cannot serialize cyclic structures. callbackFromNative — cordova.js:314 (anonymous function) — cordova.js:972 promiseReactionJob

For compatibility reasons I cannot just change the name of the fields/table. There exist some other workaround?

nolanlawson commented 4 years ago

Sounds like you found a workaround?

yoprogramo commented 4 years ago

Yes, it was my fault trying to store a wrong value for the column. Fixed already in my code.