Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up`ionic cordova resources` fails #3849
Comments
This comment has been minimized.
This comment has been minimized.
rafalschmidt97
commented
Jan 30, 2019
•
|
This is actually a funny one. I had the same yesterday. There is a workaround for that. Instead of running one command which will generate everything:
try this:
|
This comment has been minimized.
This comment has been minimized.
Moussa-M
commented
Jan 30, 2019
•
|
Same error with me too > ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
(node:3960) ExperimentalWarning: The http2 module is an experimental API.
√ Uploading source images to prepare for transformations: 2 / 2 complete - done!
/ Generating platform resources
C:\Users\Slash\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:859
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\Slash\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:859:13)
at Request.req.type.send.on.res (C:\Users\Slash\AppData\Roaming\npm\node_modules\ionic\lib\integrations\cordova\resources.js:166:25)
at Request.emit (events.js:160:13)
at Request._emitResponse (C:\Users\Slash\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:862:8)
at ClientRequest.req.once.res (C:\Users\Slash\AppData\Roaming\npm\node_modules\ionic\node_modules\superagent\lib\node\index.js:412:10)
at Object.onceWrapper (events.js:255:19)
at ClientRequest.emit (events.js:165:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:548:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:115:23)
at TLSSocket.socketOnData (_http_client.js:439:20) |
This comment has been minimized.
This comment has been minimized.
Moussa-M
commented
Jan 30, 2019
|
I've found the issue https://ionicframework.com/docs/cli/commands/cordova-resources/ |
This comment has been minimized.
This comment has been minimized.
ndrake
commented
Jan 30, 2019
|
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 |
brandyscarney
transferred this issue from ionic-team/ionic
Feb 5, 2019
ionitron-bot
bot
added
the
triage
label
Feb 5, 2019
This comment has been minimized.
This comment has been minimized.
etpl7
commented
Feb 19, 2019
|
I had the same problem. Make sure that you have icon (1024 x 1024) and splash (2732 x 2732) in resources folder. |
This comment was marked as disruptive content.
This comment was marked as disruptive content.
arcreative
commented
Mar 11, 2019
•
|
@etpl7 Well of course that would be the issue. I'm so fed up with this entire platform. What could possibly be wrong with throwing such a cryptic, idiotic error when processing a file that's been fine literally for years now? |
This comment has been minimized.
This comment has been minimized.
|
Just a little update. We're aware Take a look at my comment for using the local resource generation tool we've been working on. Here's the repo for it: https://github.com/ionic-team/cordova-res We welcome any constructive feedback for the new flow. |
This comment has been minimized.
This comment has been minimized.
LucasMW
commented
Mar 14, 2019
Wow, it works. |
This comment has been minimized.
This comment has been minimized.
arcreative
commented
Mar 14, 2019
|
@dwieeb No one’s even going to fix the error message? I understand not fixing the whole chain, but it seems a little off to not fix something like this IMO. Sorry you thought my earlier comment was “disruptive”, but issues like this are the reason I’m moving farther and farther away from ionic as time goes on. My frustration stems from the fact that my project can’t age even 1-2 months without me having to start completely over on some crazy line of detective work when all I want to do is publish a trivial update to my app. Thus far, I’ve dropped the standard build process in favor of my own Gulpfile, resources pipeline, new platform updates, and essentially all the other commands in favor of vanilla Cordova and Gulp. Sorry my comment wasn’t tactful, but there are some really prevalent quality of life issues with Ionic. |
This comment has been minimized.
This comment has been minimized.
arcreative
commented
Mar 14, 2019
|
@LucasMW this didn’t work for me, but resizing splash.png to 2732 did. I was frustrated because the size I had was the old recommended standard, which seems to have been increased for iPad Pro. |
This comment has been minimized.
This comment has been minimized.
|
@arcreative We've already poured so much development time into the resources service. Generating Cordova resources is not a core strength of Ionic. It is better for us to focus on the framework and supporting tools, not an image resizing service. Additionally, since this legacy resources service performs the CPU-intensive image scaling (and network transfer) on our servers and since the service is completely free, we lose quite a bit of money to it each year. There are many offline/local options available for resizing Cordova resources. Ionic even has one now:
I apologize to those who've run into obscure errors with this command. We've tried to mitigate the issues with good documentation, but we know it's not enough. The sooner we get rid of the legacy service and make |
This comment has been minimized.
This comment has been minimized.
arcreative
commented
Mar 15, 2019
|
@dwieeb I can totally understand your position on this, but it seems like this problem could still be easily addressed either a) on the resource server, or b) in the error handling of the module hitting the resource server. If the resource server can properly handle a large image but not a smaller one, this has to be a simple issue to fix. Regardless of what your plans are for resource generation in the future, this is currently the accepted standard, and just refusing to fix it doesn't seem like a reasonable stance to have for a service/platform that thousands of people rely on. |
This comment has been minimized.
This comment has been minimized.
|
It's not easily addressed. It is a legacy system that is quite brittle. The CLI code is fairly complex, and in the past when I've improved it I've broken it in some way. Any attempt to fix, test, improve, etc. will be a serious time sink that we're not willing to make. Reference:
Besides, we are stretched thin on much higher priority things. The resources command has behaved this way for many months and this issue only has 8 participants. It's just not our focus. We of course welcome pull requests to improve the developer experience for everyone, but with the upcoming switch to |
This comment has been minimized.
This comment has been minimized.
arcreative
commented
Mar 16, 2019
•
|
But the service side? I don’t think you have any/many CLI issues to fix if the service does its job. I would be willing to take a look, but guessing that’s not going to be an option. |
This comment has been minimized.
This comment has been minimized.
|
Any change to the server side would require change(s) to the client side, even for error handling. The server code is even scarier, actually. |
This comment has been minimized.
This comment has been minimized.
DorianLovera
commented
Mar 24, 2019
|
For me the issue was that the resources (.png) were not at the right size |
sergey-drpa commentedJan 29, 2019
Bug Report
Ionic version:
4.9.0
Current behavior:
When run
ionic cordova resourcesexecution fails with:
or
Expected behavior:
Generate resources
Steps to reproduce:
Windows/MacOS run
ionic cordova resourcesOther information:
https://stackoverflow.com/questions/54155176/ionic-cordova-resources-splash-and-icon-error
Ionic info: