- This topic has 9 replies, 2 voices, and was last updated 11 years, 2 months ago by support-michael.
-
AuthorPosts
-
Unknown AuthorParticipantMobione Cordova 2.2 is susceptible to this InAppBrowser crash issue:
https://issues.apache.org/jira/browse/CB-4147
To replicate it. Go into the RSS example, but change the viewArticle() function to the following. It uses Google Feed response format.
function viewArticle(idx) { curArticleIdx = idx; phoneui.showURL(theresult.responseData.feed.entries[curArticleIdx].link, '_child', {showLocationBar: true, showAddress: true, patchWindowClose: true, showNavigationBar: true,}); }
If one clicks directly, the app crashes. If, however, you move the list up or down, and then click, everything loads just fine. I have a video if anyone’s interested.
-1TC
support-michaelKeymaster>I have a video if anyone’s interested.
Yes, please share.
Unknown AuthorParticipantThis is the same issue as this thread:
http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=5326&p=20238#p20238
Unknown AuthorParticipantHere’s the video.
http://www.drruss.net/Mobione/
In the video, when the app crashes, the list item has been clicked on. When the app does not crash, the list has been moved up and down first, then clicked on. Using an iPhone 4S with the latest iOS 6 version. App compiled with Mobione Cordova 2.2 because I need the child browser. This crash does not happen under 2.9. However, I don’t have access to the child browser under 2.9, either. Ultimate solution: Child browser support under 2.9.
When the project is run in Test Center and the link is clicked, Test Center will attempt to open an external link 3 times. However, if the list has been moved up and down, it will attempt to open an external link only 2 times.
-1TC
support-michaelKeymasterThanks for the video and detailed explanation. This is very helpful. Will work on replicating the issue locally for dev team to address.
>This crash does not happen under 2.9. However, I don’t have access to the child browser under 2.9, either. Ultimate solution: Child browser support under 2.9.
In Cordova 2.9 the InAppBrowser provides the implementation for the phoneui.showUrl() function. A couple of thoughts for quick workaround:
1) (disclaimer: I don’t know that this will work) try running your showUrl() call in a setTimeout() with a very short delay of 50-100 ms2) or you can try the InAppBrowser api, window.open(url, ‘_blank’, options)
We are working on moving to cordova3 as soon as possible which will no longer provide the childbrowser (it is major jacked across platforms, especially android)
Unknown AuthorParticipantThanks.
The first suggestion I’ve tried and it didn’t stop the crashing under 2.2.
The second suggestion opens a new browser instance. Is it supposed to do that? I’d like to keep folks in the app itself if I could. My one major quam with 2.9 is that the in-app browser started zoomed in on one corner of the page, whereas the child browser acted more like Safari, showing the entire page. Is there a zoom parameter? The 2.9 browser always starts saying “Load Error” as well…
-1TC?
Unknown AuthorParticipantI’ve cracked it! Under Mobione Cordova 2.9:
function viewArticle(idx) { curArticleIdx = idx; url=theresult.responseData.feed.entries[curArticleIdx].link; url=encodeURI(url); window.open(url, '_blank','EnableViewPortScale=yes','location=yes'); }
The encodeURI prevents to load failure message at the beginning. The ViewPortScale enables zooming.
-1TC
Unknown AuthorParticipantWell…I still haven’t gotten to the root of the issue. The app isn’t crashing, but the location bar will say “Load Error” if I click the list directly, “Loading…” if I move the list up and down first. There’s still something not quite right.
For now, I’m just going to hide the location bar and go with this code:
function viewArticle(idx) { curArticleIdx = idx; url=theresult.responseData.feed.entries[curArticleIdx].link; url=encodeURI(url); window.open(url, '_blank','location=no,enableViewportScale=yes');}
-1TC
Unknown AuthorParticipantHere’s the source of the error/crashes:
NSURLErrorCancelled (-999)
“Returned when an asynchronous load is canceled. A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an NSURLConnection or NSURLDownload delegate will not receive this error if the download is canceled.”
Mobione is calling URLs more than once.
support-michaelKeymaster> window.open(url, ‘_blank’,’location=no,enableViewportScale=yes’);
Congrats on making progress. We are moving to InAppBrowser and will be recommending that app developers (not webapp/website devs) use the Cordova api directly. I kicked your analysis of the load error to the dev team to eval. The next release will include InAppBrowser patched in Cordova 2.9 with the 3.0 fix. I don’t know that it will address the Load Error because we are wrapping up testing shortly.
-
AuthorPosts