8000 Symbolicate fails when using metro CLI directly · Issue #660 · facebook/metro · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Symbolicate fails when using metro CLI directly #660
Open
@rockwotj

Description

@rockwotj

Do you want to request a feature or report a bug?

Bug 🐛

What is the current behavior?

When running the metro CLI directly there are many errors like:

SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at node_modules/metro/src/Server.js:1025:28
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (node_modules/metro/src/Server.js:99:24)
    at _next (node_modules/metro/src/Server.js:119:9)

Some debugging shows that rawBody is undefined and it's trying to be json parsed.

There is a comment in the code about not understanding where rawBody comes from:

/* $FlowFixMe: where is `rawBody` defined? Is it added by the `connect` framework? */
const body = await req.rawBody;

I believe this isn't a bigger issue because the react native CLI provides this middleware automatically:

https://github.com/react-native-community/cli/blob/760708fc3216aee565f59877a103a7e35df2d77d/packages/cli-server-api/src/index.ts#L60

Should that middleware be moved down a layer or the code rewritten to not use this field?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0