Ionic Pro: Generates error "Failed to upload apk to storage please retry your build"


#1

Below is the error log I recieved from Ionic Pro output.

* What went wrong:
A problem occurred configuring root project 'android'.
> Failed to install the following SDK components:
  [Android SDK Platform 26]
  The SDK directory (/opt/android-sdk) is not writeable,
  please update the directory permissions.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Failed to upload apk to storage please retry your build.
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: exit status 1

#2

Choose any one of those:
https://forum.ionicframework.com/search?q="Failed%20to%20upload%20apk%20to%20storage%20please%20retry%20your%20build"

Also:
Please edit your post, it is not very readable at the moment.
Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ``` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

Also:
Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

You can - and should - contact support at http://ionicframework.com/support#support


#3

Thanks. Fixed formatting.


#4

So did you contact support?


#5

Yes I filed a bug report.


#6

I’m getting a similar error, did support get back to you on this?


#7

I was told by support to remove the “^” from the spec attribute on engine XML node in my config.xml

However, it did not fix my issue. Still waiting on a reply.

Zach H. (Ionic Support)

Oct 5, 9:52 AM CDT

Hi there,

Happy to help! Cordova recently released a new version of the cordova-android platform that is not yet supported. If your config files use ranged versioning for your platforms, they may be allowing the installation of this unsupported platform, which is causing this error.

To solve the problem, please remove the ~​ or ^​ character from your platforms in your config.xml and package.json files. See this support center guide for details.

Let us know if this helps – thanks!


#8

Honestly, this is very frustrating because the default template uses the “^” which means anyone using Pro with a template generated by Ionic will be having these issues right now. Ionic controls the entire build process so why is it hard for them to support a new version of Cordova? And why does it take over a week for me to get proper Pro support?


#9

Ionic doesn’t control Cordova itself, which is the reason that ^ is there which is now causing problems. It is kind of hard to evaluate and anticipate all possible future problems in software.

Well, this is clearly not the correct place to ask that question. The Ionic community probably can’t say much about that. Maybe better talk to Ionic. You know the channel.