Closed egarciadev7 closed 4 years ago
Open your project using xcode & give error log
Hi, This is the ouput in the tns console:
file:///node_modules/@nativescript/core/application/application.js:312:0: JS ERROR Error: NativeScript encountered a fatal error: NSErrorWrapper: You don\M-b\M^@\M^Z\M-C\M^D\M-C\M-4t have permission to save the file \M-b\M^@\M^Z\M-C\M^D\M-C\M-:co.expressios-Inbox\M-b\M^@\M^Z\M-C\M^D\M-C\M-9 in the folder \M-b\M^@\M^Z\M-C\M^D\M-C\M-:tmp\M-b\M^@\M^Z\M-C\M^D\M-C\M-9.
And the xcode ouput is:
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: NSErrorWrapper: You don’t have permission to save the file “co.expressios-Inbox” in the folder “tmp”. at createDirectoryAtPathWithIntermediateDirectoriesAttributesError(file:///app/vendor.js:97542:97)
The reason is written there. Do Google search & find solution
Sorry but this is not very useful, like you see this error comes simply by calling " mediafilepicker.open File Picker(options)"... any advice?, and of course I am searching in google... thanks
Did you find any solution @egarciadev7 ? I am also facing the same problem.
I found the problem and fixed it.
The issue in my case was that getFiles
event, when using the openFilePicker()
, returned results with the file
path starting with file://
. I fixed it by removing that part with something like:
const normalisedResults = results.map((result) => {
if (result.file.startsWith("file://")) {
result.file = result.file.substr(7);
}
return result;
});
Hi, thanks for the wonderful plugin! .
Describe the bug I am trying to open the file picker in order to upload a pdf file to my server, but the app crash and close.
Expected behavior Return the pdf path
NativeScript Info(please run
tns info
):✔ Getting NativeScript components versions information... ⚠ Update available for component nativescript. Your current version is 6.3.3 and the latest available version is 6.4.0. ⚠ Update available for component tns-core-modules. Your current version is 6.3.2 and the latest available version is 6.4.1. ⚠ Update available for component tns-android. Your current version is 6.3.1 and the latest available version is 6.4.1. ⚠ Update available for component tns-ios. Your current version is 6.3.0 and the latest available version is 6.4.2.tns info ✔ Getting NativeScript components versions information... ⚠ Update available for component nativescript. Your current version is 6.3.3 and the latest available version is 6.4.0. ⚠ Update available for component tns-core-modules. Your current version is 6.3.2 and the latest available version is 6.4.1. ⚠ Update available for component tns-android. Your current version is 6.3.1 and the latest available version is 6.4.1. ⚠ Update available for component tns-ios. Your current version is 6.3.0 and the latest available version is 6.4.2.
Sample Code(please provide minimum code to reproduce problem): This the code I am using: if (isIOS) { extensions = [kUTTypePDF]; // you can get more types from here: https://developer.apple.com/documentation/mobilecoreservices/uttype } else { extensions = ['pdf']; }
Thanks for your help!