-
Notifications
You must be signed in to change notification settings - Fork 760
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
Electron platform - 'Missing Command Error' on API calls #334
Comments
When doing that I had some errors later when I tried to retrieve the files with a "img.src=...". I replaced the both tests by the following and it seems to work :
|
@ZhennanWu Thanks a lot, works for me! |
cordova.platformId = 'electron' My app is running well on iOS, Android, Chrome browser. It downloads images from a remote server and then uses them in a canvas. 1/ With
The download of images is OK.
which results in : 2/ If I replace
(i.e use Chrome layer for manipulation of files in Electron) Then
Everything is working fine. |
Fixes for apache#334
Hi, I have an issue with this plugin on electron. file:///www/res/languages/fr-FR.json I tried to include a json file with translations. I modified files as you mentionned but it is not running too. |
Bug Report
Problem
What is expected to happen?
File APIs working normally and return a valid Entry or a valid error code.
What does actually happen?
When invoking any api, it will throw
with
Environment, Platform, Device
cordova.platformId = 'electron'
Linux x64, Ubuntu 18.04
Checklist
Suspected Cause
Tracing the error output, I suspect this is caused by inconsistencies in platform detection strategy?
Eg: In src/browser/FileProxy.js and www/resolveLocalFileSystemURI.js
In src/browser/FileProxy.js, it assumes Electron have all the native APIs. So it choose to register nothing in the execProxy of Cordova. Meanwhile, other modules consider Electron not qualified (
cordova.platformId !== 'browser'
) and overrides its methods.Fixing Attempt
I've hacked src/browser/FileProxy.js to ensure it uses a consistent platform detection logic
And at least the API call is OK. No more
Error: exec proxy not found for :: File ::
Is there anyone who can confirm this issue? I'm not familiar with Cordova platform thus quite unsure about this fix.
The text was updated successfully, but these errors were encountered: