Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Αναζήτηση στην υποστήριξη

Προσοχή στις απάτες! Δεν θα σας ζητήσουμε ποτέ να καλέσετε ή να στείλετε μήνυμα σε κάποιον αριθμό τηλεφώνου ή να μοιραστείτε προσωπικά δεδομένα. Αναφέρετε τυχόν ύποπτη δραστηριότητα μέσω της επιλογής «Αναφορά κατάχρησης».

Learn More

get/setCookieString() no longer working in Firefox 78 ESR

  • 3 απαντήσεις
  • 1 έχει αυτό το πρόβλημα
  • 27 προβολές
  • Τελευταία απάντηση από TyDraniu

more options

After moving to Firefox 78 ESR, get/setCookieString() is no longer working. For example:

       if (cookieService != null) {
           cookieService.setCookieString(cookieUri, null, "CertCheckDone=1;", null);
           myTrace("cookie is " + cookieService.getCookieString(cookieUri, null));
       }
   }

Firefox is running in kiosk mode and this code was executed with a hook in browser.js. Can someone please help me with this? Are there APIs I can use in place of these or are the Webextension APIs the only way to set a cookie now? I have tried playing around and can load a temporary extension but it's removed when restarting the browser and this also has to run in kiosk mode.

After moving to Firefox 78 ESR, get/setCookieString() is no longer working. For example: if (cookieService != null) { cookieService.setCookieString(cookieUri, null, "CertCheckDone=1;", null); myTrace("cookie is " + cookieService.getCookieString(cookieUri, null)); } } Firefox is running in kiosk mode and this code was executed with a hook in browser.js. Can someone please help me with this? Are there APIs I can use in place of these or are the Webextension APIs the only way to set a cookie now? I have tried playing around and can load a temporary extension but it's removed when restarting the browser and this also has to run in kiosk mode.

Όλες οι απαντήσεις (3)

more options

setCookieString() has been removed in bug 1632187 in favor of setCookieStringFromDocument(this, cookie).

You can read and set a cookie with web-ext API, see -> https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies

more options

Thank you! Can you show me an example?

[Exception... "Could not convert JavaScript argument arg 0 [nsICookieService.getCookieStringFromDocument]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://browser/content/browser.js :: kioskIsCertCookieExists :: line 9532" data: no]

more options

I'm not very familiar with this.