If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Jetpack: cross-origin XHR doesn't work, with sdk/request nor jquery's AJAX

RESOLVED WORKSFORME

Status

Add-on SDK
General
RESOLVED WORKSFORME
3 years ago
2 years ago

People

(Reporter: Ivan Kay, Unassigned, NeedInfo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141011015303

Steps to reproduce:

Extract these extensions, and run them in Windows 7 x86 with Firefox 33.0 under the addon SDK 1.17 with the command "cfx run"

https://media.sq10.net/fl/infore-jetpack-request.zip
https://media.sq10.net/fl/infore-jquery-ajax.zip

Then, click on the Firefox icon on the extensions panel to open a popup. Check the console for XHR results.

The URL that the XHR is trying to fetch is https://www.allthingsmine.com/currentUser


Actual results:

jetpack-request: status was 0.
jquery-ajax: status was 404.


Expected results:

both extensions should return 

status: 401, with text data "Authentication required"
The problem seems to be that you have a self-signed SSL cert - if I go to https://www.allthingsmine.com/currentUser in a tab and accept the SSL cert for the current session and then hit click on the button, the 'request' version works and I see:

console.log: infore: {"status":401,"data":"Authentication required"}

Firefox will not make an untrusted connections to SSL sites without user input.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 2

3 years ago
(In reply to Jeff Griffiths (:canuckistani) from comment #1)
> The problem seems to be that you have a self-signed SSL cert
It's not my website, but the cert is verified by COMODO.

> Firefox will not make an untrusted connections to SSL sites without user
> input.

I recently learned that if I were to install and then run the extension, it would run just fine. It only doesn't work with cfx.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Flags: needinfo?(jgriffiths)
Flags: needinfo?(jgriffiths)
(In reply to Ivan Kay from comment #2)
> (In reply to Jeff Griffiths (:canuckistani) from comment #1)
> > The problem seems to be that you have a self-signed SSL cert
> It's not my website, but the cert is verified by COMODO.
> 
> > Firefox will not make an untrusted connections to SSL sites without user
> > input.
> 
> I recently learned that if I were to install and then run the extension, it
> would run just fine. It only doesn't work with cfx.

well if that is the case, can you try with jpm?  I imagine your add-on will work with jpm, and we aren't fixing cfx anymore.
Flags: needinfo?(ivan)

Comment 4

2 years ago
[Tracking Requested - why for this release]:
tracking-b2g: --- → backlog

Updated

2 years ago
tracking-b2g: backlog → ---

Comment 5

2 years ago
well
flipping back to resolved.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.