Skip to content
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

TypeError: Cannot use 'in' operator to search for 'name' #3

Open
sauloal opened this issue Mar 22, 2016 · 11 comments
Open

TypeError: Cannot use 'in' operator to search for 'name' #3

sauloal opened this issue Mar 22, 2016 · 11 comments

Comments

@sauloal
Copy link

sauloal commented Mar 22, 2016

JBrowse: JBrowse-1.12.1

From:
http://jbrowse.org/wordpress/wp-content/plugins/download-monitor/download.php?id=101

Server: Python 2.7.11

python -m SimpleHTTPServer

Chrome: 49.0.2623.87 m (64-bit)

TypeError: Cannot use 'in' operator to search for 'name' in NeatHTMLFeatures(…) "TypeError: Cannot use 'in' operator to search for 'name' in NeatHTMLFeatures
    at .<anonymous> (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:31:2)
    at .<anonymous> (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:31:42)
    at j._milestoneFunction (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:82:339)
    at j.initPlugins (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:30:334)
    at http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:28:17
    at c (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165)
    at d (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91)
    at resolve (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145)
    at .<anonymous> (http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:84:421)
    at http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:141:23"
dojo.js:35 TypeError: Cannot use 'in' operator to search for 'name' in NeatHTMLFeatures
    at .<anonymous> (dojo.js:31)
    at .<anonymous> (dojo.js:31)
    at j._milestoneFunction (dojo.js:82)
    at j.initPlugins (dojo.js:30)
    at dojo.js:28
    at c (dojo.js:236)
    at d (dojo.js:236)
    at resolve (dojo.js:238)
    at .<anonymous> (dojo.js:84)
    at dojo.js:141

Firefox: 45.0.1

