You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/03/12 11:45:08 UTC
[GitHub] [couchdb] mapmalith removed a comment on issue #2656: error:
'invalid_json' for View GET Request
mapmalith removed a comment on issue #2656: error: 'invalid_json' for View GET Request
URL: https://github.com/apache/couchdb/issues/2656#issuecomment-598142210
Please try to remove your Docker volumes first and then try to replicate.
> @mapmalith I also cannot reproduce using the 3.0.0 docker image. Are you able to provide reproduction steps using `curl`?
>
> ```
> ❯ docker run -p 15984:5984 --name couchdb -e COUCHDB_USER=foo -e COUCHDB_PASSWORD=bar -d apache/couchdb:3.0.0
> 1879c71d0eafdbb6d0836277d689de5d53061f75c3e8b7c35278f6cd3af1fd74
>
> ❯ curl foo:bar@localhost:15984/db1 -XPUT
> {"ok":true}
>
> ❯ curl foo:bar@localhost:15984/db1/doc1 -XPUT -d '{ "type": "TAGS", "origin_id": "2", "locale": "sv_SE", "values_translation": { "name": "Glasstårta", "explanation": "", "links": [], "alternativeTitle": [] } }'
> {"ok":true,"id":"doc1","rev":"1-ac04d6c912096181503c60944f35d5a2"}
>
> ❯ curl foo:bar@localhost:15984/db1/doc1
> {"_id":"doc1","_rev":"1-ac04d6c912096181503c60944f35d5a2","type":"TAGS","origin_id":"2","locale":"sv_SE","values_translation":{"name":"Glasstårta","explanation":"","links":[],"alternativeTitle":[]}}
>
> ❯ curl 'foo:bar@localhost:15984/db1/_all_docs?include_docs=true'
> {"total_rows":1,"offset":0,"rows":[
> {"id":"doc1","key":"doc1","value":{"rev":"1-ac04d6c912096181503c60944f35d5a2"},"doc":{"_id":"doc1","_rev":"1-ac04d6c912096181503c60944f35d5a2","type":"TAGS","origin_id":"2","locale":"sv_SE","values_translation":{"name":"Glasstårta","explanation":"","links":[],"alternativeTitle":[]}}}
> ]}
>
> ❯ curl 'foo:bar@localhost:15984/db1/_design/foo' -XPUT -d '{"views":{"bar":{"map":"function(doc){emit([doc.type, doc.origin_id]);}"}}}'
> {"ok":true,"id":"_design/foo","rev":"1-c3ad517780c931044cbb1c8e88bf46b6"}
>
> ❯ curl 'foo:bar@localhost:15984/db1/_design/foo/_view/bar?key=["TAGS","2"]' -g
> {"total_rows":1,"offset":0,"rows":[
> {"id":"doc1","key":["TAGS","2"],"value":null}
> ]}
>
> ❯ curl 'foo:bar@localhost:15984/db1/_design/foo/_view/bar?key=["TAGS","2"]&include_docs=true' -g
> {"total_rows":1,"offset":0,"rows":[
> {"id":"doc1","key":["TAGS","2"],"value":null,"doc":{"_id":"doc1","_rev":"1-ac04d6c912096181503c60944f35d5a2","type":"TAGS","origin_id":"2","locale":"sv_SE","values_translation":{"name":"Glasstårta","explanation":"","links":[],"alternativeTitle":[]}}}
> ]}
> ```
My `curl` request
`http://user:pass@localhost:5987/db/_design/contrans/_view/type_id?key=["TAGS","2"]&include_docs=true`
and the response:
`{
"error": "invalid_json",
"reason": "{599,invalid_string}",
"ref": 3722911048
}`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services