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

Error Connecting .. see screenshot #63

Closed
kevbook opened this issue Dec 27, 2015 · 10 comments
Closed

Error Connecting .. see screenshot #63

kevbook opened this issue Dec 27, 2015 · 10 comments
Labels

Comments

@kevbook
Copy link

kevbook commented Dec 27, 2015

  • Db is a remote DB
  • Oplog not allowed on user
  • Using the osx compiled version of the app

Not sure what else info could I provide.

image

@kevbook kevbook changed the title Error Connecting - Not sure what else info could I provide. Error Connecting .. see screenshot Dec 27, 2015
@officert
Copy link
Owner

Could you try opening up the dev console and check and see if there are any errors?

You can open the dev console with cmd-option-i
or go to the View menu > Toggle Developer Tools

@kevbook
Copy link
Author

kevbook commented Dec 28, 2015

image

@kevbook
Copy link
Author

kevbook commented Dec 28, 2015

My me privately, I can share the creds to a sample remote DB you can connect and try it out.
Skype: ksakhuj

@officert
Copy link
Owner

Only thing I've found for this so far is this:

https://github.com/mongodb/js-bson/issues/152

I'll hop on Skype today and try and get those credentials from you so I can investigate some more.

@officert officert added the bug label Dec 29, 2015
@officert
Copy link
Owner

officert commented Jan 1, 2016

Alright so I am able to reproduce this on one of my databases. I now have 2 remote databases, each with authentication. 1 of them works fine, the other I get this error 'database.copy is not a function'.

It's definitely this same issue that is reported here https://github.com/mongodb/js-bson/issues/152.

The problem happens when trying to authenticate against the database. In my case the 1rst database is working and is using mongocr for an authentication provider, which is working. The 2nd database is using scram-sha-1 which is not working.

@officert
Copy link
Owner

officert commented Jan 1, 2016

Based on mongodb/js-bson#152 this is happening because when running Node inside of Electron the window object is set to the browser window.

@officert
Copy link
Owner

officert commented Jan 2, 2016

@kevbook I was able to fix this in this commit:

4988cff

I forked the node bson library and put in a fix, I'm now able to connect the the database I was having problems with.

Do you mind checking and seeing if this clears things up for you? If you don't have all the development stuff setup I can create a new release for you to try out.

@joshmadewell
Copy link
Contributor

I had this same issue with my database at work. I just tested and the issue is now resolved with your commit.

@kevbook
Copy link
Author

kevbook commented Jan 4, 2016

It works now!!

@kevbook kevbook closed this as completed Jan 4, 2016
@officert
Copy link
Owner

officert commented Jan 5, 2016

awesome yea so it's definitely an issue with mongo ~2.6 to mongo 3, where they changed the authentication mechanism. The library that the driver uses https://github.com/mongodb/js-bson doesn't play nice with Electron. In Electron the global window object is defined and set to the browser window, which messes up js-bson.

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

No branches or pull requests

3 participants