Stepping through the code, I noticed this error appears in log cat as I
step over the certificate chooser invocation:

[JavaScript Error: "this.getPrompt(...).addLabel(...).addMenuList is not a
function" {file: 
"jar:jar:file:///data/app/org.mozilla.fennec_cwallace-1.apk!/assets/omni.ja
!/components/NSSDialogService.js" line: 188}]

Looks like the JavaScript dialogs are being invoked but the JavaScript is
busted.  

On 10/9/13 11:47 AM, "Kartikaya Gupta" <[email protected]> wrote:

>Hm, that's interesting. Do you have any other changes to the Fennec
>build? There are a couple of manifest files at
>mobile/android/components/MobileComponents.manifest and
>mobile/android/install/package-manifest.in that are responsible for
>pulling in the NSSDialogService.js file and registering it as the
>implementation for the nsIClientAuthDialogs implementation. If you don't
>have any changes there then I'm not sure what's going on.
>
>Cheers,
>kats
>
>On 13-10-09 11:36 , Carl Wallace wrote:
>> Version is fennec-27.0a1. Yes, the code looks like the code in your
>>link.
>> The error code noted below is returned from the
>>dialogs->ChooseCertificate
>> invocation.
>>
>> On 10/9/13 11:23 AM, "Kartikaya Gupta" <[email protected]> wrote:
>>
>>> What version of the code are you using? In the latest version of
>>> nsNSSIOLayer.cpp the code does the appropriate magic to get the right
>>> interface implementation [1]. Does the version of the code you are
>>> running also do that?
>>>
>>> [1]
>>> 
>>>http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/src/n
>>>sN
>>> SSIOLayer.cpp#2449
>>>
>>> On 13-10-09 11:06 , Carl Wallace wrote:
>>>> I set a breakpoint on the call to ChooseCertificate.  Here is the
>>>> backtrace:
>>>>
>>>> #0  ClientAuthDataRunnable::RunOnTargetThread (this=0x670a3920) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>se
>>>> cu
>>>> rity/manager/ssl/src/nsNSSIOLayer.cpp:2550
>>>> #1  0x5cca8bbc in mozilla::psm::SyncRunnableBase::Run
>>>>(this=0x670a3920)
>>>> at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>se
>>>> cu
>>>> rity/manager/ssl/src/PSMRunnable.cpp:35
>>>> #2  0x5d76862a in nsThread::ProcessNextEvent (this=0x52402320,
>>>> mayWait=true, result=0x53bb5867) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>xp
>>>> co
>>>> m/threads/nsThread.cpp:622
>>>> #3  0x5d702748 in NS_ProcessNextEvent (thread=0x52402320,
>>>>mayWait=true)
>>>> at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>xp
>>>> co
>>>> m/glue/nsThreadUtils.cpp:238
>>>> #4  0x5ceeda3a in mozilla::ipc::MessagePump::Run (this=0x52401cd0,
>>>> aDelegate=0x524630c0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>ip
>>>> c/
>>>> glue/MessagePump.cpp:116
>>>> #5  0x5d7e689c in MessageLoop::RunInternal (this=0x524630c0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>ip
>>>> c/
>>>> chromium/src/base/message_loop.cc:220
>>>> #6  0x5d7e683e in MessageLoop::RunHandler (this=0x524630c0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>ip
>>>> c/
>>>> chromium/src/base/message_loop.cc:213
>>>> #7  0x5d7e67e6 in MessageLoop::Run (this=0x524630c0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>ip
>>>> c/
>>>> chromium/src/base/message_loop.cc:187
>>>> #8  0x5cded15c in nsBaseAppShell::Run (this=0x52411060) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>wi
>>>> dg
>>>> et/xpwidgets/nsBaseAppShell.cpp:161
>>>> #9  0x5cbd914e in nsAppStartup::Run (this=0x635a3e80) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>to
>>>> ol
>>>> kit/components/startup/nsAppStartup.cpp:269
>>>> #10 0x5b86666a in XREMain::XRE_mainRun (this=0x53bb5af0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>to
>>>> ol
>>>> kit/xre/nsAppRunner.cpp:3869
>>>> #11 0x5b866880 in XREMain::XRE_main (this=0x53bb5af0, argc=9,
>>>> argv=0x52436148, aAppData=0x512c2d90 <sAppData>) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>to
>>>> ol
>>>> kit/xre/nsAppRunner.cpp:3937
>>>> #12 0x5b866a16 in XRE_main (argc=9, argv=0x52436148,
>>>>aAppData=0x512c2d90
>>>> <sAppData>, aFlags=0) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>to
>>>> ol
>>>> kit/xre/nsAppRunner.cpp:4139
>>>> #13 0x5b85a8fa in GeckoStart (data=0x5244a1a0, appData=0x512c2d90
>>>> <sAppData>) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>to
>>>> ol
>>>> kit/xre/nsAndroidStartup.cpp:73
>>>> #14 0x5124dc3c in Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun
>>>> (jenv=0x5120db20, jc=0x21a00001, jargs=0x21000005) at
>>>>
>>>> 
>>>>/Users/cwallace/3rdparty-sources/AndroidProjects/temp2/mozilla-central/
>>>>mo
>>>> zg
>>>> lue/android/APKOpen.cpp:379
>>>> #15 0x408d2ef4 in ?? ()
>>>> #16 0x408d2ef4 in ?? ()
>>>>
>>>>
>>>>
>>>> On 10/9/13 9:41 AM, "Kartikaya Gupta" <[email protected]> wrote:
>>>>
>>>>> On Fennec we have provided our own version of the
>>>>>nsIClientAuthDialogs
>>>>> interface, so code execution should never hit
>>>>> nsNSSDialogs::ChooseCertificate [1]. It should instead hit the JS
>>>>> version at [2]. The reason for this is that attempting to open a XUL
>>>>> dialog will not work on Fennec because of the native Android
>>>>> integration; the JS version we use should pop up a native-Android
>>>>> dialog
>>>>> that is equivalent.
>>>>>
>>>>> If you see code execution going into [1] please try to provide a
>>>>> backtrace so that we can figure out why it's going in there and how
>>>>>to
>>>>> fix it. If you don't want to build Fennec yourself and attach gdb,
>>>>> please file a bug with the code that's triggering the call to [1] and
>>>>> we
>>>>> can track it down.
>>>>>
>>>>> Cheers,
>>>>> kats
>>>>>
>>>>> [1]
>>>>>
>>>>> 
>>>>>http://mxr.mozilla.org/mozilla-central/source/security/manager/pki/src
>>>>>/n
>>>>> sN
>>>>> SSDialogs.cpp#222
>>>>> [2]
>>>>>
>>>>> 
>>>>>http://mxr.mozilla.org/mozilla-central/source/mobile/android/component
>>>>>s/
>>>>> NS
>>>>> SDialogService.js#157
>>>>>
>>>>> On 13-10-09 09:19 , Carl Wallace wrote:
>>>>>> I've had some success with integrating pcscd and libcoolkey with
>>>>>> Fennec
>>>>>> and have been able to authenticate using a private key stored on a
>>>>>> microSD
>>>>>> card through that stack (though I still have the exceptions issue
>>>>>> mentioned in another thread).  I am prompted for a PIN and can
>>>>>> successfully access resources on the server that require client
>>>>>> authentication.  However, in order to get the code to present a
>>>>>>client
>>>>>> certificate, I had to temporarily hard code a selection index that
>>>>>> should
>>>>>> be set by a dialog that is not being displayed.  The
>>>>>> nsNSSDialogs::ChooseCertificate function is failing with error code
>>>>>> 80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS).  Internally,
>>>>>> this
>>>>>> function launches a dialog using the nssDialogHelper class as
>>>>>>follows:
>>>>>>
>>>>>>      rv = nsNSSDialogHelper::openDialog(nullptr,
>>>>>> "chrome://pippki/content/clientauthask.xul", block);
>>>>>>
>>>>>> Is there a browser configuration or build setting that needs to be
>>>>>> changed
>>>>>> in order for this dialog to be displayed?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> mobile-firefox-dev mailing list
>>>>>> [email protected]
>>>>>> https://mail.mozilla.org/listinfo/mobile-firefox-dev
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to