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 Failed to Fetch #162

Open
kovasap opened this issue Jul 12, 2021 · 8 comments
Open

Couchdb Failed to Fetch #162

kovasap opened this issue Jul 12, 2021 · 8 comments

Comments

@kovasap
Copy link

kovasap commented Jul 12, 2021

I've set up a couchdb with both http and https and can access it just fine from my web browser. However, the nomie app gives me "failed to fetch" errors with both addresses. Is there a way for the app to give me more info about why it is failing? I followed this doc: https://github.com/happydata/nomie-docs/blob/master/development/couchdb-setup.md, is it up to date?

Also for context #161 would be my ideal use case here, perhaps it makes more sense for me to help with that then pursue this? How hard would that feature request be to add?

@arooni
Copy link

arooni commented Aug 10, 2021

same exact error here

@arooni
Copy link

arooni commented Aug 10, 2021

well i was following the guide and when i was running

http://username:password@localhost:5984

brazil /opt/couchdb/etc: curl -X PUT $AUTHOST/_config/httpd/enable_cors -d '"true"'
{"error":"not_found","reason":"Database does not exist."}

@arooni
Copy link

arooni commented Aug 10, 2021

also getting fail to fetch

@arooni
Copy link

arooni commented Aug 10, 2021

i was able to make the changes directly to the couchdb local.ini file ; restarted couchdb ; see here:

https://gist.github.com/arooni/e0b3648043c954e1c8bd75dc3aadaf0a

however still getting the fail to fetch; it works fine from a web browser at home accessing http://username:passwored@myvpsip/nomie

has anyone gotten this working at all? would rather not spend any more time on it if no one has yet succeeded.

@arooni
Copy link

arooni commented Aug 12, 2021

followed all instructions and enabled CORS from https://github.com/happydata/nomie-docs/blob/master/development/couchdb-setup.md

Also wanted to add that I saw nothing from the /var/log/couchdb/couchdb.log when tailing it

so it seems like the request isn't even being made to my VPS server. i double checked everything and it's all right.

@arooni
Copy link

arooni commented Aug 13, 2021

got it working! key points:

  1. use browser tools (dev tools in chrome) ; nomie seems to have very helpful debug messages printed out via js or at least chrome picks up on things.
  2. set CORS on via couchdb
  3. make sure you don't allow requests from all domains but rather just v5.nomie.app and nomie.app
  4. i had to setup ssl to get it working. it didn't seem to want to sync over regular http (because perhaps nomie.app is only on served over ssl)
  5. the couchdb folks on slack were helpful in getting things setup.

many thanks!

very happy to have multi device sync now :) :) :)

@arooni
Copy link

arooni commented Aug 13, 2021

now; it seems like even though i've got it all working, and multiple devices were able to connect; and i selected "yes" to save the connection...

it seems like when i go back to settings, nomie has forgotten about the couchdb i've linked previously. and the size is of the couchdb database is 0 bytes.

@pallavi
Copy link

pallavi commented Feb 9, 2022

it seems like when i go back to settings, nomie has forgotten about the couchdb i've linked previously. and the size is of the couchdb database is 0 bytes.

@arooni i was running into this too and had to manually save the couchdb details in localstorage. i think there is a bug (described by @bjafl in #165) where nomie immediately overwrites the db details in localStorage right after they get saved.

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