[cli] Remove rawBody handling on /symbolicate endpoint#35757
Conversation
eb22657 to
c30f810
Compare
c30f810 to
58465ee
Compare
|
I approved the CI for this PR, but we can only merge this once the Metro changes are published and we switched over to that Metro version on |
|
Subscribed to pull request
Generated by CodeMention |
|
@byCedric Cool, makes sense. I've published the PR; we'll come back to it later. |
58465ee to
aab8c03
Compare
|
Push: Resolve CHANGELOG.md conflict. @byCedric I think if Expo has updated Metro by now, we can E2E validate this and merge. |
|
@byCedric We shipped Metro 0.82.2 with the relevant change. |
|
We can't merge this until all requests to Edit: This seems to be a trivial update for, us so I'll file a replacement PR |
…ddleware` (#43074) # Why Supersedes #35757 > This removes a longstanding hack that covered for a lack of JSON body parsing in Metro's `/symbolicate` endpoint. We're now resolving this in react/metro#1475 — meaning this can be removed from Expo CLI. > — @huntie This also raised that we had two calls to `/symbolicate` that weren't being called with `application/json`. However, without the `rawBody` property, Metro's middlewares now expect the `Content-Type: application/json` header. # How - Update `@expo/log-box` to set `Content-Type: application/json` on JSON POST requests - Update `@expo/cli` to set `Content-Type: application/json` on internal `/symbolicate` request - Drop `rawBodyMiddleware` from CLI's `createMetroMiddleware` - Replace `rawBody` with JSON body parsing for `/open-stack-frame` # Test Plan - Run app and cause an error with a stack trace - The `/symbolicate` call should work as before - Clicking a frame, `/open-stack-frame` should work as before # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
Why
This removes a longstanding hack that covered for a lack of JSON body parsing in Metro's
/symbolicateendpoint. We're now resolving this in react/metro#1475 — meaning this can be removed from Expo CLI.Related PRs:
How
Delete interception of
/symbolicatein Expo CLI middleware stack.Test Plan
metrointo a local checkout of Expo viayarn link.cd apps/bare-expoyarn ios[Incoming]
Important
We'll wait for the relevant release of Metro to land on
mainfirst. See @byCedric's comment below.Checklist
changelog.mdentry and rebuilt the package sources according to this short guidenpx expo prebuild& EAS Build (eg: updated a module plugin).