jeroen / mongolite

Fast and Simple MongoDB Client for R
https://jeroen.github.io/mongolite/
284 stars 64 forks source link

Invalid namespace specified 'db-name.' in Shiny modules #180

Closed vallivh closed 4 years ago

vallivh commented 4 years ago

When I connect to my MongoDB (db = "mongotest") within a Shiny reactive function within a server function and call m$count(), I always get an "Invalid namespace specified" error:

Bildschirmfoto 2019-08-18 um 16 58 22

When I call m$find('{}') in this case, I even get a fatal error that causes my RStudio session to quit. Simply calling m (e.g with print(m)) works fine as well as m$info(). I also tested m$distinct(), which also caused the namespace error to appear.

Bildschirmfoto 2019-08-18 um 17 15 06

Strangely, it seems as if somewhere a dot . is added to end of my db name, if I read the error message correctly. I don't know what package throws the error but according to the error message it seems to come from mongolite's mongo_collection_count or mongo_collection_command_simple