Closed Bug 1162353 Opened 9 years ago Closed 8 years ago

Unable to use https://example.com in B2G mochitest

Categories

(Testing :: Mochitest, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: pehrsons, Unassigned)

References

Details

As part of bug 1032848 I'm adding a test with an image element that's loading an image from https://example.com. This works on all platforms except B2G, where I get the following error:

> 05:38:30  WARNING -  05-06 12:19:08.606 E/GeckoConsole(  728): [JavaScript Error: "example.com:443 uses an invalid security certificate.
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728):
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728): The certificate is not trusted because the issuer certificate is unknown.
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728): The server might not be sending the appropriate intermediate certificates.
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728): An additional root certificate may need to be imported.
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728):
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728): (Error code: sec_error_unknown_issuer)
> 05:38:30     INFO -  05-06 12:19:08.606 E/GeckoConsole(  728): "]

See my original mochitest failures on try here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=483aa1f2470d

Here's the log from one of the B2G failures:
http://ftp.mozilla.org/pub/mozilla.org/b2g/try-builds/pehrsons@gmail.com-483aa1f2470d/try-emulator-debug/try_ubuntu64_vm-b2g-emulator-debug_test-mochitest-debug-6-bm123-tests1-linux64-build209.txt.gz
(Search for 'sec_error_unknown_issuer' - marketplace.firefox.com shows up as well)

It works if I use http instead:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d86d94925825

I'll be switching to http in my patch to work around this issue, but I would really have expected https to work out of the box, like on the other platforms.
The B2GMochitest build_profile method:
https://hg.mozilla.org/mozilla-central/annotate/617dbce26726/testing/mochitest/runtestsb2g.py#l84

doesn't install the testing CA cert to the profile it creates, like the base Mochitest buildProfile method does:
https://hg.mozilla.org/mozilla-central/annotate/617dbce26726/testing/mochitest/runtests.py#l1438

Probably because this requires host certutil/pk12util binaries. Although if you're running ssltunnel you must have a host binaries package available...

Fixing bug 1117750 would also make this easier, since it'd remove the host binary requirement.
This was also mentioned in bug 907770, comment 62.
B2G-related code gets removed from mozilla-central, see bug 1306391. So this bug is a WONTFIX.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.