expo publish issue

I get error socket hang up


raven@2.6.3 alert: failed to send exception to sentry: HTTP Error (413): undefined
please help !

expo diagnostics
Expo CLI 3.0.10 environment info:
System:
OS: Windows 10
Binaries:
Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.11.3 - C:\Program Files\nodejs\npm.CMD

Hey @shadymoner,

A 413 error indicates the payload is too large. Can you run expo export --public-url <any_https_url> and check size of bundle and assets in dist directory? It’s likely that your JS bundles exceed the 30MB upload limit we have in place. If that’s the case, you will definitely want to trim that way down as it will make for a terrible user experience both in terms of performance and cost of data for them. As each subsequent OTA update will be much heavier and expensive.

Cheers,
Adam

There should of course be only two dashes before public-url. e.g.:

expo export --public-url https://example.com

It will create a dist subdirectory containing the assets, bundles and a couple of JSON files.

@adamjnav, by the way, what exactly should be under the 30 MB limit? The whole of dist? Each bundle? All assets together? Each asset?

Thanks.

@adamjnav @wodin 
I executed this command and found that my bundles size is 48 mb and my assets 12 mb  so 
1- how can I reduces my JS bundles ?
2- what do you mean by 30mb for all my bundles and assests or just bundles ?
3-  how can I publish demo version for testing , I tried expo publish and it failed ,is there another way to do this ??
thanks in advance

The infraction here is the 48 MB that is made up of both your iOS and Android bundles. It is most likely the result of some third-party packages you have installed. I would recommend using a Bundle Visualizer to help get insight into what the culprit packages may be. GitHub - IjzerenHein/react-native-bundle-visualizer at v2

1 Like

@adamjnav
I tried it , but i can`t reduce my app size here is my package.json
{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“eject”: “expo eject”,
“test”: “jest --watchAll”
},
“jest”: {
“preset”: “jest-expo”
},
“dependencies”: {
“@expo/samples”: “~3.0.3”,
“@expo/vector-icons”: “^10.0.5”,
“@react-navigation/web”: “^1.0.0-alpha.9”,
“expo”: “^34.0.1”,
“expo-asset”: “^6.0.0”,
“expo-constants”: “6.0.0”,
“expo-font”: “~6.0.0”,
“expo-web-browser”: “6.0.0”,
“native-base”: “^2.13.8”,
“react”: “16.8.3”,
“react-dom”: “^16.8.6”,
“react-native”: “https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz”,
“react-native-gesture-handler”: “^1.4.1”,
“react-native-modal”: “^11.3.1”,
“react-native-popup-menu”: “^0.15.6”,
“react-native-web”: “^0.11.4”,
“react-navigation”: “^3.11.0”,
“react-redux”: “^7.1.1”,
“redux”: “^4.0.4”,
“redux-devtools-extension”: “^2.13.8”,
“redux-promise”: “^0.6.0”,
“redux-thunk”: “^2.3.0”
},
“devDependencies”: {
“babel-preset-expo”: “^6.0.0”,
“jest-expo”: “^34.0.0”
},
“private”: true
}
any help to reduce my bundle size ?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.