๐Ÿ“ฃ The forum has moved to GitHub

Weโ€™ve switched to GitHub Discussions as the hub for our community. This will improve the experience of collaborating for everyone, sharing what youโ€™re working on, and discussing ideas for how Swell can be improved. Existing threads will remain open, but new posts are disabled.

Go to GitHub โ†’

Are you experiencing platform instability with the admin console.

I am receiving blank pages and random errors with the admin console for my store. There is no reported outage on the status pages. Are there problems that are not reported to the status panel going on right now?

Answers

  • Today we have yet another problem in console - or maybe the same one showing up differently. I was adding categories, and the console crashed and showed a blank page.

    Upon investigation, I found that the console is paging through category results pages that don't exist (I have 10s of categories and sub-categories so far, not hundreds). The number of network requests gets into the thousands before switching to the network tab in dev tools.

    FWIW, with problems with the core product like this one, I cannot turn this over to non-technical employees to manage. Meaning I cannot launch a site and move on as planned. Being unable to hand this off cleanly makes me think I should reconsider my choice of Swell as the platform for my store (as does the lack of response for the last two days).

  • So I was able to spend time debugging this today. This problem appears because the database is only returning 25 categories, and the "count" property indicates there are 26. This mismatch seems to cause the getAll function to go into an infinite loop (the only loop control is in is "count" === "results.length" in main.9979e20a.js, line 8899 when formatted in the dev tools).

    I will do some mutations to see if I can get the count to match the actual result count and break out of this.

    If Swell wants to look into the issue, here is the example result that is causing the problem - I have replaced names with random strings, IDs are the same. The JSON is taken from the dev tools network response, but it is the same in the API console.

    {
      "count": 26,
      "results": [
        {
          "name": "Random String 1",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-1",
          "top_id": null,
          "date_created": "2021-11-01T19:58:29.829Z",
          "id": "618046e5ad764b7f776507f9"
        },
        {
          "name": "Random String 2",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-2",
          "top_id": null,
          "date_created": "2021-11-01T19:57:53.333Z",
          "id": "618046b1ad764b7f7763d5ae"
        },
        {
          "name": "Random String 3",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-3",
          "top_id": null,
          "date_created": "2021-11-01T19:57:25.289Z",
          "id": "618046a5ad764b7f7763cdc6"
        },
        {
          "name": "Random String 4",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-4",
          "top_id": null,
          "date_created": "2021-11-01T19:57:09.711Z",
          "id": "61804695e96b7e7fa2847e68"
        },
        {
          "name": "Random String 5",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-5",
          "top_id": null,
          "date_created": "2021-11-01T19:57:00.365Z",
          "id": "6180468cfcb1e27f8d9d5721"
        },
        {
          "name": "Random String 6",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-6",
          "top_id": null,
          "date_created": "2021-11-01T19:56:42.227Z",
          "id": "6180467aad764b7f7763c0b2"
        },
        {
          "name": "Random String 7",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-7",
          "top_id": null,
          "date_created": "2021-11-01T19:56:36.125Z",
          "id": "61804674e5b2db7ee3160dbe"
        },
        {
          "name": "Random String 8",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-8",
          "top_id": null,
          "date_created": "2021-11-01T19:56:14.497Z",
          "id": "6180465e5851757fb9fbee63"
        },
        {
          "name": "Random String 9",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-9",
          "top_id": null,
          "date_created": "2021-11-01T19:55:57.648Z",
          "id": "6180464dfcb1e27f8d9d5157"
        },
        {
          "name": "Random String 10",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-10",
          "top_id": null,
          "date_created": "2021-11-01T19:55:28.256Z",
          "id": "61804630e96b7e7fa2847dee"
        },
        {
          "name": "Random String 11",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-11",
          "top_id": null,
          "date_created": "2021-11-01T19:55:11.884Z",
          "id": "6180461fad764b7f7763b549"
        },
        {
          "name": "Random String 12",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-12",
          "top_id": null,
          "date_created": "2021-11-01T19:54:53.267Z",
          "id": "6180460d5851757fb9fbe58c"
        },
        {
          "name": "Random String 13",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "617c3424193ba509b0e6663c",
          "slug": "random-slug-13",
          "top_id": "617c3424193ba509b0e6663c",
          "date_created": "2021-11-01T19:53:37.569Z",
          "id": "618045c100f4977f49f2500b"
        },
        {
          "name": "Random String 14",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "6180452d5851757fb9fbdb02",
          "slug": "random-slug-14",
          "top_id": "6180452d5851757fb9fbdb02",
          "date_created": "2021-11-01T19:52:04.012Z",
          "date_updated": "2021-11-01T19:52:38.071Z",
          "sort": 0,
          "id": "618045643de36c7f63eaff49"
        },
        {
          "name": "Random String 15",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-15",
          "top_id": null,
          "date_created": "2021-11-01T19:51:09.434Z",
          "date_updated": "2021-11-01T19:52:38.069Z",
          "sort": 3,
          "id": "6180452d5851757fb9fbdb02"
        },
        {
          "name": "Random String 16",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "6180452d5851757fb9fbdb02",
          "slug": "random-slug-16",
          "top_id": "6180452d5851757fb9fbdb02",
          "date_created": "2021-10-29T17:58:53.541Z",
          "date_updated": "2021-11-01T19:52:38.074Z",
          "sort": 3,
          "id": "617c365db9435d0e8e3e2df2"
        },
        {
          "name": "Random String 17",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "617c3424193ba509b0e6663c",
          "slug": "random-slug-17",
          "top_id": "617c3424193ba509b0e6663c",
          "date_created": "2021-10-29T17:57:57.899Z",
          "date_updated": "2021-11-01T19:53:14.971Z",
          "sort": 2,
          "id": "617c36258b13b3699806a921"
        },
        {
          "name": "Random String 18",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "6180452d5851757fb9fbdb02",
          "slug": "random-slug-18",
          "top_id": "6180452d5851757fb9fbdb02",
          "date_created": "2021-10-29T17:56:30.509Z",
          "date_updated": "2021-11-01T19:52:51.058Z",
          "sort": 4,
          "id": "617c35ce62a3ce6921de8cbe"
        },
        {
          "name": "Random String 19",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "617c3424193ba509b0e6663c",
          "slug": "random-slug-19",
          "top_id": "617c33fe62a3ce6921dc4249",
          "date_created": "2021-10-29T17:56:12.790Z",
          "date_updated": "2021-11-01T19:52:38.084Z",
          "sort": 1,
          "id": "617c35bc193ba509b0e8389e"
        },
        {
          "name": "Random String 20",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "6180452d5851757fb9fbdb02",
          "slug": "random-slug-20",
          "top_id": "6180452d5851757fb9fbdb02",
          "date_created": "2021-10-29T17:55:50.355Z",
          "date_updated": "2021-11-01T19:53:04.894Z",
          "sort": 1,
          "id": "617c35a63186af6937db8e0d"
        },
        {
          "name": "Random String 21",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "6180452d5851757fb9fbdb02",
          "slug": "random-slug-21",
          "top_id": "6180452d5851757fb9fbdb02",
          "date_created": "2021-10-29T17:55:24.845Z",
          "date_updated": "2021-11-01T19:52:38.076Z",
          "sort": 2,
          "id": "617c358c193ba509b0e832fe"
        },
        {
          "name": "Random String 22",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": "617c3424193ba509b0e6663c",
          "slug": "random-slug-22",
          "top_id": "617c33fe62a3ce6921dc4249",
          "date_created": "2021-10-29T17:53:20.108Z",
          "date_updated": "2021-11-01T19:52:38.083Z",
          "sort": 0,
          "id": "617c351062a3ce6921dda131"
        },
        {
          "name": "Random String 23",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-23",
          "top_id": null,
          "date_created": "2021-10-29T17:49:24.250Z",
          "date_updated": "2021-11-01T19:52:38.068Z",
          "sort": 2,
          "id": "617c3424193ba509b0e6663c"
        },
        {
          "name": "Random String 24",
          "active": true,
          "sorting": null,
          "images": null,
          "description": null,
          "meta_title": null,
          "meta_description": null,
          "parent_id": null,
          "slug": "random-slug-24",
          "top_id": null,
          "date_created": "2021-10-29T17:48:46.940Z",
          "date_updated": "2021-11-01T19:52:38.091Z",
          "sort": 1,
          "id": "617c33fe62a3ce6921dc4249"
        },
        {
          "name": "Random String 25",
          "active": true,
          "demo": true,
          "slug": "random-slug-25",
          "top_id": null,
          "date_created": "2021-10-13T18:43:22.433Z",
          "date_updated": "2021-11-01T19:52:38.096Z",
          "sort": 0,
          "id": "616728c9374a5c02339db177"
        }
      ],
      "page": 1
    }
    
    
  • Another quick update. I have deleted all categories and still get a count of 1. No hope of fixing this myself.

    {
      "count": 1,
      "results": [],
      "page": 1
    }
    


  • Hi @James Straub , thanks for bringing this to the team's attention, and for digging into the potential cause. And apologies for the delayed response!

    The issue does seem to be limited to the one storefront. We're working on finding a solution ASAP; will respond here once I've got an update.

  • Greg,

    Thanks for the response. When you say limited to one storefront you mean the Lulilu storefront? That is good to know but it still seems systemic and not something that I did. The uncontrolled loop seems to be a problem - would someone ever have thousands of pages of categories to page through?

    Also, this doesnโ€™t seem to me to be an issue with the UI or UX (user flow) for the console. My thoughts when looking at the issue was maybe a race condition in the data layer. A MongoDB write consistency or collision issue? I would be happy, since it is only my storefront, to investigate this more, but I donโ€™t believe that I have direct access to the cluster.

    Below is what I was doing when the problem arose:

    • I was creating categories and reparenting them in the console.
    • The console at one point locked up after saving a category (actually a sub-category).
    • I reloaded the page and continued to create and reparent categories.
    • At least one of the categories was not created correctly. Page never โ€œreloadedโ€ and progress bar held at ~90% after a minute or so. This is the console instability that I originally reported.
    • I recreated it the category. I do not remember which category specifically.
    • Eventually the page โ€œcrashedโ€ with a white page.

    OS/Browser : MacOS 15.0.1/ Safari 15 (loop issue verified in the latest Chrome Browser)

    -james

  • Hi James, The additional details were received and I have logged them into our system for our engineers to review.

  • @James Straub that's some awesome detective work.

    The Swell API does have an internal count mechanism that can potentially (but very rarely) get out of sync, and as you discovered, the getAll function doesn't react well to it. We'll implement a fix for that shortly, but in the meantime I went ahead and fixed your categories collection manually so you should no longer have an infinite loop.

    The way to fix this yourself if it ever happens is to add `$recount: true` to an API query, for example `GET /categories?$recount=true`, which tells the system to force a re-count of the collection, and as you might imagine that parameter exists because we've seen this happen before a couple of times.

    Thanks so much for the input here!

  • At some point we've started getting Notifications page crashing in Swell, and the reason seems to be the same as mentioned above.


  • Hello @James Straub and @Apply Digital

    I wanted to let you know that a fix has been released for this reported issue with category results/count mismatches causing infinite loops. I understand that it has been a while since the issue was initially reported, and we do apologize that it has taken this long to get the fix out. We are working on improving our turnaround time on reported issues.

    If you experience any continued issues regarding this, please let us know.

Sign In or Register to comment.