Ionic Pro doesn't add /www directory?

Hello all - thanks in advance for any contributions.

I am using the Ionic Native Audio plugin to play audio files from my app. When I test the application by running ionic cordova run android (with my device connected), I can load the appropriate asset from the /www directory and play it. When I push the code to the ionic pro cloud (to view the app in Ionic View), I get a FileNotFoundException when trying to load the same asset.

I also back up my code to GitHub, and when I pushed the changes from the root directory to my GH, I did not see a /www directory in the repo. My question is the following: does this mean that the git push ionic master command does not upload the /www directory to the cloud? In the event that it doesn’t how are we supposed to use this plugin to run audio files on the device?

Million thanks for any feedback/solution. I have tried so many different things and no luck :frowning:


All your stuff should be in /src
Assets like playback files in /src/assets

Ionic build scripts copy these to /www, also in the cloud

Stuff u put in wwww is not pushed to the cloud and can be overwritten without notice


1 Like


This solution does not seem to be working. I moved my file into src/asset/audio/.wav

When I run this locally, the plugin works fine and I can hear the audio, however I still get the FileNotFoundException when testing in Ionic View. Any additional thoughts on this issue? Much appreciated.

The ionic git (pro files) will only take, core ionic files from a pro push master.
So, by nature, it will not upload your sound assets.
You have to find a good storage provider for that matter.
Soundcloud API is very cool.


But then I can no longer use the Ionic Native Audio plugin since the audio file is no longer local to the application. I have tried hosting the file in Firebase and that seems to work, but then I use the StreamingMedia plugin which is not supported in Ionic View -__-

If I host the file somewhere, and want to use the Native Audio plugin (since it is supported by Ionic View), I would need to first download the file from the remote location and then play it using the plugin?

It’s a very complicated question, you’re right.

But finally, any http flow from youtube or deezer could fit your need. (Tailoring get request from Ionic or server to their API).
And all videos i have seen in YouTube, always fit to any device.

Hope it helps,

I am not fully convinced that it would not work because of pro restrictions. Even though I havent used the plugin and a large file upload for ionic view. It works for me using json files and images in assets, so why not audio files?

Have you used git add tonexplicitly include the asset folder?

Add a github repo to see if everything is pushed at all

Use git status to see which files are being tracked/changed (or some other git command)

Does it still work on android using ionic cordova run android?

Are u using ionic view on android or ios? It could be you are making a wrong referral to the file location? Show the code whichh says how you refer

this.platform.ready().then((readySource) => {
        this.log('Platform ready from: '+ readySource);
        this.nativeAudio.preloadComplex('key1', 'assets/audio/filename.wav', 1, 1, 0).then(
          (success) => {
            this.log('nativeAudio preloadComplex success');
          }, (failure) => {
            this.log('nativeAudio preloadComplex failure: '+failure);

This is the code that I am running in the constructor of my class. Currently I am just hardcoding in the name of the file, but eventually I would move that out to NavParams so I can reuse the class (since all the files would be in the same directory).

When I run the project from ionic cordova run android, it works just fine. The second I push to IV it stops working and throws the FNFE. I have a GitHub repo for this, but I did not push the changes I made last night to the repo so I am not positive the /src/asset/audio/ structure made it to IV - I can double check on that at some point. I am testing the IV with an Android device currently.

Hello Tom,

I have tried to push the repo to GitHub and I am failing because my audio file is larger than 100MB. Do you (or anyone else) know if something similar is happening with Ionic View - is there a max file size and that’s why the project doesn’t work in Ionic View but works locally?

This issue has been killing me, would love some insight into this. Many thanks.

Ask support on file sizes