jss
jss copied to clipboard
Wrong type argument: arrayp, nil
Hi,
First of all, well done on this package! Tried js-skewer and kite before and found jss to be much more usable than either. Unfortunately, it seems to work for me only the first time I launch it after installing. As soon as I close emacs are re-open it and try to jss-connect, it throws "Wrong type argument: arrayp, nil" every time.
I understand this is way too little information for you to be able to help but I don't know what else I need to provide here. Please let me know and I'll update this issue.
I can also be often found on the emacs IRC channel (freenode) as jesus666. /msg me if I'm there.
Cheers, KK
hey, thanks for bug report.
Given what you said i'm guessing (but in no way sure) that there's something going on in the browser where after closing a connection it's not getting reinitialized and, somehow, we're not detecting that.
questions:
- do you have a Backtrace buffer?
- What browser were you connecting to? (webkit or firefox?) what version? what version of emacs?
- What happens if you kill the connection from within emacs and try to reconnect? (kill-buffer in a console buffer should be enough, the remember to hit g (jss-browser-mode-refresh) in the browser buffer)
i'll be on #emacs (i'm segv-) in the next few days and i'll look for you there
thanks for a speedy response :)
- debug-on-error switched on doesn't show any errors. Neither does running the jss-connect command in the scratch buffer. Only prints "Wrong type argument: arrayp, nil" in mini-buffer... Is there any other way I could make it give a backtrace?
- Chrome Version 29.0.1547.62 m. GNU Emacs 24.3.1 installed on Windows 7 via Cygwin.
- Kills and reconnects any number of times. However as soon as I quit emacs and open it again, jss-connect stop working.
by the way, I installed JSS via the emacs packaging tool (elpa).
Hello @kkudryavtsev and @segv I just installed Jss and seem to be having the same issue.
Wrong type argument: arrayp, nil
After initial install I was able to connect and play with it a bit before killing emacs. After reopening I was no longer able to connect. Was wondering if you guys figured out what was causing the issue?
Here is what I am working with...
- OS X 10.9
- Chrome Canary Version 33.0.1736.0
- GNU Emacs 24.3.1
emacs in my terminal, not the emacsClient.
I stay in #emacs on freenode as JSON_voorhees
Here is the paste from starting chrome in debug
--- ~ » /Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --remote-debugging-port=9222
2013-12-12 00:51:54.290 Google Chrome Helper[26591:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6527, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2013-12-12 00:52:12.700 Google Chrome Helper[26597:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6727, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2013-12-12 00:52:13.558 Google Chrome Helper[26597:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
2013-12-12 00:52:13.558 Google Chrome Helper[26597:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
[26588:27399:1212/005253:ERROR:process_info_snapshot_mac.cc(211)] Failure running /usr/bin/top to acquire data.
[26588:27399:1212/005253:ERROR:process_info_snapshot_mac.cc(173)] Error parsing output from /bin/ps.
2013-12-12 00:56:09.268 Google Chrome Helper[26611:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6627, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2013-12-12 01:00:19.158 Google Chrome Helper[26627:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x6727, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2013-12-12 01:00:29.141 Google Chrome Helper[26631:507] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x642b, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2013-12-12 01:00:32.933 Google Chrome Helper[26631:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
2013-12-12 01:00:32.933 Google Chrome Helper[26631:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
2013-12-12 01:00:33.232 Google Chrome Helper[26631:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
2013-12-12 01:00:33.233 Google Chrome Helper[26631:507] CoreText CopyFontsForRequest received mig IPC error (FFFFFECC) from font server
I'm having the same problem trying to connect to Chromium.
TL;DR: The classes jss-webkit-browser
and jss-firefox-browser
aren't autoloaded when jss-connect
autoloads. Quick workaround: load all of jss on connect by adding this to your init file (~/.emacs
):
(autoload 'jss-connect "jss" "FIXME: Autoload all of jss on connect" t nil)
To help out others with debugging this kind of problem, here's what I did:
-
~/.emacs
setup to rely mostly on autoloading, with as few explicitrequire
's as possible (this appeared to be key to understanding why the problem occurs, see below). - Enable
Enter debugger on error
from the menu (or doM-x toggle-debug-on-error
). -
M-x jss-connect RET webkit RET 127.0.0.1 RET 9222 RET
- Emacs breaks to the debugger, here's the backtrace:
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
make-instance(jss-webkit-browser :host "127.0.0.1" :port "9222")
jss-connect("webkit")
call-interactively(jss-connect record nil)
command-execute(jss-connect record)
execute-extended-command(nil "jss-connect")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
- While still in the debugger,
M-: jss-webkit-browser RET
gives:
Symbol's value as variable is void: jss-webkit-browser
- Press
q
to exit the debugger to top-level orc
to continue.
It appears that jss-browser-webkit
is defined in jss-browser-webkit.el
, but jss-browser.el
doesn't depend on it (neither does it depend on jss-browser-firefox
).
The main file jss.el
does, and it has a comment about loading the various files in the right order.
Adding a workaround to ~/.emacs
: (autoload 'jss-connect "jss" "FIXME: Autoload all of jss on connect" t nil)
and restarting Emacs made jss-connect
work as expected.
Same issue on Gentoo with Chromium 46, fixed by @ackalker :+1:
add (autoload 'jss-connect "jss" "FIXME: Autoload all of jss on connect" t nil)
to ~/.eamcs