TypeError: invalid 'in' operand d[b]
... a))a.location="plugins/"+a.name;var b=this.resolveUrl(a.location);if(!("js"in a...
dojo.js (line 82)
.cache["JBrowse/Browser"]/</<.initPlugins/</d<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:31:1
.cache["JBrowse/Browser"]/</<.initPlugins/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:30:473
.cache["JBrowse/Browser"]/</<._milestoneFunction@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:82:337
.cache["JBrowse/Browser"]/</<.initPlugins@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:30:1
.cache["JBrowse/Browser"]/</<.constructor/</<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:28:15
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["JBrowse/Browser"]/</<.loadConfig/</<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:84:419
.cache["dojo/_base/lang"]/</b.hitch/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:141:21
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/promise/all"]/</</</<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:939:363
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</b/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:452
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/promise/all"]/</</</<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:939:363
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</b/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:452
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/promise/all"]/</</</<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:939:363
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</b/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:452
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</k/b.then@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:239:7
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:269
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:338
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</b/<@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:452
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:165
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:338
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
.cache["dojo/Deferred"]/</a@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:237:14
.cache["dojo/Deferred"]/</c@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:305
.cache["dojo/Deferred"]/</d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:236:91
.cache["dojo/Deferred"]/</k/this.resolve@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:238:145
e@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:379:180
d@http://assembly.ab.wurnet.nl:8000/src/dojo/dojo.js:382:225
b(a=
TypeError: invalid 'in' operand d[b]


... a))a.location="plugins/"+a.name;var b=this.resolveUrl(a.location);if(!("js"in a...

)dojo.js (line 35)
.cache["JBrowse/Browser"]/</<.fatalError/<(c=Object { type="object"})dojo.js (line 36)
ma(a=Object { type="object"}, b=undefined)dojo.js (line 15)
ga/<()dojo.js (line 16)
la(a=Object { type="object"})dojo.js (line 15)
ga()dojo.js (line 16)
Fa/c(b="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 16)
.cache["dojo/text"]/</<.load/h(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 412)
.cache["dojo/text"]/</<.load/<(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 412)
.cache["dojo/_base/xhr"]/</h._ioSetArgs/<(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 363)
q()dojo.js (line 276)
n(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 276)
.cache["dojo/_base/Deferred"]/</h.Deferred/this.callback(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 277)
q()dojo.js (line 277)
n(a=Object { type="object"})dojo.js (line 276)
.cache["dojo/_base/Deferred"]/</h.Deferred/this.callback(a=Object { type="object"})dojo.js (line 277)
.cache["dojo/_base/xhr"]/</h.xhr/<()dojo.js (line 367)
.cache["dojo/Deferred"]/</c(c=Object { type="object"}, d=1, e="<div class="fatal_error"...:</h2>\n </div>\n</div>\n", f=null)dojo.js (line 236)
.cache["dojo/Deferred"]/</d(a=Object { type="object"}, b=1, d="<div class="fatal_error"...:</h2>\n </div>\n</div>\n", e=null, f=0)dojo.js (line 236)
.cache["dojo/Deferred"]/</k/this.resolve(a="<div class="fatal_error"...:</h2>\n </div>\n</div>\n", c=undefined)dojo.js (line 238)
.cache["dojo/Deferred"]/</a(a=Object { type="object"}, b=1, c="<div class="fatal_error"...:</h2>\n </div>\n</div>\n")dojo.js (line 237)
.cache["dojo/Deferred"]/</c(c=Object { type="object"}, d=1, e=Object { type="object"}, f=null)dojo.js (line 236)
.cache["dojo/Deferred"]/</d(a=Object { type="object"}, b=1, d=Object { type="object"}, e=null, f=0)dojo.js (line 236)
.cache["dojo/Deferred"]/</k/this.resolve(a=Object { type="object"}, c=undefined)dojo.js (line 238)
.cache["dojo/Deferred"]/</a(a=Object { type="object"}, b=1, c=Object { type="object"})dojo.js (line 237)
.cache["dojo/Deferred"]/</c(c=Object { type="object"}, d=1, e=Object { type="object"}, f=null)dojo.js (line 236)
.cache["dojo/Deferred"]/</d(a=Object { type="object"}, b=1, d=Object { type="object"}, e=null, f=0)dojo.js (line 236)
.cache["dojo/Deferred"]/</k/this.resolve(a=Object { type="object"}, c=undefined)dojo.js (line 238)
.cache["dojo/Deferred"]/</a(a=Object { type="object"}, b=1, c=Object { type="object"})dojo.js (line 237)
.cache["dojo/Deferred"]/</c(c=Object { type="object"}, d=1, e=Object { type="object"}, f=null)dojo.js (line 236)
.cache["dojo/Deferred"]/</d(a=Object { type="object"}, b=1, d=Object { type="object"}, e=null, f=0)dojo.js (line 236)
.cache["dojo/Deferred"]/</k/this.resolve(a=Object { type="object"}, c=undefined)dojo.js (line 238)
e(a=Object { type="object"}, b=undefined)dojo.js (line 379)
d()dojo.js (line 382)


..."error",innerHTML:b(a)+""},c)}else if(/^Could not load reference sequence/.test(...
@sauloal
Copy link
Author

sauloal commented Mar 22, 2016

Fixed:

Download the plugin zip file
wget -O 'JBrowsePlugin_20160322_9990bda.zip' https://github.com/bionanogenomics/JBrowsePlugin/archive/master.zip

Decompress the file:
unzip JBrowsePlugin_20160322_9990bda.zip

Enter folder:
cd JBrowsePlugin-master/

uncompress compiled plugin:
unzip BioNanoGenomics.zip

move BioNanoGenomics folder to plugins folder:
mv BioNanoGenomics JBrowse-1.12.1/plugins

@BionanoDev please correct https://github.com/bionanogenomics/JBrowsePlugin/wiki/BioNano-Genomics-Plugin-Installation accordingly if I'm correct

regards

@sauloal sauloal closed this as completed Mar 22, 2016
@sauloal sauloal reopened this Mar 22, 2016
@sauloal
Copy link
Author

sauloal commented Mar 22, 2016

My mistake. I forgot to re-enable the plugin. still crashing.
It seems that it only works with apache.

@BionanoDev
Copy link
Contributor

Correct we used apache.

@sauloal
Copy link
Author

sauloal commented Mar 23, 2016

I used python and node. neither worked.

@BionanoDev
Copy link
Contributor

Thanks for testing that. Guess that is additional work to make sure it is compatible with those add'l web servers.

@sauloal
Copy link
Author

sauloal commented Mar 24, 2016

help says that somewhere in the code you're requesting a JSON but the server is sending as text (not using magic mime type) and therefore DOJO is trying to use 'in' against a string instead of a object (parsed json). the solution being forcing the datatype (dataType: "JSON" for ajax, handleAs: "json" for xhr). I couldnt find where in the code you were requesting the JSON.

@sauloal
Copy link
Author

sauloal commented Apr 4, 2016

Also doesnt work with NGINX in the jbrowse docker image

@sauloal
Copy link
Author

sauloal commented Apr 5, 2016

I've tried with apache and found the same error

@sauloal
Copy link
Author

sauloal commented Apr 5, 2016

I've succeeded in making it work by according to ( http://gmod.org/wiki/JBrowse_Configuration_Guide#Using_Plugins ), instead of using the .conf file, using the .json file:

{"plugins":["BioNanoGenomics"]}

this works without a problem

@cmdcolin
Copy link

cmdcolin commented Jun 6, 2017

There was a bug in previous jbrowse versions where if you declare plugins in trackList.json like "plugins": ["NeatHTMLFeatures"] and then in jbrowse.conf have the plugin declaration like

[plugins.BioNanoGenomics]
location=plugins/BioNanoGenomics

then it gave this error

Fixed in jbrowse 1.12.3 via GMOD/jbrowse#866

@cmdcolin
Copy link

cmdcolin commented Jun 6, 2017

Note that there can still be weird behavior if you try to declare plugins in multiple files, so it's probably best to declare all plugins in jbrowse.conf, or all in trackList.json, but not a mix of both (which is what was probably the original cause of this issue). Ref GMOD/jbrowse#897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants