React Native Maps PayloadTooLargeError

Viewed 37

I am currently working on a map project using React Native and Expo CLI. I am getting the markers data from firestore (data size is notably small, only around 15 markers), and when I render the map, the map works perfectly except that it is very slow, and I always receive this message for PayloadTooLargeError. After loading the maps, the whole app becomes unresponsive

PayloadTooLargeError: request entity too large
    at readStream (C:\Users\user\AppData\Roaming\npm\node_modules\expo-cli\node_modules\raw-body\index.js:155:17)
    at getRawBody (C:\Users\user\AppData\Roaming\npm\node_modules\expo-cli\node_modules\raw-body\index.js:108:12)
    at read (C:\Users\user\AppData\Roaming\npm\node_modules\expo-cli\node_modules\body-parser\lib\read.js:77:3)
    at jsonParser (C:\Users\user\AppData\Roaming\npm\node_modules\expo-cli\node_modules\body-parser\lib\types\json.js:135:5)
    at call (root\node_modules\connect\index.js:239:7)
    at next (root\node_modules\connect\index.js:183:5)
    at remoteDevtoolsCorsMiddleware (C:\Users\user\AppData\Roaming\npm\node_modules\expo-cli\node_modules\@expo\dev-server\src\middleware\remoteDevtoolsCorsMiddleware.ts:31:3)
    at call (root\node_modules\connect\index.js:239:7)
    at next (root\node_modules\connect\index.js:183:5)
    at serveStatic (root\node_modules\serve-static\index.js:75:16)

I've seen several solutions such as to set a limit in express js, however I did not add any code for the backend part and now I am confused on how to solve this problem.

0 Answers
Related