You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to set domain via extraCookieOptions. Test suite failing with error message - Cookie has domain set to the public suffix "localhost" which is a special use domain
#170
Closed
sachinm opened this issue
Aug 24, 2022
· 2 comments
Unit test failing with the error message:
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}
Below is the component definition:
<CookieConsent
style={{
background: '#e2e3ef',
color: '#6b7286'
}}
location='bottom'
buttonText='Accept'
extraCookieOptions={{
domain:'.testing-cookieconsent.com'
}}>We use cookies to improve your website experience.
Full stack-trace of error msg in my react/typescript app:
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 (node_modules/tough-cookie/lib/pubsuffix-psl.js:62:11)
at permuteDomain (node_modules/tough-cookie/lib/permuteDomain.js:38:28)
at MemoryCookieStore.findCookies (node_modules/tough-cookie/lib/memstore.js:99:21)
at MemoryCookieStore.findCookies (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookies (node_modules/tough-cookie/lib/cookie.js:1407:11)
at CookieJar.getCookies (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookieString (node_modules/tough-cookie/lib/cookie.js:1452:21)
at CookieJar.getCookieString (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookieStringSync (node_modules/tough-cookie/lib/cookie.js:1723:17)
at DocumentImpl.get cookie [as cookie] (node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:860:28)
Anyone else run into this issue and suggest possible solution? thanks in advance
The text was updated successfully, but these errors were encountered:
Unit test failing with the error message:
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}
Below is the component definition:
<CookieConsent
style={{
background: '#e2e3ef',
color: '#6b7286'
}}
location='bottom'
buttonText='Accept'
extraCookieOptions={{
domain:'.testing-cookieconsent.com'
}}>We use cookies to improve your website experience.
Full stack-trace of error msg in my react/typescript app:
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 (node_modules/tough-cookie/lib/pubsuffix-psl.js:62:11)
at permuteDomain (node_modules/tough-cookie/lib/permuteDomain.js:38:28)
at MemoryCookieStore.findCookies (node_modules/tough-cookie/lib/memstore.js:99:21)
at MemoryCookieStore.findCookies (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookies (node_modules/tough-cookie/lib/cookie.js:1407:11)
at CookieJar.getCookies (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookieString (node_modules/tough-cookie/lib/cookie.js:1452:21)
at CookieJar.getCookieString (node_modules/tough-cookie/node_modules/universalify/index.js:5:67)
at CookieJar.getCookieStringSync (node_modules/tough-cookie/lib/cookie.js:1723:17)
at DocumentImpl.get cookie [as cookie] (node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:860:28)
Anyone else run into this issue and suggest possible solution? thanks in advance
The text was updated successfully, but these errors were encountered: