These are chat archives for rosshinkley/nightmare

16th
May 2016
Rick Medina
@rickmed
May 16 2016 00:11
Mmm tricky... I don't think it's possible, can you specify your user case?
James Tindall
@atomless
May 16 2016 09:50
@Mr0grog yes good idea - I should have pasted the error message. This is what I see when expected_state_obj = { data_url : 'http://google.com' }
  - log - ERROR! _keys2 is not defined / ReferenceError: _keys2 is not defined
    at response.data_url (<anonymous>:9:61)
    at javascript (<anonymous>:22:15)
    at <anonymous>:27:3
    at EventEmitter.electron.ipcRenderer.on (/Users/jamestindall/Documents/doc_baton/BatonSite/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/renderer/init.js:44:29)
    at emitMany (events.js:121:13)
    at EventEmitter.emit (events.js:195:7)
James Tindall
@atomless
May 16 2016 10:10
@Mr0grog the error thrown when executing Object.keys in a function within a Nightmare.js wait or evaluate call is consistent regardless of what page is loaded. Same repeatable error happens on my test page or with google.com.
Maxwell Zhao
@thepiercingarrow
May 16 2016 12:08
@rickmed I want to play a game called reaper where the client updates a timer, and you have to click the timer at certain times. Sometimes, the server tells everyone to reset their clients, and I want to be able to run a function every time the timer is reset.
James Tindall
@atomless
May 16 2016 13:55
I've raised an issue for the above mentioned bug segmentio/nightmare#636
Maxwell Zhao
@thepiercingarrow
May 16 2016 15:05
Is there a way to make the waitTimeout unlimited?
Rick Medina
@rickmed
May 16 2016 16:27
mayybeee try running a function with evaluate (in website context) that does that (executes when the dom node is modified) and do not .end() nightmare (to keep it running)
@thepiercingarrow2
Rob Brackett
@Mr0grog
May 16 2016 17:11

@atomless a) what versions of nightmare and electron are you using? b) can you send/paste/whatever your whole script? c) are you injecting any scripts? Nothing in Electron or Chromium uses _keys2 or response.data_url.

I definitely can't reproduce what you're experiencing at all, so I wonder if something else you're doing outside the part you described is setting up the error.

Rob Brackett
@Mr0grog
May 16 2016 17:36
Oh, nevermind, just saw your issue on GH, which indicates the likely culprit—I put some feedback there

@thepiercingarrow2

Is there a way to make the waitTimeout unlimited?

This would be a really bad idea. You might be able to set waitTimeout: Infinity, but I would really recommend you don't do that; there's no way for your program to recover if something never shows up.

Rick Medina
@rickmed
May 16 2016 17:39
guys I'm trying to run nightmare on heroku (free dyno). nightmare is crashing by the second queued action: two suspects: 1) heroku's /dev/shm being too small (but I'm using electron with the version of chromium that should be fixed) 2) I'm getting this electron:stderr Xlib: extension "RANDR" missing on display ":99"., not sure if relevant...
I get "nightmare:log crashed [{}]" so nothing super useful
any ideas?
Rob Brackett
@Mr0grog
May 16 2016 17:46
Sorry, I have not ever tried to run it on Heroku, so I'm not really 100% sure here. Are you using someone else's buildpack, or did you put something together yourself?
(and are you running xvfb explicitly with the RANDR extension? / how are you running xvfb?)
Rick Medina
@rickmed
May 16 2016 18:49
wait
Rob Brackett
@Mr0grog
May 16 2016 18:55
Maaaaybe try:
web: DEBUG=* xvfb-run --server-args="-screen 0 1280x1028x24 -ac +extension GLX +extension RANDR +render" node server.js
You might want to open a console to your Heroku box and do xdpyinfo to see what you've got available
errr, xvfb-run -a xdpyinfo
Rick Medina
@rickmed
May 16 2016 19:00

Maaaaybe try:

web: DEBUG=* xvfb-run --server-args="-screen 0 1280x1028x24 -ac +extension GLX +extension RANDR +render" node server.js

didn't work

Rob Brackett
@Mr0grog
May 16 2016 19:01
same results? different results?
Rick Medina
@rickmed
May 16 2016 19:01
same
result from running xvfb-run -a xdpyinfo
name of display:    :99
version number:    11.0
vendor string:    The X.Org Foundation
vendor release number:    11501000
X.Org version: 1.15.1
maximum request size:  16777212 bytes
motion buffer size:  256
bitmap unit, bit order, padding:    32, LSBFirst, 32
image byte order:    LSBFirst
number of supported pixmap formats:    6
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 4, bits_per_pixel 8, scanline_pad 32
    depth 8, bits_per_pixel 8, scanline_pad 32
    depth 16, bits_per_pixel 16, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32
    depth 32, bits_per_pixel 32, scanline_pad 32
keycode range:    minimum 8, maximum 255
focus:  PointerRoot
number of extensions:    23
    BIG-REQUESTS
    DAMAGE
    DOUBLE-BUFFER
    DPMS
    DRI3
    GLX
    Generic Event Extension
    MIT-SCREEN-SAVER
    MIT-SHM
    Present
    RECORD
    RENDER
    SECURITY
    SGI-GLX
    SHAPE
    SYNC
    X-Resource
    XC-MISC
    XFIXES
    XInputExtension
    XKEYBOARD
    XTEST
    XVideo
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    640x480 pixels (163x122 millimeters)
  resolution:    100x100 dots per inch
  depths (6):    8, 1, 4, 16, 24, 32
  root window id:    0xfe
  depth of root window:    8 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    256
  preallocated pixels:    black 0, white 1
  options:    backing-store NO, save-unders NO
  largest cursor:    640x480
  current input event mask:    0x0
  number of visuals:    6
  default visual id:  0x21
  visual:
    visual id:    0x21
    class:    PseudoColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x22
    class:    GrayScale
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x23
    class:    StaticColor
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x24
    class:    TrueColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x25
    class:    DirectColor
    depth:    8 planes
    available colormap entries:    8 per subfield
    red, green, blue masks:    0x7, 0x38, 0xc0
    significant bits in color specification:    8 bits
  visual:
    visual id:    0x26
    class:    StaticGray
    depth:    8 planes
    available colormap entries:    256
    red, green, blue masks:    0x0, 0x0, 0x0
    significant bits in color specification:    8 bits
Rick Medina
@rickmed
May 16 2016 19:06
seems lilke I'm missing the RANDR extension
Rob Brackett
@Mr0grog
May 16 2016 19:10
yeah, looks like it's not supported via APT
it's possible that's not the cause of the crash, though
Rick Medina
@rickmed
May 16 2016 19:13
agree
I'mm looking into modifying heroku's dev/shm limit
Ross Hinkley
@rosshinkley
May 16 2016 19:30
sorry to poke my head in: shouldn't the argument for -screen be :99?
err
wait, no, sorry
that's display i'm thinking of, scratch my last