Skip to content

"API_ERROR: Unknown error" when using npx netlify-cms-proxy-server #5472

@JWesorick

Description

@JWesorick

Describe the bug

When using netlify local backend, and navigating to edit pages, it fails with `API_ERROR: Unknown error". (On just viewing the edit page, not on save.)

To Reproduce

  1. npx netlify-cms-proxy-server
  2. gatsby develop
  3. Go to /admin.
  4. Click on a page to edit, in my case "Teachings", click on a teaching.

Expected behavior

Expect to be able to edit pages.

Screenshots

Screen Shot 2021-06-06 at 3 28 33 PM

Applicable Versions:

  • Netlify CMS version: [e.g. 2.0.4] netlify-cms-app@2.15.17
  • Git provider: [e.g. GitHub, BitBucket] GitHub
  • OS: [e.g. Windows 7] MacOS (M1)
  • Browser version [e.g. chrome 22, safari 11] Chrome 91.0.4472.77, Firefox 89.0
  • Node.JS version: 14.3.0
  • NPM: 7.10.0
  • Gatsby: 3.6.2

CMS configuration

Additional context

API_ERROR: Unknown error
    t http://localhost:8000/admin/netlify-cms-app.js:54
    i http://localhost:8000/admin/netlify-cms-app.js:54
    request http://localhost:8000/admin/netlify-cms-app.js:493
    getMedia http://localhost:8000/admin/netlify-cms-app.js:493
    getMedia http://localhost:8000/admin/netlify-cms-app.js:28
    f http://localhost:8000/admin/netlify-cms-app.js:34
    loadMedia http://localhost:8000/admin/netlify-cms-app.js:34
    r http://localhost:8000/admin/netlify-cms-app.js:164
    r http://localhost:8000/admin/netlify-cms-app.js:22
    componentDidMount http://localhost:8000/admin/netlify-cms-app.js:216
    React 12
    notify http://localhost:8000/admin/netlify-cms-app.js:22
    notifyNestedSubs http://localhost:8000/admin/netlify-cms-app.js:22
    handleChangeWrapper http://localhost:8000/admin/netlify-cms-app.js:22
    v http://localhost:8000/admin/netlify-cms-app.js:43
    waitUntilAction http://localhost:8000/admin/netlify-cms-app.js:58
    r http://localhost:8000/admin/netlify-cms-app.js:164
    dispatch http://localhost:8000/admin/netlify-cms-app.js:43
    authenticateUser http://localhost:8000/admin/netlify-cms-app.js:43
    promise callback*t.authenticateUser/< http://localhost:8000/admin/netlify-cms-app.js:43
    r http://localhost:8000/admin/netlify-cms-app.js:164
    _ http://localhost:8000/admin/netlify-cms-app.js:148
    loadConfig http://localhost:8000/admin/netlify-cms-app.js:43
    r http://localhost:8000/admin/netlify-cms-app.js:164
    _ http://localhost:8000/admin/netlify-cms-app.js:148
    js http://localhost:8000/admin/cms.js:14361
    factory http://localhost:8000/admin/cms.js:48787
    __webpack_require__ http://localhost:8000/admin/cms.js:48180
    <anonymous> http://localhost:8000/admin/cms.js:49495
    <anonymous> http://localhost:8000/admin/cms.js:49499
netlify-cms-app.js:34:39826
    f http://localhost:8000/admin/netlify-cms-app.js:34
    (Async: promise callback)
    f http://localhost:8000/admin/netlify-cms-app.js:34
    loadMedia http://localhost:8000/admin/netlify-cms-app.js:34
    r http://localhost:8000/admin/netlify-cms-app.js:164
    r http://localhost:8000/admin/netlify-cms-app.js:22
    componentDidMount http://localhost:8000/admin/netlify-cms-app.js:216
    React 12
    notify http://localhost:8000/admin/netlify-cms-app.js:22
    notifyNestedSubs http://localhost:8000/admin/netlify-cms-app.js:22
    handleChangeWrapper http://localhost:8000/admin/netlify-cms-app.js:22
    v http://localhost:8000/admin/netlify-cms-app.js:43
    waitUntilAction http://localhost:8000/admin/netlify-cms-app.js:58
    r http://localhost:8000/admin/netlify-cms-app.js:164
    dispatch http://localhost:8000/admin/netlify-cms-app.js:43
    authenticateUser http://localhost:8000/admin/netlify-cms-app.js:43
    (Async: promise callback)
    authenticateUser http://localhost:8000/admin/netlify-cms-app.js:43
    r http://localhost:8000/admin/netlify-cms-app.js:164
    _ http://localhost:8000/admin/netlify-cms-app.js:148
    loadConfig http://localhost:8000/admin/netlify-cms-app.js:43
    r http://localhost:8000/admin/netlify-cms-app.js:164
    _ http://localhost:8000/admin/netlify-cms-app.js:148
    js http://localhost:8000/admin/cms.js:14361
    factory http://localhost:8000/admin/cms.js:48787
    __webpack_require__ http://localhost:8000/admin/cms.js:48180
    <anonymous> http://localhost:8000/admin/cms.js:49495
    <anonymous> http://localhost:8000/admin/cms.js:49499

POST http://localhost:8081/api/v1
request: {"branch":"master","action":"getMedia","params":{"branch":"master","mediaFolder":"static/media"}}
response: {"error":"Unknown error"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions