`ionic cordova resources` fails
See original GitHub issueBug Report
Ionic version: 4.9.0
Current behavior:
When run ionic cordova resources
execution fails with:
HTTP Error 520: POST https://res.ionic.io/api/v1/upload
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>res.ionic.io | 520: Web server is returning an unknown error</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><!
<style type="text/cs ...
or
throw Error("end() has already been called, so it's too late to start piping");
^
Error: end() has already been called, so it's too late to start piping
at Response.response.pipe (C:\Users\drapa\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:859:13)
at Request.req.type.send.on.res (C:\Users\drapa\AppData\Roaming\npm\node_modules\ionic\lib\integrations\cordova\resources.js:166:25)
at Request.emit (events.js:182:13)
at Request._emitResponse (C:\Users\drapa\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:862:8)
at ClientRequest.req.once.res (C:\Users\drapa\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:412:10)
at Object.onceWrapper (events.js:273:13)
at ClientRequest.emit (events.js:187:15)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:556:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
at TLSSocket.socketOnData (_http_client.js:442:20)
Expected behavior: Generate resources
Steps to reproduce:
Windows/MacOS run ionic cordova resources
Other information: https://stackoverflow.com/questions/54155176/ionic-cordova-resources-splash-and-icon-error
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.9.0 (C:\Users\drapa\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.2.3
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 10 other plugins)
System:
Android SDK Tools : 26.1.1 (C:\Android\sdk)
NodeJS : v10.14.2 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 7
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (6 by maintainers)
Top Results From Across the Web
Ionic 4: Ionic cordova resources fails with node error
I've used NVM to install my Ionic 4 environment. Trying to run: ionic cordova resources. getting the error:
Read more >Ionic cordova resources –force not working - Stack Overflow
Try deleting all the png's from icon and splash folder of ios and run "ionic cordova resources ios" command. – Sandy..... Jul 27,...
Read more >cordova-res - npm
Resource Generator. This tool will crop and resize JPEG and PNG source images to generate icons and splash screens for modern iOS, Android, ......
Read more >Generate App Icon and Splash Screen Images for Ionic ...
Run npm install cordova-res --save-dev; Create 1024x1024px icon at resources/icon.png; Create 2732x2732px splash at resources/splash.png ...
Read more >Re: How to change android app icon and splash screen?
If you will recieve an error like: ... ERROR: Missing source for "adaptive-icon" (sources: ... ionic cordova resources android --force
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had the same problem. Make sure that you have icon (1024 x 1024) and splash (2732 x 2732) in resources folder.
I see this too when generating for iOS. Possibly because my source icon.png is smaller than 1024x1024?
ionic:lib:integrations:cordova:resources response 400 received for icon-1024.png: (id: a609b411d96b5ae5ae9b5d57ace98104) +37ms /Users/ndrake/.nvm/versions/node/v10.15.0/lib/node_modules/ionic/node_modules/superagent/lib/node/index.js:859