Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

"HTTP 400 Cannot index view ... no map block registered" is returned after adding new documents #109

Open
lasselaakkonen opened this issue Nov 5, 2018 · 1 comment
Labels

Comments

@lasselaakkonen
Copy link

Router unable to route request to do_GET_DesignDocumentcom.couchbase.lite.CouchbaseLiteException: Cannot index view foo1/foo1: no map block registered, Status: 400 (HTTP 400 bad_request) is returned when querying a design document, after app is restarted and new documents are added to the database.

Reproducing

  • Install Cordova HelloWorld app with cordova@6.5.0, cordova-android@6.4.0, couchbase-lite-phonegap-plugin@1.4.4
  • Create a DB
  • Add a design doc that is only map: function(doc) { emit(doc._id, {}); }.toString()
  • Add some dummy documents
  • Query the design doc -> Query works and documents are returned
  • Close the app and restart it
  • Query the design doc -> Query works and documents are returned
  • Add some dummy documents
  • Query the design doc -> HTTP 400 is returned

Same issue can be reproduced by eg installing an older version of CBL, creating the db and documents, then during the restart updating to v1.4.4.

Reproduced with:

  • cordova@6.5.0, cordova-android@6.4.0, couchbase-lite-phonegap-plugin@1.4.4

Not reproduced with:

  • cordova@6.5.0, cordova-android@6.4.0, couchbase-lite-phonegap-plugin@1.3.1
  • cordova@6.5.0, cordova-android@6.4.0, couchbase-lite-phonegap-plugin@1.4.1
@lasselaakkonen
Copy link
Author

Since cordova-android@7 does not work with couchbase-lite-phonegap-plugin@1.4.1 and couchbase-lite-phonegap-plugin@1.4.4 would work, but it is broken, here is a fork of couchbase-lite-phonegap-plugin@1.4.1, which has the necessary changes for it to work with cordova-android@7:
https://github.com/lasselaakkonen/Couchbase-Lite-PhoneGap-Plugin/tree/fix-cordova-android-7-dependencies

@djpongh djpongh added the icebox label Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants