document.cookie is not being set on B2G and we can't access it

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
6 years ago
6 years ago

People

(Reporter: automatedtester, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
On B2G we can't access document.cookie from the browser and from inside an app.

If I run this and then click on the button then I dont get the alert to appear. 

<!DOCTYPE html>
 <body>
  <button onclick="cookieInfo()">Cookies!!!!!</button>
  <script>
document.cookie = "name=foo";
var cookieInfo = function () {
  alert(document.cookie)
}
</script>
</body>
</html>
If the alert doesn't show at all, that doesn't mean that document.cookie is empty -- that means that the function is not running at all.
I just tested this in the b2g browser and it works fine for me.
(Reporter)

Comment 3

6 years ago
:jlebar is this B2G desktop or is this on a device/emulator? I am currently getting the issue on the emulator and device. Just so I can check that I am on the right revision when did you last update?
I tested on the device itself by hosting the code on my laptop and visiting the site in the B2G browser.  I don't know how to pull the gecko rev off the device, and unfortunately the machine I used to flash the phone is currently inoperable.

I flashed about a week ago.
(Reporter)

Comment 5

6 years ago
I will try again on with the latest code
Flags: needinfo?(dburns)
Putting qawanted to investigate (I'll try to help David out as well).

Noming too - if this is happening, it definitely blocks.
blocking-basecamp: --- → ?
Keywords: qawanted
QA Contact: jsmith
(Reporter)

Comment 7

6 years ago
very weird but it appears to be working now. Sorry for the false alarm
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: needinfo?(dburns)
Resolution: --- → WORKSFORME
blocking-basecamp: ? → ---
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.