spoonconsulting / cordova-plugin-background-upload

Cordova plugin for background upload
Apache License 2.0
49 stars 53 forks source link

"cordova-plugin-file@6.0.2" does not satisfy dependency plugin requirement #236

Open hughknaus opened 1 year ago

hughknaus commented 1 year ago

Trying to use cordova-plugin-file-transfer in the same project that I'm using cordova-plugin-background-upload. However, with ionic repair the corodova prepare phase fails with:

Discovered plugin "cordova-plugin-file-transfer". Adding it to the project
Installing "cordova-plugin-file-transfer" for android
Failed to install 'cordova-plugin-file-transfer': CordovaError: Version of installed plugin: "cordova-plugin-file@6.0.2" does not satisfy dependency plugin requirement "cordova-plugin-file@>=7.0.0". Try --force to use installed plugin as dependency.
    at C:\Users\hknaus\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:526:43
Failed to restore plugin "cordova-plugin-file-transfer". You might need to try adding it again. Error: CordovaError: Version of installed plugin: "cordova-plugin-file@6.0.2" does not satisfy dependency plugin requirement "cordova-plugin-file@>=7.0.0". Try --force to use installed plugin as dependency.

cordova-plugin-background-upload has a dependency on cordova-plugin-file@6.0.2 while cordova-plugin-file-transfer has a dependency of cordova-plugin-file@>=7.0.0, how can these be used in the same project with the dependency disparity?

Snippet from my package.json:
image

zfir commented 1 year ago

Hello @hughknaus,

You can try to increase the dependency on our plugin. (Create a PR and we will do some tests and merge it)

https://github.com/spoonconsulting/cordova-plugin-background-upload/blob/058291b70940cb74981befedd9b49afffb53b927/plugin.xml#L16

or you can do the reverse.

Regards, Zafir

hughknaus commented 1 year ago

PR: Update dependency of cordova-plugin-file version -- https://github.com/spoonconsulting/cordova-plugin-background-upload/pull/237

Does fix the build issue and initial tests around uploading appear okay.

zfir commented 1 year ago

Hello @hughknaus,

Will test the PR and let you know.

Regards, Zafir.

zfir commented 1 year ago

Hello @hughknaus,

This version of cordova-plugin-file has a problem when displaying an img in the WebView.

https://github.com/apache/cordova-plugin-file/issues/526

The link above address this issue.

Regards, Zafir.

hughknaus commented 1 year ago

@zfir Yeah, I believe we were running into it on Android as well. iOS seemed to be okay though.

What are the plans for resolving these issues? Do you know the timeframe for resolution?

zfir commented 1 year ago

Hello @hughknaus,

No idea. We need to wait for Apache to release a new version. For now, I would recommend you to try to downgrade the dependency of cordova-plugin-file-transfer to 6.0.2 and test again.

Regards, Zafir.

gbrits commented 1 year ago

I'm using cordova-plugin-ns0m-file-transfer - does this fix your problems? I am still running into a file not found issue though, but I'm thinking that's a URL file:// thing that I can hopefully fix soon.