Skip to content
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

syncfilesystem permission not recognized #597

Open
komacke opened this issue Nov 11, 2015 · 6 comments
Open

syncfilesystem permission not recognized #597

komacke opened this issue Nov 11, 2015 · 6 comments

Comments

@komacke
Copy link

komacke commented Nov 11, 2015

Using cca 0.7.4 and node-js 0.10.36, I'm getting at 'cca prepare':

Permission not recognized by cca: syncFileSystem (ignoring)

In case there is an issue with my manifest I tried syncDemo from here:
https://github.com/MobileChromeApps/mobile-chrome-app-samples/tree/master/syncDemo

and got the same error.

Here's the full output:

$ cca prepare
cca v0.7.4
## Updating plugins based on manifest.json
Permission not recognized by cca: syncFileSystem (ignoring)
## Running Cordova Command: plugin add [email protected]
Fetching plugin "[email protected]" via npm
Plugin "cordova-plugin-whitelist" already installed on android.
Running command: /android/syncDemo/syncDemo/hooks/before_prepare/cca-check.js /android/syncDemo/syncDemo
## Inject CSP for android

I tried forcing the plugin install with cca but it said don't do that:

$ cca plugin add org.chromium.syncfilesystem
cca v0.7.4
Error: The following plugin(s) cannot be explicitly installed:
* org.chromium.syncfilesystem
Instead, add the proper manifest.json permissions.
See: https://developer.chrome.com/apps/manifest
Error: Abort plugin add

What am I missing from the manifest? How to debug?

Thanks,

Dave

@agrieve
Copy link
Member

agrieve commented Nov 12, 2015

Sounds like a bug, but one that won't be getting fixed :(.

syncFileSystem is a super-powerful API, but turns out not one that can be efficiently implemented in Cordova.

@komacke
Copy link
Author

komacke commented Nov 12, 2015

Hmmm... What are the limitations? I came across one note that syncFileSystem doesn't sync when the app isn't open, which seems like a reasonable limitation for many use cases. Of course I haven't been able to explore the limitations since I don't have it running.

Would you have any guesses what version of cca it was working?

With great optimism, I'll see if I can figure out the "cca prepare" issue. Maybe it will just work after that. =8-|

@komacke
Copy link
Author

komacke commented Nov 13, 2015

I'm continuing to explore. I can't really find a good alternative to syncfilesystem. It may be infeasible for the general case but it seems like it will work for my use case.

I took it out of the "STALE" list in the cca plugins list and compiled. Running on android gave me an error with ChromeStorage. I suspect this version dates prior to the refactor into individual repos on MobileChromeApps and needs some work.

I found the syncFileSystem code back on Feb 10 in this repo: https://github.com/MobileChromeApps/mobile-chrome-apps/tree/master/chrome-cordova/plugins/chrome.syncFileSystem. Supposedly it was moved on Feb 11 into it's own repo.

Would you be willing/able to provide the source (let me branch) from after the migration to its own repo? It would give me a starting point that presumably is further along than the Feb 10 version.

Thanks so much.

Dave

@agrieve
Copy link
Member

agrieve commented Nov 14, 2015

It doesn't look like there's a way to get it back, but I don't believe there were any commits to it after it was split out.

@agrieve
Copy link
Member

agrieve commented Nov 14, 2015

Good luck!

@komacke
Copy link
Author

komacke commented Nov 14, 2015

Thanks for your quick response and confirming.

For anyone interested in contributing to, following, or attempting to use a "branch" of syncFileSystem, I've started it here as its own cordova plugin:
https://github.com/komacke/cordova-syncFileSystem.git

Please use that issue list to communicate about it:
https://github.com/komacke/cordova-syncFileSystem/issues

Note that it doesn't compile yet - cordova Filesystem interfaces have changed. But hopefully I'll find enough time to get it going quickly so I can get back to my project. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants