electrode-io / electrode-ota-server

Electrode Over The Air Server for hot deployment of React Native and Cordova mobile apps
Other
204 stars 40 forks source link

Bundle upload error over 1MB. #4

Closed sdg9 closed 7 years ago

sdg9 commented 7 years ago

When running code-push release-react MyTestApp android --deploymentName Staging I get the following error as the bundle is being uploaded to the server

Releasing update contents to CodePush:

Upload progress:[==================================================] 100% 0.0s
[Error]  Payload content length greater than maximum allowed: 1048576
sdg9 commented 7 years ago

After doing some research I found hapi defaults upload size to 1MB which can be overwritten by setting maxBytes.

I resolved this issue for me by cloning the project and adding a larger maxBytes size such as

payload: {
  maxBytes: 4082153,
},

to the config object to the /apps/{app}/deployments/{deployment}/release route in apps.js

jspears commented 7 years ago

Thanks for the note. I'll update something to make this easer to find.