Success! Looks like we've fixed this one. According to our records the fix was applied for DSGNR-1713 in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2010
    Posts
    39
    Vote Rating
    0
    ashapiro75 is on a distinguished road

      0  

    Default - 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.

  2. #2
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    461
    Vote Rating
    15
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Would you be able to provide the project and data file that are triggering this error?
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha User anthonyterrell's Avatar
    Join Date
    Mar 2012
    Location
    Albany, NY
    Posts
    30
    Vote Rating
    0
    anthonyterrell is on a distinguished road

      0  

    Default


    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

  4. #4
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Vote Rating
    1
    joostvanhassel is on a distinguished road

      0  

    Default


    I seem to have the same problem since 341 on all my Json Stores (that all have a RestProxy).

    Sample code:

    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'
                }
            }
        }
    });
    [edit]
    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]

  5. #5
    Sencha User
    Join Date
    Oct 2010
    Posts
    39
    Vote Rating
    0
    ashapiro75 is on a distinguished road

      0  

    Default


    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.

  6. #6
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    461
    Vote Rating
    15
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    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

  7. #7
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Vote Rating
    1
    joostvanhassel is on a distinguished road

      0  

    Default


    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?

  8. #8
    Sencha User anthonyterrell's Avatar
    Join Date
    Mar 2012
    Location
    Albany, NY
    Posts
    30
    Vote Rating
    0
    anthonyterrell is on a distinguished road

      0  

    Default


    When testing the project noted from the related thread, I had to upgrade the project to open it. But still am getting the same error.
    Anthony Terrell - Developer
    [twitter] - [forrst]

  9. #9
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    461
    Vote Rating
    15
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    @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

  10. #10
    Sencha User anthonyterrell's Avatar
    Join Date
    Mar 2012
    Location
    Albany, NY
    Posts
    30
    Vote Rating
    0
    anthonyterrell is on a distinguished road

      0  

    Default


    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!
    Anthony Terrell - Developer
    [twitter] - [forrst]