cordova-plugin-file icon indicating copy to clipboard operation
cordova-plugin-file copied to clipboard

sandbox Issue - WebPageProxy::Ignoring request to load this main resource because it is outside the sandbox

Open araafat3 opened this issue 4 years ago • 3 comments

Bug Report

sandbox Issue - WebPageProxy::Ignoring request to load this main resource because it is outside the sandbox

Problem

I am using cordova.file.applicationStorageDirectory that access sandbox and still this error appear to me request to load this main resource because it is outside the sandbox

What is expected to happen?

that i can read and write files in sandbox for ios

What does actually happen?

sandbox Issue - WebPageProxy::Ignoring request to load this main resource because it is outside the sandbox

Environment, Platform, Device

cordova 9 ios platform 5.1.1

araafat3 avatar Oct 01 '20 07:10 araafat3

As the error states, something is thinking you're attempting to load an HTML document outside of your application bundle, which the webview doesn't allow. Can you share a minimal reproduction app that demonstrates this issue?

Also the applicationStorageDirectory is a read-only directory, so you can't write to this directory. There are writable sub-directories for this. See the docs

breautek avatar Oct 01 '20 14:10 breautek

applicationStorageDirectory for ios I can read and write and my problem in read i am downloading HTML file and I want to read it

araafat3 avatar Oct 02 '20 18:10 araafat3

Hi @breautek i am used cordova.file.dataDirectory and everything is ok till ios 14 that to load data must be in sandbox so i am used cordova.file.applicationStorageDirectory and still happened after i download data inside documents as plugin said in documentation read and write cordova.file.applicationStorageDirectory - Root directory of the application's sandbox; on iOS & windows this location is read-only (but specific subdirectories [like /Documents on iOS or /localState on windows] are read-write). All data contained within is private to the app. (iOS, Android, BlackBerry 10, OSX)

araafat3 avatar Oct 04 '20 10:10 araafat3