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

CouchDB returns a 404 to nano #478

Closed
FabriceCoffy opened this issue Jan 29, 2025 · 5 comments
Closed

CouchDB returns a 404 to nano #478

FabriceCoffy opened this issue Jan 29, 2025 · 5 comments

Comments

@FabriceCoffy
Copy link

Hello,

I'm trying to make it work locally, I hope I followed all the steps correctly, but when I try to create a new user online, when the application tests if the username is not yet taken, CouchDB returns a 404 to nano.

My version of CouchDB is 3.4.2

Request result :
scope: 'couch',
statusCode: 404,
request: {
method: 'get',
headers: {
'content-type': 'application/json',
accept: 'application/json',
'user-agent': 'nano/9.0.5 (Node.js v18.20.4)',
'Accept-Encoding': 'deflate, gzip'
},
qsStringifyOptions: { arrayFormat: 'repeat' },
url: 'http://XXXXXX:[email protected]:5984/auth-users/_design/views/_view/view-usernames',
params: { key: '"foo"' },

Nano error :
errid: 'non_200',
description: 'missing',
error: 'not_found',
reason: 'missing'

Maybe the get method?

Thank you for your time and this great app !

@FabriceCoffy
Copy link
Author

Some info about my CouchDB databases:

Image

@klues
Copy link
Contributor

klues commented Jan 29, 2025

Looks like it's missing the couchDB view on auth-users which is needed to check for existing usernames:

{
  "_id": "_design/views",
  "views": {
    "view-usernames": {
      "map": "function (doc) {\n  emit(doc.key, Object.keys(doc.personalDBs));\n}"
    }
  },
  "language": "javascript"
}

Out of curiosity - what's your plan, just trying it out locally?

@FabriceCoffy
Copy link
Author

Thanks, yes that was the problem.

I'm trying to simplify the whole thing a bit for use on tablets and smartphone by autistic people.

@klues
Copy link
Contributor

klues commented Jan 29, 2025

OK, great 👍

If you have any good improvements, you're also welcome to create pull requests ;)

@klues klues closed this as completed Jan 29, 2025
@ms-mialingvo
Copy link
Collaborator

@FabriceCoffy issue #480 might be part of what you're trying to achieve, feel free to join the discussion :)

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