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

Connecting to Cloudant - Facing Issues #12

Open
vasumahesh1 opened this issue Apr 17, 2015 · 4 comments
Open

Connecting to Cloudant - Facing Issues #12

vasumahesh1 opened this issue Apr 17, 2015 · 4 comments

Comments

@vasumahesh1
Copy link

Tried to Connect to CLOUDANT for remote DB Access.

using this:

remoteCouch: {                                                                       
    adapter: 'sails-couchdb-orm',
    host: 'test.cloudant.com',
    port: 5984,
    username: '***',
    password: '***',
    database: 'project_hub'                                
  }

I have given Reader & Writer Access to this Username, Password Combination.

Yet the error is :
_reader access is required for this request

info: Starting app...

info:
info:                .-..-.
info:
info:    Sails              <|    .-..-.
info:    v0.11.0             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------'
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info:
info: Server lifted in `P:\4.Web-Based\profile_heroku`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Fri Apr 17 2015 18:07:27 GMT+0530 (India Standard Time)

debug: Environment : development
debug: Port        : 1337
debug: --------------------------------------------------------
Error (E_UNKNOWN) :: Encountered an unexpected error
: _reader access is required for this request
    at Request._callback (P:\4.Web-Based\profile_heroku\node_modules\sails-couchdb-orm\node_modules\nano\nano.js:319:39)

    at Request.self.callback (P:\4.Web-Based\profile_heroku\node_modules\sails-couchdb-orm\node_modules\nano\node_module
s\request\request.js:122:22)
    at Request.emit (events.js:110:17)
    at Request.<anonymous> (P:\4.Web-Based\profile_heroku\node_modules\sails-couchdb-orm\node_modules\nano\node_modules\
request\request.js:888:14)
    at Request.emit (events.js:129:20)
    at IncomingMessage.<anonymous> (P:\4.Web-Based\profile_heroku\node_modules\sails-couchdb-orm\node_modules\nano\node_
modules\request\request.js:839:12)
    at IncomingMessage.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)

Details:  Error: _reader access is required for this request

Thanks in advance.

@danscan
Copy link

danscan commented Jun 21, 2015

+1. Also having issues.

@danscan
Copy link

danscan commented Jun 24, 2015

Connecting to Cloudant fails– in my case because the version of nano doesn't properly encode URI components. Can fix via npm update --save nano in this repo. There doesn't seem to be much test coverage, but it's working well for me. Can create a PR.

@danielduan
Copy link

@danscan, do you have a fork with the nano fix in there? I'm trying to get this working on Cloudant as well but running 'npm update' in the node_module/sails-couchdb-orm/ doesn't fix it for me.

@danielduan
Copy link

Actually nevermind, I figured it out. You have to add the 'https: true' parameter inside the connection settings as well for it to work with Cloudant.

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