-
Notifications
You must be signed in to change notification settings - Fork 337
Error in plugin on File Transfer #148
Comments
Could you share how you're calling |
this is my full code for syncing... its call on device ready.. and also application resume
|
@northkode Hmm, I can't repro this unfortunately :/ Are you hitting this on Android and/or iOS? Emulator or device? Also, can you let us know which Cordova version and plugins you're using? Thanks! |
iOS simulator. Cordova 5.4.2, ios 3.9.2 we have alot of plugins running android.support.v4 21.0.1 "Android Support v4" still dont see how this would effect the read only property of the callback tho.. |
@northkode Are you using an iOS 8.* simulator by any chance? It seems like there was a known issue with the iOS WebView on iOS 8, but I still can't repro this, even with an iOS 8.1 or 8.4 simulator image. All of the props in the code snippet you mentioned are simply dynamically set data properties (here is the base class which "defines" them in TypeScript), and we aren't explicitly setting any of them to write only, so I asked about the platform and plugin versions because we've seen numerous interop issues with plugins that modify the runtime in a way that can affect odd / fundamental behaviors of our plugin. |
Unfortunately this was ios 9 simulator. Is there a way around this without installing a local plug in instead? I don't get why cordova overwrites the files when I edit the bin sec directly |
I just tried this on android and i am getting a similar error Error in Success callbackId: FileTransfer1211465793 : TypeError: Cannot assign to read only property 'persistent' of files |
OK i think i figured out the issue. One of my plugins had overwrittent the FileSystem method on window and it was expecting an object of options instead of a string of persistent or temporary which is the readonly issue. Thanks for looking into it aswell!! |
@northkode Awesome! I'm glad you figured it out. We see a lot of these unexpected interop issues, which is why I'm always curious to get a list of plugins, even when it doesn't make a lot of sense that they could be related :) Thanks for getting back to us. |
Sorry to follow up on a closed ticket... but just curious if you have a work around for the wkwebview local host server? is there somewhere you can point me to changing the url of the index page to a relative path vs a file:// path after i install an update on the ios? its breaking my build you can see that your plugin changes the html path to a version hash but its appended with file:/// would be better to have it be a relative path of the application |
For anyone else looking at this thread, discussion about |
getting an error when the plugin detects a new build and trys to download it
[Log] [CodePush] Downloading update
[Log] Error in Success callbackId: FileTransfer221795359 : TypeError: Attempted to assign to readonly property.
I'm assuming this has something to with the LocalPackage js class in the downloadSuccess call back code here
_this.currentFileTransfer = null;
fileEntry.file(function (file) {
NativeAppInfo.isFailedUpdate(_this.packageHash, function (installFailed) {
var localPackage = new LocalPackage();
localPackage.deploymentKey = _this.deploymentKey;
localPackage.description = _this.description;
localPackage.label = _this.label;
localPackage.appVersion = _this.appVersion;
localPackage.isMandatory = _this.isMandatory;
localPackage.packageHash = _this.packageHash;
localPackage.isFirstRun = false;
localPackage.failedInstall = installFailed;
localPackage.localPath = fileEntry.toInternalURL();
CodePushUtil.logMessage("Package download success: " + JSON.stringify(localPackage));
successCallback && successCallback(localPackage);
Sdk.reportStatusDownload(localPackage, localPackage.deploymentKey);
});
The text was updated successfully, but these errors were encountered: