Raven Sudio 35181 : Cannot read property 'toLocaleString' of undefined

1,099 views
Skip to first unread message

Valeriob

unread,
Dec 19, 2016, 9:51:46 AM12/19/16
to RavenDB - 2nd generation document database
Trying to access the system database to fix a problem i get this error and i'm stuck (see the attachment) :(

main.js:14 Uncaught TypeError: Cannot read property 'toLocaleString' of undefined
    at Function.notifySubscribers (http://localhost:8090/studio/App/libs.min.js:4:13442)
    at Object.fireWith [as resolveWith] (http://localhost:8090/studio/App/libs.min.js:2:4833)
    at Object.o.(anonymous function) [as resolve] (http://localhost:8090/studio/App/libs.min.js:2:5813)

the line in question seems to be: this.documentsCountWithThousandsSeparator=ko.computed(function(){return i.documentCount().toLocaleString()})

Also a question, i'm trying to patch all the documents in the system database to add a bundle so i wanted to create an index to be able to patch all documents at once, but i'm not able to do so. Is it possibile to create indexes on system databases ? How do you suggest i enable the Unique Constraint bundle to all databases without doing it manually ?

Thanks
Valerio
ravendb_js_error.PNG

Oren Eini (Ayende Rahien)

unread,
Dec 19, 2016, 2:32:46 PM12/19/16
to ravendb
What browser version are you using this on?

toLocaleString is supported across all browsers that we tested, see:

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Valeriob

unread,
Dec 20, 2016, 3:43:26 AM12/20/16
to RavenDB - 2nd generation document database
Hi, it's not a problem of the function itself, but the output of i.documentCount() that is undefined.

Valerio
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Grisha Kotler

unread,
Dec 20, 2016, 5:14:39 AM12/20/16
to rav...@googlegroups.com
Hi,

Can you share the output of the following endpoints?
http://{Server-Name}/databases/{Database-Name}/terms/Raven/DocumentsByEntityName?field=Tag&pageSize=1024
http://{Server-Name}/databases/{Database-Name}/studio-tasks/collection/counts


Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Valeriob

unread,
Dec 20, 2016, 6:16:33 AM12/20/16
to RavenDB - 2nd generation document database
It happens on the system database :


Response Body
{
  "Url": "/indexes/Raven/DocumentsByEntityName?&query=Tag:Utente&pageSize=0",
  "Error": "Could not find index named: 18"
}


I do not know if it is related but i'm unable to create the DocumentsByEntityName index in the system database.

Thanks,
Valerio

Oren Eini (Ayende Rahien)

unread,
Dec 20, 2016, 6:18:27 AM12/20/16
to ravendb
Why can't you create it there?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Valeriob

unread,
Dec 20, 2016, 6:26:38 AM12/20/16
to RavenDB - 2nd generation document database

So i had a "bad" system database, i tried to export it, and import it again and all the problems went away !
This db has gone through a lot of our coding mistakes and migrations (from 3.0, various 3.5 beta/rc, 3.5.2) and maybe something has gone wrong somewhere.
If you are curious to see what happened i zipped the system db folder.

Thanks again !
Valerio
System.zip

Grisha Kotler

unread,
Dec 20, 2016, 6:36:09 AM12/20/16
to rav...@googlegroups.com
What OS version is it running on?

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Grisha Kotler l RavenDB Core Team Developer Mobile: +972-54-586-8647

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

RavenDB paving the way to "Data Made Simplehttp://ravendb.net/


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Valeriob

unread,
Dec 20, 2016, 8:09:08 AM12/20/16
to RavenDB - 2nd generation document database
Right, win10

Valerio

Vinney Kelly

unread,
Jul 19, 2017, 3:42:42 PM7/19/17
to RavenDB - 2nd generation document database
I'm experiencing the same error. This error renders the studio useless because the uncaught JS error. It could easily be prevented by changing the line to `(i.documentCount() || 0).toLocaleString()`.

Dan Bishop

unread,
Jul 19, 2017, 4:07:55 PM7/19/17
to RavenDB - 2nd generation document database
I'm pretty sure that the root cause of this error is the Raven/DocumentsByEntityName index being corrupted. As far as I know, only the "Documents" tab gets messed up by this JS error. Try going to the "Indexes" URL directly and try resetting the Raven/DocumentsByEntityName index to see if that helps.

I agree 100% with the code change you've proposed, its a bad experience to have the Studio appear to be totally broken b/c of an error like this.

Dan

mar...@ayende.com

unread,
Jul 20, 2017, 2:41:57 AM7/20/17
to RavenDB - 2nd generation document database
Looks like it isn't Studio bug. 

Statistics endpoint reports errors in indexes in system database. ( http://{serverName:port}/stats )

I've reported issue: http://issues.hibernatingrhinos.com/issue/RavenDB-7828, so you can track progress there. 


Best regards,

Marcin Lewandowski

Oren Eini (Ayende Rahien)

unread,
Jul 23, 2017, 2:17:16 AM7/23/17
to ravendb
This has been fixed in the release on Friday

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
Reply all
Reply to author
Forward
0 new messages