-
27 Mar 2012 4:06 AM #1
- Update 341 JSON.stringify cannot serialize cyclic structures.
- Update 341 JSON.stringify cannot serialize cyclic structures.
I was trying to work with a project that I had going yesterday with build 337 that worked fine, it would load my data. I upgraded to 341 and now I get JSON.stringify cannot serialize cyclic structures.
To test what I did then was go into the directory where the json file was being stored and I removed it. I figured I would get some kind of missing file or object type error. Instead I got the same error. JSON.stringify cannot serialize cyclic structures.
So I don't think it had anything to do with my data format, my data format is still working on my mac at home which is version 337.
-
27 Mar 2012 7:42 AM #2
Would you be able to provide the project and data file that are triggering this error?
Jason Johnston
@lojjic
Sencha Architect Development Team
-
28 Mar 2012 6:07 AM #3
I have received this error as well while testing someone else's nested list code. There is another related thread with the same issue. I wonder if this is just an issue with the newest build?
Thanks
-
28 Mar 2012 6:59 AM #4
I seem to have the same problem since 341 on all my Json Stores (that all have a RestProxy).
Sample code:
[edit]Code:Ext.define('MyApp.store.CustomerStore', { extend: 'Ext.data.Store', requires: [ 'MyApp.model.Customer' ], config: { model: 'MyApp.model.Customer', storeId: 'CustomerStore', proxy: { type: 'rest', url: 'http://localhost:81/Customer/', reader: { type: 'json', messageProperty: 'ErrorMessage', rootProperty: 'Customers' } } } });
Might I add that this problem only occurs within Designer? I get the error if I use 'Load Data', if I test my application in a browser, loading stores works just fine.
Thought: maybe the 'rootProperty' of the JsonReader isn't respected in Designer since build 341?
[/edit]
-
28 Mar 2012 7:07 AM #5
I don't have the project as it was anymore, however the thread that was referenced here does have a project that I was having this issue with as well.
Unfortunately I can not recreate the error, it just seems to happen randomly. The next time it happens I will save off the project and post a copy of it.
-
28 Mar 2012 7:29 AM #6
Thanks guys. I have tried reproducing this based on the info here:
- Combinations of rest proxy pointing to a local json file, with json reader plus rootProperty
- The sample project linked to from the other thread, using the nested json tree data supplied there as well as my own
In all cases the store is able to load its data correctly without giving this error. I'm sure there's some edge case I'm just not hitting. If any of you can provide a testcase project that triggers this it would help immensely.Jason Johnston
@lojjic
Sencha Architect Development Team
-
28 Mar 2012 7:39 AM #7
Euhm, well I just copied some of my code (the Model and the Store, Proxy & Reader) over to a new project to provide you with a sample; everything works fine in the fresh project
.
Restarted Designer on my full project: problem solved! Stores now all load Data (no changes to code).
As it doesn't seem to be a problem in code; do you still need my sample project?
-
28 Mar 2012 7:47 AM #8
-
28 Mar 2012 7:57 AM #9
@joostvanhassel: Interesting. If your project doesn't throw the error anymore then it wouldn't be much help. But if this crops up again for you can you go ahead and send it to us, either by PM or by email to designer.feedback@sencha.com
@anthonyterrell: I did the same thing, and after the upgrade process it opened without issue and the store loads its data without error (after updating my URL Prefix to the correct path for my local server). Did you take any special steps other than opening the project and loading the store?Jason Johnston
@lojjic
Sencha Architect Development Team
-
28 Mar 2012 8:02 AM #10
I simply downloaded the project and opened up the sencha designer file. After the update process I right clicked the store and loaded the data, this is where I get the error. I did not try and preview the app or set my url prefix to my local environment.
Currently running v2 Build 341. Thanks for the assistance!
Success! Looks like we've fixed this one. According to our records the fix was applied for
DSGNR-1713
in
Architect 2.0.


Reply With Quote