Comments (6)
I think it's unlikely that we'd bundle random EXEs with the addon. As I user, I certainly would not want a Simulator installing strange EXEs in my Windows folder.
If that's what is needed for Windows XP Home to work, I think we just won't be able to support it at this time.
Out of curiosity, does the same issue happen with the newest simulators, like 1.5?
from r2d2b2g.
Oh, I didn't meant Simulator should install it in Windows folder, but that it could include it (in Simulator folder) and run this one if necessary.
If not, I think that Simulator should handle this case properly.
In [email protected]\resources\r2d2b2g\lib\adb.js
(line 240):
if (platform === "WINNT") {
ps = "C:\\windows\\system32\\tasklist.exe";
args = [];
} else {
args = ["aux"];
let psCommand = "ps";
let paths = env.PATH.split(':');
let len = paths.length;
for (let i = 0; i < len; i++) {
let fullyQualified = file.join(paths[i], psCommand);
if (file.exists(fullyQualified)) {
ps = fullyQualified;
break;
}
}
if (!ps) {
debug("Error: a task list executable not found on filesystem");
deferred.resolve(false); // default to restart adb
return deferred.promise;
}
}
In case of Windows XP Home, I think the following code should run:
debug("Error: a task list executable not found on filesystem");
deferred.resolve(false); // default to restart adb
return deferred.promise;
But instead, since it's windows, it assumes that C:\windows\system32\tasklist.exe
does exist.
from r2d2b2g.
Ah, okay. This is part of the older Firefox OS 1.1 Simulator that is no longer maintained.
The 1.2+ simulators do not contain the above file because all ADB stuff is handled separately. The newer addons are used via the App Manager.
With the App Manager, you can run ADB manually or use the ADB helper addon to do this for you. It looks like the ADB helper has the same flaw you've found here though.
We also have a more experimental ADB addon which does not appear to use tasklist
which might work for you, but again this is only meant for use with the App Manager and FxOS 1.2+.
I have filed a bug about the ADB helper on this issue.
from r2d2b2g.
Not sure as I have temporarily had to step away from testing the Firefox
OS. But, I soon will check on that later this week, if possible.
On May 6, 2014 2:48 PM, "J. Ryan Stinnett" [email protected] wrote:
I think it's unlikely that we'd bundle random EXEs with the addon. As I
user, I certainly would not want a Simulator installing strange EXEs in my
Windows folder.If that's what is needed for Windows XP Home to work, I think we just
won't be able to support it at this time.Out of curiosity, does the same issue happen with the newest simulatorshttps://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/,
like 1.5?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/892#issuecomment-42342871
.
from r2d2b2g.
Thank you for having filed a bug on this issue.
On May 6, 2014 6:28 PM, "J. Ryan Stinnett" [email protected] wrote:
Ah, okay. This is part of the older Firefox OS 1.1 Simulator that is no
longer maintained.The 1.2+ simulators do not contain the above file because all ADB stuff is
handled separately. The newer addons are used via the App Managerhttps://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_App_Manager
.With the App Manager, you can run ADB manually or use the ADB helper addonhttps://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Adb_Helper_Add-onto do this for you. It looks like the ADB helper has the same flaw you've
found here though.We also have a more experimental ADB addonhttps://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/adb-helper/adbhelper-windows.xpiwhich does not appear to use
tasklist which might work for you, but again this is only meant for use
with the App Manager and FxOS 1.2+.I have filed a bug about the ADB helperhttps://bugzilla.mozilla.org/show_bug.cgi?id=1006844on this issue.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/892#issuecomment-42367984
.
from r2d2b2g.
Replacing _isAdbRunning
with the following code fixes the problem:
_isAdbRunning: function() {
let deferred = Promise.defer();
let ps, args;
let platform = Services.appinfo.OS;
if (platform === "WINNT") {
ps = "C:\\windows\\system32\\tasklist.exe";
args = [];
} else {
args = ["aux"];
let psCommand = "ps";
let paths = env.PATH.split(':');
let len = paths.length;
for (let i = 0; i < len; i++) {
let fullyQualified = file.join(paths[i], psCommand);
if (file.exists(fullyQualified)) {
ps = fullyQualified;
break;
}
}
}
if (ps) try {
let buffer = [];
subprocess.call({
command: ps,
arguments: args,
stdout: function(data) {
buffer.push(data);
},
done: function() {
let lines = buffer.join('').split('\n');
let regex = (platform === "WINNT") ? psRegexWin : psRegexNix;
let isAdbRunning = lines.some(function(line) {
return regex.test(line);
});
deferred.resolve(isAdbRunning);
}
});
return deferred.promise;
}catch(err){
if(err.name !== "NS_ERROR_FILE_NOT_FOUND") throw err;
}
debug("Error: a task list executable not found on filesystem");
deferred.resolve(false); // default to restart adb
return deferred.promise;
},
from r2d2b2g.
Related Issues (20)
- Firefox OS Simulator Not running! HOT 12
- firefox OS simulator - crash HOT 4
- HTML5 Drag and Drop code is not working in Firefox OS Simulator
- Failure for app to run even though validation is result is OK
- Simulator doesn't run on nightly HOT 1
- geolocation does not work HOT 3
- UA override default should be set to False on Firefox OS simulator
- Most touch events do not work in Firefox OS Simulator 1.2. No way to simulate multitouch either.
- validation result :ok stll getting -->error running app app-not-installed HOT 1
- User Agent in the FirefoxOS Simulator incorrect [1.2 and 1.3] HOT 1
- Problem with Google Maps JS API
- r2d2b2g build fails with file integrity error HOT 1
- new HOT 1
- run ffos simulator on ff 29 HOT 1
- Cannot use FxOS Simulator on Firefox 23 or under HOT 5
- Enumerating of files on sdcard HOT 3
- Firefox OS Design Issue HOT 1
- Extension causes Firefox to crash HOT 8
- Operation Failed : Connecting To Firefos OS 2.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r2d2b2g.