Skip to content

Error: Cookie has domain set to the public suffix "localhost" which is a special use domain. #587

Description

@kennsippell

Describe the bug
Its a crash

To Reproduce

  1. npx cht --local

Expected behavior
Should be able to deploy locally

Logs

INFO Starting action: backup-all-forms… 
INFO Error: Cookie has domain set to the public suffix "localhost" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain:true, rejectPublicSuffixes: false}.
    at Object.getPublicSuffix (/home/kenn/config-echis-2.0/node_modules/tough-cookie/lib/pubsuffix-psl.js:62:11)
    at permuteDomain (/home/kenn/config-echis-2.0/node_modules/tough-cookie/lib/permuteDomain.js:38:28)
    at MemoryCookieStore.findCookies (/home/kenn/config-echis-2.0/node_modules/tough-cookie/lib/memstore.js:99:21)
    at MemoryCookieStore.findCookies (/home/kenn/config-echis-2.0/node_modules/universalify/index.js:5:67)
    at CookieJar.getCookies (/home/kenn/config-echis-2.0/node_modules/tough-cookie/lib/cookie.js:1410:11)
    at CookieJar.getCookies (/home/kenn/config-echis-2.0/node_modules/universalify/index.js:5:67)
    at CookieJar.getCookieString (/home/kenn/config-echis-2.0/node_modules/tough-cookie/lib/cookie.js:1455:21)
    at CookieJar.getCookieString (/home/kenn/config-echis-2.0/node_modules/universalify/index.js:5:67)
    at node:internal/util:364:7
    at new Promise (<anonymous>)
    at bound getCookieString (node:internal/util:350:12)
    at fetchCookie (/home/kenn/config-echis-2.0/node_modules/fetch-cookie/index.js:15:26)
    at ourFetch (/home/kenn/config-echis-2.0/node_modules/pouchdb-adapter-http/lib/index.js:218:12)
    at fetchJSON (/home/kenn/config-echis-2.0/node_modules/pouchdb-adapter-http/lib/index.js:246:12)
    at setup (/home/kenn/config-echis-2.0/node_modules/pouchdb-adapter-http/lib/index.js:294:20)
    at PouchDB.HttpPouch.api.fetch (/home/kenn/config-echis-2.0/node_modules/pouchdb-adapter-http/lib/index.js:467:12) 
ERROR Cookie has domain set to the public suffix "localhost" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain:true, rejectPublicSuffixes: false}. 

Environment

  • Instance: localhost
  • Client platform: Ubuntu
  • export COUCH_URL=http://medic:pwd@localhost:6984/medic
  • cht-conf version: 3.18.3
  • cht-core version: 4.4

Additional context
Kenya eCHIS local testing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugFix something that isn't working as intended

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions