Childbrowser seems to cause a WebKit error in iOS5 and Xcode 4.2

597 views
Skip to first unread message

sromalewski

unread,
Jan 9, 2012, 1:21:19 AM1/9/12
to phonegap
Several people have described different versions of a problem that
occurs with the Childbrowser plugin and iOS5. I've experienced the
issue whether I'm using Phonegap 1.1.0 or in a new project (in Xcode
4.2) with PG 1.3.0 and the latest CB plugin.

The problem is that after several successful taps on links or images
that call the CB plugin (and open the Childbrowser window as
expected), the next tap triggers the following message in the console:

*** WebKit discarded an uncaught exception in the
webView:decidePolicyForNavigationAction:request:frame:decisionListener:
delegate: <NSInvalidArgumentException> Application tried to present
modally an active controller <PhoneGapViewController: 0x913a9a0>.

Once this happens, further taps on links or images that call
Childbrowser don't work, and the app then doesn't work properly at
all.

I should point out that I'm using the Datazombies fork of jQTouch to
bind tap events to links and images, and these call Childbrowser.

Several people have mentioned this in the Google Group, such as:
- http://groups.google.com/group/phonegap/browse_thread/thread/f8dc9e6f02c6e376#
and
- http://groups.google.com/group/phonegap/browse_thread/thread/77fcd1b17fdece4e/851351d27f274628#851351d27f274628
.. but no one has received replies yet about this problem.

Others have noted this type of error at stackoverflow, though not
necessarily related to Phonegap. Here are some examples:
- http://stackoverflow.com/questions/7812061/new-error-in-ios-5-webkit-discarded-an-uncaught-exception
- http://stackoverflow.com/questions/7883899/ios-5-uiwebview-delegate-webkit-discarded-an-uncaught-exception-in-the-webview

I'm not sure how to implement any of the Objective-C solutions
referenced at Stackoverflow. Any insights/suggestions would be
greatly appreciated.

Steve

sromalewski

unread,
Jan 9, 2012, 1:43:36 AM1/9/12
to phonegap
Btw, this problem seems to go away if I run the app on an iPhone
simulator earlier than 5.0 (either 4.2 or 4.3, for example), even
though I've developed the app using Xcode 4.2 with iOS 5.0.

On Jan 9, 1:21 am, sromalewski <spatialitya...@gmail.com> wrote:
> Several people have described different versions of a problem that
> occurs with the Childbrowser plugin and iOS5.  I've experienced the
> issue whether I'm using Phonegap 1.1.0 or in a new project (in Xcode
> 4.2) with PG 1.3.0 and the latest CB plugin.
>
> The problem is that after several successful taps on links or images
> that call the CB plugin (and open the Childbrowser window as
> expected), the next tap triggers the following message in the console:
>
> *** WebKit discarded an uncaught exception in the
> webView:decidePolicyForNavigationAction:request:frame:decisionListener:
> delegate: <NSInvalidArgumentException> Application tried to present
> modally an active controller <PhoneGapViewController: 0x913a9a0>.
>
> Once this happens, further taps on links or images that call
> Childbrowser don't work, and the app then doesn't work properly at
> all.
>
> I should point out that I'm using the Datazombies fork of jQTouch to
> bind tap events to links and images, and these call Childbrowser.
>
> Several people have mentioned this in the Google Group, such as:
> -http://groups.google.com/group/phonegap/browse_thread/thread/f8dc9e6f...
> and
> -http://groups.google.com/group/phonegap/browse_thread/thread/77fcd1b1...
> .. but no one has received replies yet about this problem.
>
> Others have noted this type of error at stackoverflow, though not
> necessarily related to Phonegap.  Here are some examples:
> -http://stackoverflow.com/questions/7812061/new-error-in-ios-5-webkit-...
> -http://stackoverflow.com/questions/7883899/ios-5-uiwebview-delegate-w...

sromalewski

unread,
Jan 9, 2012, 11:15:39 PM1/9/12
to phonegap
The problem also happens on an actual iPhone, running iOS5.

sromalewski

unread,
Jan 10, 2012, 9:34:03 AM1/10/12
to phonegap
The problem also happens after going back to Phonegap 1.2.0. Please
help!

kore

unread,
Feb 23, 2012, 1:56:03 PM2/23/12
to phonegap
If you are using jquery mobile and you encounter the error described
here,
have a look here: https://groups.google.com/forum/#!msg/phonegap/-NyebwLG43Y/UuTDRMW-xKMJ
It seems that jquery mobile is causing the error by sometimes firing
the click event twice.
For me it worked after unbinding/preventing the second click event.
Reply all
Reply to author
Forward
0 new messages