-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not allowed to load local resource: content://com.example/assets/new.png #140
Comments
Please take no offense if any of the following suggestions sound "simple" or I'm repeating things you've already mentioned. I'm just covering the bases for clarity, and some of these issues I ran into myself while trying to get this working for the first time.
<access origin="content:///*" />
<access origin="cdvfile:///*" />
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; media-src *; img-src * filesystem: data:"> I hope something in there is of some help. Also, I'm curious, what was the build error when using cordova-android 7.1.4/8.0.0? |
Thanks for helping this guy! |
Thanks for replying. I am replying on each of your suggestion points and the error that I got - 1)In Ionic config.xml there is no keyword - What I tried -
I added But When I used this plugin for the same project previously, I was successfully got the images from 2)As you mentioned the path to placed .obb file is inside Sdcard but when I download my application from Google Play store it will placed the .obb file inside device Internal Storage.
What I tried- I placed .obb file inside 3)Yes the code is successfully added to this path - 4)Yes, I am using 5)I added this code
in my project Along with this I also have this code-
in my
Here is the code I am using in my html file for showing images, please have a look-
this is correct, right? |
1. I gave you slightly bad advice here. The 2. You may have the path correct, I suppose it can be different on various devices. On every device I tested, including the Android Studio emulator, it was always 5. Unfortunately, I'm not familiar enough with the syntax of the
In your .obb file, the file structure should match what you have after |
Hello |
Is there a way for you to test without Ionic? |
Unfortunately no, as I am using this plugin only for ionic project. |
But can you? Just to find out what the issue is. |
I am trying to debug the exact issue but not find it yet. Can you please let me know that this plugin is perfectly working with android platform version 7.0.0 ? or I have to use this plugin with only specific android platform version? |
6.5... Check some of the issues... |
Are you trying to say that I have to use Xapk reader plugin version - 6.5.0 ? I am getting exact same error - #129 And it was solved with this version - https://github.com/erobertson42/cordova-plugin-xapkreader/tree/cordova-9. |
Only that the 6.5 (should) work with 6.5. I dunno about newer versions. Everything keeps changing. |
Hello I tried to downgrade the Webview plugin to - 2.1.3,3.0.0,2.0.0 etc but none helped me. Can you please tell me which Webview version is stable with the Xapk reader plugin? |
I solved my issue by doing following steps-
The images are visible in Android application. But with signed .apk and placing the .obb file on specific folder I am getting - I don't know why this error is displaying even I placed the .obb file on the specific folder. Can you please tell me why I getting this error download failed error? |
This isn't supposed to be used for iOS at all... How did you "place" the .obb file? |
I download the .obb file from e-mail and then copy the .obb file on this location |
A number of changes have been made to the logic there. What it should do is check if the file exists, and if it doesn't, it tries to download the file. Perhaps the file is not named as it should be, or is not in the location it should be in. Maybe search for where that error is outputed in the Java files and add the location it tries to the output. |
Ok |
I am using this plugin
as you can see here it is working with Cordova 9 and when I am using this plugin and my app get stuck on every page. Previously I used this plugin
I tested my app with new Xapk plugin version Can anyone know why I am facing this issue in new version of Xapk reader plugin? |
It seems as though you were getting close. Based on what you've shared, my guess is that it is either related to the ionic webview plugin, or you have the .obb file named incorrectly. Perhaps try creating a new internal test release in the Google Play Console, including the .obb file. Delete the app entirely from your device, and download it from Google Play instead to see what happens. Google automatically renames whatever apk expansion zip file you upload to the correct name. At the very least, this will let you look to see what Google named the .obb file and that should remove a possible point of failure. |
I am using this version of webview-
Do you think this version is the reason for stuck issue? And I also checked the naming of .obb file, it is correct. |
You already mentioned that everything works if you remove the ionic webview plugin, so that's definitely what's causing the issue. According to the notes in the ionic webview pull request I linked previously, you need to be using at least version 3.0.0 to be able to load local content. Upon further research, the official ionic docs on the webview plugin say you also need to be using at least version 3.2.0 of Ionic, so I would suggest upgrading both. Also, it seems that when using the ionic webview plugin, you don't want to be using the I don't use Ionic or any of their plugins, so I probably cannot be too much more help. If you still have issues after trying the above, you might want to try asking Ionic. |
content:// is not working for me in any case I have removed |
Also, please try to get it working without the |
Thank you very much for your reply!
I used this this to create obb file and also working perfectly with [email protected], but |
Hello,
I am using this plugin to generate expansion apk of my ionic project for Android.
I am using this plugin - https://github.com/erobertson42/cordova-plugin-xapkreader/tree/cordova-9
I successfully able to make the build of project but the problem is the images from .obb file cannot loaded while running the app in device.
This way I am testing my application-
1)Paste the .obb file in location - /Internal storage/Android/obb/{your.apps.package.name}/
2)Run the application in Android device.
The name format of .obb file is - main.{version}.{your.apps.package.name}.obb
I followed each and every step present in the readme doc of this repo - https://github.com/erobertson42/cordova-plugin-xapkreader/tree/cordova-9
Still getting error
Here is my system environment details -
I am using android platform 7.0.0 because the build failed with android version - 7.1.4/8.0.0 and the XApk reader plugin throws error that was solved with
android 7.0.0 version
If anyone know what I am doing wrong. please give suggestion I think I am missing some small things.
Thanks
The text was updated successfully, but these errors were encountered: