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 2021/01/21 13:29:07 UTC

[GitHub] [couchdb-fauxton] Never7Dice opened a new issue #1305: Encoded doc id, cannot open document or it's conflicts

Never7Dice opened a new issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305


   In our application we encode special characters in _id. But for some reason conflicts break the UI completely and clue to the issue can be seen in URL.
   
   What I did is:
   1. Created a document with _id = `color_Yellow_2021-01-21T12%3A02%3A51.089Z` in Angular PouchDB. Then I synced it to CouchDB (no problems at this point)
   2. Opened my application 2 times and made both of them go offline, so no continuous syncing with CouchDB present.
   3. I edited this `color_Yellow_2021-01-21T12%3A02%3A51.089Z` on both of the apps, producing 2 different revisions.
   4. Synced first app with CouchDB and then second, CouchDB chose the "Server-Selected Rev" and both applications are working fine.
   5. Try to open the `color_Yellow_2021-01-21T12%3A02%3A51.089Z` in Fauxton UI to see conflicts and I see empty page (clicked on the doc in all documents list)
   
   ![image](https://user-images.githubusercontent.com/34353798/105356221-2ed0ea00-5c04-11eb-86a3-e61a0d7f8d6e.png)
   The URL is `http://127.0.0.1:5984/_utils/#database/recorder_recorder/color_Yellow_2021-01-21T12%253A02%253A51.089Z` which is different from doc _id
   
   After few tries with refreshing sometimes I manage to open the page:
   ![image](https://user-images.githubusercontent.com/34353798/105356449-78b9d000-5c04-11eb-9914-5e035f985167.png)
   
   But when I click on conflicts I get this
   ![image](https://user-images.githubusercontent.com/34353798/105356515-8ff8bd80-5c04-11eb-81ed-ae7d3d9db3c0.png)
   With interesting URL `http://127.0.0.1:5984/_utils/#database/recorder_recorder/color_Yellow_2021-01-21T12%3A02%3A51.089Z/conflicts` that is different from the one on previous page.
   
   And if instead of clicking I go back and manually add `/conflicts` to the previous URL it loads properly:
   ![image](https://user-images.githubusercontent.com/34353798/105356726-d51cef80-5c04-11eb-964d-92f99e937b2c.png)
   URL is `http://127.0.0.1:5984/_utils/#database/recorder_recorder/color_Yellow_2021-01-21T12%253A02%253A51.089Z/conflicts`
   
   It seems like Fauxton tries to do some encoding/decoding and fails producing broken URLs that lead to nowhere.
   
   ## Environment
   Fauxton on Apache CouchDB v. 2.3.1
   PouchDB v. 7.2.1
   Google Chrome version 87.0.4280.141
   Windows 10 64bit
   


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Antonio-Maranhao commented on issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Antonio-Maranhao commented on issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305#issuecomment-765505413


   No. The fix was merged a month ago so it should be on the next CouchDB release, though I can't say when that will be.


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Antonio-Maranhao commented on issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Antonio-Maranhao commented on issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305#issuecomment-764990566


   This issue was fixed in https://github.com/apache/couchdb-fauxton/pull/1303. Fauxton was not generating the correct URL when the doc ID contains special characters such as `%`, just like in your example. If you type in the correct URL the Conflicts page opens fine as you described.
   
   > The URL is http://127.0.0.1:5984/_utils/#database/recorder_recorder/color_Yellow_2021-01-21T12%253A02%253A51.089Z which is different from doc _id
   
   This is expected because `color_Yellow_2021-01-21T12%253A02%253A51.089Z` is the URL-encoded equivalent to your doc ID `color_Yellow_2021-01-21T12%3A02%3A51.089Z`
   
   


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Never7Dice closed issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Never7Dice closed issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305


   


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Never7Dice closed issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Never7Dice closed issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305


   


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Never7Dice commented on issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Never7Dice commented on issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305#issuecomment-765336110


   Nice. So the fix is available in latest CouchDB v3?


----------------------------------------------------------------
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



[GitHub] [couchdb-fauxton] Antonio-Maranhao commented on issue #1305: Encoded doc id, cannot open document or it's conflicts

Posted by GitBox <gi...@apache.org>.
Antonio-Maranhao commented on issue #1305:
URL: https://github.com/apache/couchdb-fauxton/issues/1305#issuecomment-764990566


   This issue was fixed in https://github.com/apache/couchdb-fauxton/pull/1303. Fauxton was not generating the correct URL when the doc ID contains special characters such as `%`, just like in your example. If you type in the correct URL the Conflicts page opens fine as you described.
   
   > The URL is http://127.0.0.1:5984/_utils/#database/recorder_recorder/color_Yellow_2021-01-21T12%253A02%253A51.089Z which is different from doc _id
   
   This is expected because `color_Yellow_2021-01-21T12%253A02%253A51.089Z` is the URL-encoded equivalent to your doc ID `color_Yellow_2021-01-21T12%3A02%3A51.089Z`
   
   


----------------------------------------------------------------
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