Skip to content

Invalid content type #569

@dwxw

Description

@dwxw

Environment

RN 0.77.3

Description

First time using Rock, migrated automatically. App is running in simulator and appear to be fine. However the metro bundler logs the following error several times as you use the app.

Error: Invalid content type, expected application/json
    at <snip>/node_modules/@rock-js/plugin-metro/node_modules/metro/src/lib/parseJsonBody.js:11:16
    at new Promise (<anonymous>)
    at parseJsonBody (<snip>/node_modules/@rock-js/plugin-metro/node_modules/metro/src/lib/parseJsonBody.js:7:10)
    at Server._symbolicate (<snip>/node_modules/@rock-js/plugin-metro/node_modules/metro/src/Server.js:1030:28)
    at Server._processRequest (<snip>/node_modules/@rock-js/plugin-metro/node_modules/metro/src/Server.js:460:18)
    at processRequest (<snip>/node_modules/@rock-js/plugin-metro/node_modules/metro/src/Server.js:394:10)
    at <snip>/node_modules/@sentry/react-native/dist/js/tools/metroMiddleware.js:93:16
    at call (<snip>/node_modules/connect/index.js:239:7)
    at Immediate.next (<snip>/node_modules/connect/index.js:183:5)
    at process.processImmediate (node:internal/timers:493:21)

Any ideas, maybe something is not configured correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions