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

Tests Failing #24

Open
Shard opened this issue Oct 14, 2016 · 6 comments
Open

Tests Failing #24

Shard opened this issue Oct 14, 2016 · 6 comments

Comments

@Shard
Copy link

Shard commented Oct 14, 2016

I started to look into #23 as It recently stopped working for me, after running the tests locally I get a few errors: https://gist.github.com/Shard/ebefea0bbd1a089faddb8c8d336c9eef

I started to look into the eval being called in /node_modules/couch_eval/ and it was trying to pass through this: https://gist.github.com/Shard/b0f9c002fdc73e5f01880cfb380a8a00

Not 100% sure where to go from here in terms of what should be happening here.

I'm running on Node 6.8 on Elemtentry OS

@Shard
Copy link
Author

Shard commented Oct 15, 2016

I spent some more time debugging through my app this time and the error I ended up getting even when rolling back pouch-auth to when the build was passing was:

TypeError: db.getUrl is not a function
    at /home/mark/git/worker/node_modules/pouchdb-req-http-query/index.js:75:18
    at httpQuery (/home/mark/git/worker/node_modules/pouchdb-req-http-query/index.js:31:10)
    at PouchDB.exports.logIn (/home/mark/git/worker/node_modules/pouchdb-auth/lib/sessionapi.js:51:15)
    at DB.Remote.useAsAuthenticationDB.then (/home/mark/git/worker/src/db.js:21:15)
    at process._tickDomainCallback (internal/process/next_tick.js:129:7)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

I rolled back pouchdb to version 5 from 6 and it seems be behaving now.

@nolanlawson
Copy link
Member

This was a private API removed in v6: https://pouchdb.com/2016/09/05/pouchdb-6.0.0.html

You will have to use db.name instead.

@Shard
Copy link
Author

Shard commented Oct 25, 2016

Ah ok, the only thing is I believe the call is coming from pouch-req-http-query itself as I haven't got that call in my codebase. I will probably have another look at this later tonight to see i can track it down further.

@rogsfernandes
Copy link

I have the same problem. Had to downgrade my pouch to 5 to get things working.

@marten-de-vries
Copy link
Member

marten-de-vries commented Feb 10, 2017

Sorry, no time to fix it currently, but if someone else wants to this is where getUrl() (which is indeed now deprecated) is called: https://github.com/pouchdb/pouchdb-req-http-query/blob/master/index.js#L75

Seems like there isn't really a good alternative to getUrl() other than asking the user to (again) specify the host and manually constructing the URL, sadly. That means that a fix would also need to change modules dependent on this one (like pouchdb-auth), to pass that value along everywhere. It's not really user-friendly, but the only fix without patching PouchDB.

If db.name includes the URL (which pouchdb/pouchdb#5435 suggests), it should be a pretty easy fix.

@ghost
Copy link

ghost commented Feb 27, 2017

Hi there,

is there a fix out by now?

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

4 participants