Unable to create a PouchDB

Wappler Version :6
Operating System : Windows 11
Server Model: Node
Database Type: Pouch DB
Hosting Type: LocalWebServer

Expected behavior

What do you think should happen?

I should be able to create a local PouchDB to use as an offline only database.

Actual behavior

What actually happens?

I create a database but I am unable to apply the migrations and use the Pouch Db. An error occurs

How to reproduce

  1. Go to Database Manager
  2. Click add new
  3. Select Type Custom, Databse Pouch DB, name test, database test
  4. Click test get message Datbase Connection OK
  5. Click Save
  6. Add a new collection called test
    image
  7. Click apply database changes, add adescription click ok
  8. The new collection disappears and message saying no tables info available shows
    image.

I can see the following error message though:
TypeError: Cannot set properties of undefined (setting ‘meta’) at saveFieldMeta (file:///C:/Users/user/AppData/Local/Wappler%20Beta/resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:95:404) at Object. (file:///C:/Users/user/AppData/Local/Wappler%20Beta/resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:91:84367) at Object. (file:///C:/Users/user/AppData/Local/Wappler%20Beta/resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.js:8:65868) at HTMLInputElement.proxy (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules\jquery\dist\jquery.js:10780:13) at HTMLInputElement.dispatch (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules\jquery\dist\jquery.js:5430:27) at HTMLInputElement.elemData.handle (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules\jquery\dist\jquery.js:5234:28) at HTMLInputElement.sentryWrapped (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules@sentry\browser\dist\helpers.js:75:23) at HTMLInputElement.keydown (file:///C:/Users/user/AppData/Local/Wappler%20Beta/resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.js:8:66087) at HTMLInputElement.dispatch (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules\jquery\dist\jquery.js:5430:27) at HTMLInputElement.elemData.handle (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules\jquery\dist\jquery.js:5234:28) at HTMLInputElement.sentryWrapped (C:\Users\user\AppData\Local\Wappler Beta\resources\app\node_modules@sentry\browser\dist\helpers.js:75:23)

Settings look wrong, please try changing your current setting of Custom:

image

to Cloud Database

image

and update settings

Remember, even though your CouchDB is set up locally it is running in a separate docker container so is seen as running in an external cloud

Thanks @Hyperbytes I will give this a go later when I have access to the computer. So it’s not possible to use a pouch db offline only with no docker? My idea was to make this just a client side app that I would be storing local data in offline with no synch to an online database.

Thanks again

I don’t believe so, the current implementation of couchDB is based on a local docker container or online cloud deployment, again via to docker to, for example a digital Ocean droplet

if you want something entirely local with no CouchDB integration then you could just use a datastore I guess but Pouch in isolation does not appear to be catered for

You should be able to use PouchDB database only, without CouchDB, as a local database on your device only. If there’s an issue creating such a connection to PouchDB only, then most probably there’s a bug and it will be fixed in the next beta.

1 Like

Interesting, so you can use the pouch components, leave the couch database settings blank and it will work as a local store?
How will it understand the collections without being able to refer to the docker couchdb image?

PouchDB can be used as a standalone local database, where you use it on the client-side without any sync to a remote CouchDB database. In this mode, PouchDB operates independently and stores data locally in the browser’s IndexedDB.
That’s why there is a PouchDB (only) option when you create a database connection in the database manager:

I was able to recreate the bug creating a PouchDB connection, so it will be fixed in the next update.

2 Likes

Wow :exploding_head:, didn’t see that setting, nice feature (and i guess another video!)

2 Likes

i assume this still is not fixed as I can’t create a collection for a pouchdb (no couch)

1 Like

This has been fixed in the latest beta updates.

1 Like