admc / jellyfish

Run your Javascript anywhere.
jelly.io
Other
94 stars 10 forks source link

createFirefox() and createChrome() fail #1

Open jdalton opened 13 years ago

jdalton commented 13 years ago

I'm using Cygwin and jellyfish.createFirefox() returns Caught unexpected error: Bad argument and jellyfish.createChrome() returns something about killed browser. jellyfish.createZombie() works.

admc commented 13 years ago

Hey, thanks for trying this out in cygwin, so far I have only been working on it in Mac and linux, but I will install it and see if I can do some debugging tonight. Most likely the browser launchers are just looking in the wrong places to find the binaries.

Adam

wavded commented 13 years ago

I'm on Ubuntu 11.04 Natty, and Firefox 6 loads but doesn't 'go' to the site I specified. Just sits at my homepage. Using the code from jelly.io webpage. Is there support for 11.04?

admc commented 13 years ago

Is there any chance I can get you to clone the jellyfish repo and run: node test/envs/test.firefox.js

The output there should give me a better idea of what's going on.

Thanks!

wavded commented 13 years ago

i get:

firefox : 2bddbb38-3aad-4c6e-8c11-6007f69374a3 - {"result":false,"path":"../stub/example_file.js","runTime":0}

And then it pauses and hangs there, have to stop the script with CTRL-C.

wavded commented 13 years ago

if I run the app I and try to go to a site from there I get:

$ jellyfish firefox                                                                          
(firefox): browser.go('http://jelly.io');
{ startURL: 'http://jelly.io/',
  tid: 'b0002b86-6235-4410-a491-e326c183e1e1',
  tentacles: 
   { 'b0002b86-6235-4410-a491-e326c183e1e1': 
      { global: [Circular],
        process: [Object],
        GLOBAL: [Circular],
        root: [Circular],
        Buffer: [Object],
        setTimeout: [Function],
        setInterval: [Function],
        clearTimeout: [Function],
        clearInterval: [Function],
        console: [Object],
        b: [Function: TreeBuilder],
        t: [Function: HTML5Tokenizer],
        p: [Function: TrailingEndPhase],
        PHASES: [Object],
        firefox: [Function],
        chrome: [Function],
        safari: [Function],
        jellyfish: [Function],
        e: 'webdriver',
        m: '2',
        methodName: 'stop',
        encoding: 'utf8' } },
  port: 46286,
  frame: null,
  live: false,
  jfComplete: false,
  queue: 
   [ { meth: 'run',
       qid: '8aa29bb9-099d-4725-a1cd-9df85d52a6ba',
       code: 'window.location.href=\'http://jelly.io\'',
       cb: undefined } ],
  resolve: {},
  frames: {},
  config: {},
  opts: {},
  log: [ [ 'output', 'started server', 'b0002b86-6235-4410-a491-e326c183e1e1 on port 0' ] ],
  startTime: 1314036410,
  start: [Function],
  name: 'firefox',
  server: 
   { connections: 0,
     allowHalfOpen: true,
     watcher: { host: [Circular], callback: [Function] },
     _events: { request: [Function], connection: [Function: connectionListener], listening: [Function] },
     httpAllowHalfOpen: false,
     type: 'tcp4',
     fd: 5 },
  init: [Function],
  js: [Function],
  go: [Function],
  stop: [Function],
  bin: '/usr/bin/firefox',
  target: { start: [Function], stop: [Function] },
  bid: '5c24d748-f12a-4896-8313-87bd9a9762d9',
  version: 3 }

The browser doesn't go to that web page however.

admc commented 13 years ago

Thanks, ill setup ubuntu on my bigger machine when I get home and see if I can't debug it. The code for setting the firefox proxy must be broken on linux.

wavded commented 13 years ago

ok thx!

wavded commented 13 years ago

hmm odd it worked now for me. I had to update the `test.firefox.js' script to include jellyfish like this:

  , jellyfish = required('../../lib/main');

instead of

  , jellyfish = require('jellyfish');

otherwise I would get a package not found error, even if I installed jellyfish globally and did an npm install on the directory. for testing, wouldn't you want to require it the above way instead? so it relies on the package contents itself? or do you have another step I'm missing?

wavded commented 13 years ago

chrome test hung for me, does jelly.io support chromium out of the box (I run that instead of straight chrome)?

wavded commented 13 years ago

noticed one other thing. I believe the reason Firefox wasn't working before.

If I have no Firefox running, I see that it loads a new profile and then runs tests against that.

If I have an existing Firefox open it looks like it uses that profile and then just doesn't work.

zhangjiezk commented 6 years ago

how to perform command "jellyfish count -m 22 -o output -c 3 -s 10000000 -t 32 input.fasta" of jellyfish with cygwin?