New image uploads error on create but not edit / change

Hi,

I’m encountering a strange issue - in visual editor (local environment), when I click “Add Image” and upload a new image, I get the error Error: Content source not found: 'undefined:undefined'. and the upload fails.

However, when I upload the exact same file by selecting an existing image, click “Change” + “Upload” the image uploads without issue. I can then add the image anywhere in the site without issue once uploaded.

I’ve seen this issue with both a list of images and a single image.

Some debugging revealed that the srcType and srcProjectId are used to generate the content source ID, however these are both undefined in my case.

Here is the relevant config (I’m using astro and Git CMS):

export default defineStackbitConfig({
  stackbitVersion: "~0.6.0",
  ssgName: "custom",
  nodeVersion: "18",
  devCommand: "node_modules/.bin/astro dev --port {PORT} --hostname 127.0.0.1",
  experimental: {
    ssg: {
      name: "Astro",
      logPatterns: {
        up: ["is ready", "astro"],
      },
      directRoutes: {
        "socket.io": "socket.io",
      },
      passthrough: ["/vite-hmr/**"],
    },
  },
  contentSources: [
    new GitContentSource({
      rootPath: __dirname,
      contentDirs: [
        "src/content/heading",
        "src/content/posts",
        "src/content/slides",
      ],
      models: [
        ...
        {
          name: "slides",
          type: "data",
          filePath: "src/content/slides/{slug}.md",
          fields: [
            { name: "draft", type: "boolean" },
            {
              name: "images",
              type: "list",
              required: true,
              items: {
                type: "object",
                fields: [
                  { name: "img", type: "image", required: true },
                  { name: "alt", type: "string", required: true },
                ],
              },
            },
          ],
        },
        ...
      ],
      assetsConfig: {
        referenceType: "static",
        staticDir: "src/content",
        uploadDir: "_images",
        publicPath: "/src/content",
      },
    }),
  ]
});

Any help would be really appreciated as this is currently blocking me from deployment.