Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Visitor
Ocelyn
Posts: 1
Registered: ‎11-25-2012
My Device: Blackberry Torch
My Carrier: SFR

Crash application on start : Phonegap + Sencha + Webwork

Hello everybody,

 

I'm facing a really hard problem porting my application to BlackBerry.

 

At first I was planning to port to OS6 using webwork : https://developer.blackberry.com/html5/download/sdk#smartphones

 

But I just realized it won't work with this webwork, so right now I'm just planning to port it to OS7 min in the first place.

 

I'm using phonegap cordova 2.2.0 and Sencha Touch 2.1.0 with the emulator 9930 7.0.0.318 and 9860 - 7.0.0.384.

 

When I compile my application everything works fine but when I launch it, only the Splash Screen appear and then the application close after few seconds.

 

The log is :

 

 0:01:06.311: cordovaExample [2012-11-25 16:16:43.888]: Logger enabled: GUID=79550613816, name=cordovaExample
 0:01:06.325: cordovaExample [2012-11-25 16:16:43.902]: Found plugin App = org.apache.cordova.app.App
 0:01:06.327: cordovaExample [2012-11-25 16:16:43.904]: Found plugin Device = org.apache.cordova.device.Device
 0:01:06.330: cordovaExample [2012-11-25 16:16:43.907]: Found plugin Camera = org.apache.cordova.camera.Camera
 0:01:06.332: cordovaExample [2012-11-25 16:16:43.909]: Found plugin NetworkStatus = org.apache.cordova.network.Network
 0:01:06.334: cordovaExample [2012-11-25 16:16:43.912]: Found plugin Notification = org.apache.cordova.notification.Notification
 0:01:06.337: cordovaExample [2012-11-25 16:16:43.915]: Found plugin Accelerometer = org.apache.cordova.accelerometer.Accelerometer
 0:01:06.340: cordovaExample [2012-11-25 16:16:43.917]: Found plugin Geolocation = org.apache.cordova.geolocation.Geolocation
 0:01:06.342: cordovaExample [2012-11-25 16:16:43.919]: Found plugin File = org.apache.cordova.file.FileManager
 0:01:06.344: cordovaExample [2012-11-25 16:16:43.921]: Found plugin FileTransfer = org.apache.cordova.http.FileTransfer
 0:01:06.346: cordovaExample [2012-11-25 16:16:43.924]: Found plugin Contacts = org.apache.cordova.pim.Contact
 0:01:06.349: cordovaExample [2012-11-25 16:16:43.926]: Found plugin Capture = org.apache.cordova.capture.MediaCapture
 0:01:06.351: cordovaExample [2012-11-25 16:16:43.929]: Found plugin Battery = org.apache.cordova.battery.Battery
 0:01:06.353: cordovaExample [2012-11-25 16:16:43.931]: Found plugin Media = org.apache.cordova.media.Media
 0:01:06.355: cordovaExample [2012-11-25 16:16:43.933]: Found plugin Globalization = org.apache.cordova.globalization.Globalization
 0:01:06.358: cordovaExample [2012-11-25 16:16:43.935]: Found plugin ChildBrowser = org.apache.cordova.plugins.childbrowser.ChildBrowser
 0:01:06.361: cordovaExample [2012-11-25 16:16:43.938]: Found plugin BarcodeScanner = org.apache.cordova.plugins.barcodescanner.BarcodeScanner
 0:01:06.369: cordovaExample [2012-11-25 16:16:43.946]: org.apache.cordova.CordovaExtension: invoking Cordova.onNativeReady.fire()
 0:01:07.696: cordovaExample [2012-11-25 16:16:45.274]: org.apache.cordova.api.PluginManagerFunction: Loading plugin class org.apache.cordova.network.Network
 0:01:07.699: VM:NCICv=59,w=0
 0:01:07.701: VM:NMACv=15,w=0
 0:01:07.708: cordovaExample [2012-11-25 16:16:45.285]: org.apache.cordova.api.PluginManagerFunction: Loading plugin class org.apache.cordova.device.Device
 0:01:09.641: AM: Exit net_rim_bb_datatags(268)

 

My plugins :

 

<plugins>
  <plugin name="App"            value="org.apache.cordova.app.App"/>
  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
  <plugin name="Globalization"  value="org.apache.cordova.globalization.Globalization"/>
  <plugin name="ChildBrowser" 	value="org.apache.cordova.plugins.childbrowser.ChildBrowser"/>
  <plugin name="BarcodeScanner" value="org.apache.cordova.plugins.barcodescanner.BarcodeScanner"/>
</plugins>

 

Here is my arborescence : http://ocelyn.com/client/arbo.jpg

 

And my index.html :

 

<!DOCTYPE HTML>
<html manifest="cache.appcache" lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>path</title>
    <style type="text/css">
        html, body {
            height: 100%;
            background-color: #fcfcfc
        }
        body {
                background: url(resources/img/low/bg.jpg) no-repeat center center;
                background-size: 100% 100%;
        }
        #appLoadingIndicator {
            position: absolute;
            top: 50%;
            margin-top: -15px;
            text-align: center;
            width: 100%;
            height: 30px;
            -webkit-animation-name: appLoadingIndicator;
            -webkit-animation-duration: 0.5s;
            -webkit-animation-iteration-count: infinite;
            -webkit-animation-direction: linear;
        }

        #appLoadingIndicator > * {
            display: inline-block;
            background-color: #333333;
            height: 30px;
            -webkit-border-radius: 15px;
            margin: 0 5px;
            width: 30px;
            opacity: 0.8;
        }

        @-webkit-keyframes appLoadingIndicator{
            0% {
                opacity: 0.8
            }
            50% {
                opacity: 0
            }
            100% {
                opacity: 0.8
            }
        }
    </style>
		
	<script type="text/javascript" src="cordova-2.2.0.js"></script>
	<script type="text/javascript" charset="utf-8" src="childbrowser.js"></script>
	<script type="text/javascript" charset="utf-8" src="barcodescanner.js"></script>
	<script type="text/javascript" charset="utf-8" src="globalization.js"></script>
	
	<script type="text/javascript" src="webworks.js"></script>
	
    <script src="jQuery.js"></script>
    <script src="jquery.jcryption.js"></script>
    <script src="jquery.json-2.3.min.js"></script>

    <script src="weinto.lib.js"></script>
    <script src="main.js"></script>
    <script src="query.js"></script>
    <script src="auth.js"></script>
    <script src="identification.js"></script>

    <script src="jquery.Jcrop.js"></script>
    <script src="jsOAuth.min.js"></script>
    <script src="JSLINQ.js"></script>
    <script src="twitter.js"></script>
    <script src="facebook.js"></script>	
	
    <script type="text/javascript">(function(i){function s(a){function b(a,j){var c=a.length,b,g;for(b=0;b<c;b++){g=a[b];var e=a,J=b,d=void 0;"string"==typeof g&&(g={path:g});g.shared?(g.version=g.shared,d=g.shared+g.path):(z.href=g.path,d=z.href);g.uri=d;g.key=h+"-"+d;f[d]=g;e[J]=g;g.type=j;g.index=b;g.collection=a;g.ready=!1;g.evaluated=!1}return a}var c;"string"==typeof a?(c=a,a=A(c)):c=JSON.stringify(a);var h=a.id,e=h+"-"+B+o,f={};this.key=e;this.css=b(a.css,"css");this.js=b(a.js,"js");this.assets=this.css.concat(this.js);this.getAsset=
function(a){return f[a]};this.store=function(){t(e,c)}}function p(a,b,c){var h=new XMLHttpRequest,c=c||C,a=a+(-1==a.indexOf("?")?"?":"&")+Date.now();try{h.open("GET",a,!0),h.onreadystatechange=function(){if(4==h.readyState){var a=h.status,d=h.responseText;200<=a&&300>a||304==a||0==a&&0<d.length?b(d):c()}},h.send(null)}catch(d){c()}}function K(a,b){var c=k.createElement("iframe");m.push({iframe:c,callback:b});c.src=a+".html";c.style.cssText="width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden";
k.body.appendChild(c)}function D(a,b,c){var d=!!a.shared;if(a.remote)b("");else{if(!d)var e=b,f=a.version,l,b=function(j){l=j.substring(0,f.length+4);l!=="/*"+f+"*/"?confirm("Requested: '"+a.uri+"' with checksum: "+f+" but received: "+l.substring(2,f.length)+"instead. Attempt to refresh the application?")&&L():e(j)};(d?K:p)(a.uri,b,c)}}function E(a){var b=a.data,a=a.source.window,c,d,e,f;c=0;for(d=m.length;c<d;c++)if(e=m[c],f=e.iframe,f.contentWindow===a){e.callback(b);k.body.removeChild(f);m.splice(c,
1);break}}function F(a){"undefined"!=typeof console&&(console.error||console.log).call(console,a)}function t(a,b){try{n.setItem(a,b)}catch(c){if(c.code==c.QUOTA_EXCEEDED_ERR&&q){var d=q.assets.map(function(a){return a.key}),e=0,f=n.length,l=!1,j;for(d.push(q.key);e<=f-1;)j=n.key(e),-1==d.indexOf(j)?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function L(){G||(G=!0,p(o,function(a){(new s(a)).store();i.location.reload()}))}function v(a){function b(a,
d){var b=a.collection,g=a.index,f=b.length,e;a.ready=!0;a.content=d;for(e=g-1;0<=e;e--)if(a=b[e],!a.ready||!a.evaluated)return;for(e=g;e<f;e++)if(a=b[e],a.ready)a.evaluated||c(a);else break}function c(a){a.evaluated=!0;if("js"==a.type)try{eval(a.content)}catch(d){F("Error evaluating "+a.uri+" with message: "+d)}else{var b=k.createElement("style"),c;b.type="text/css";b.textContent=a.content;"id"in a&&(b.id=a.id);"disabled"in a&&(b.disabled=a.disabled);c=document.createElement("base");c.href=a.path.replace(/\/[^\/]*$/,
"/");w.appendChild(c);w.appendChild(b);w.removeChild(c)}delete a.content;0==--f&&h()}function h(){function b(){k&&c()}function c(){var a=r.onUpdated||C;if("onSetup"in r)r.onSetup(a);else a()}function e(){l.store();h.forEach(function(a){t(a.key,a.content)});c()}function g(a,b){a.content=b;0==--m&&(d.status==d.IDLE?e():i=e)}function f(){H("online",f,!1);p(o,function(c){q=l=new s(c);var e;l.assets.forEach(function(b){e=a.getAsset(b.uri);(!e||b.version!==e.version)&&h.push(b)});m=h.length;0==m?d.status==
d.IDLE?b():i=b:h.forEach(function(b){function c(){D(b,function(a){g(b,a)})}var d=a.getAsset(b.uri),e=b.path,f=b.update;!d||!f||null===u(b.key)||"delta"!=f?c():p("deltas/"+e+"/"+d.version+".json",function(a){try{var c=b,d;var e=u(b.key),f=A(a),a=[],h,j,i;if(0===f.length)d=e;else{j=0;for(i=f.length;j<i;j++)h=f[j],"number"===typeof h?a.push(e.substring(h,h+f[++j])):a.push(h);d=a.join("")}g(c,d)}catch(k){F("Malformed delta content received for "+b.uri)}},c)})})}var h=[],k=!1,i=function(){},n=function(){d.swapCache();
k=!0;i()},m;H("message",E,!1);if(d.status==d.UPDATEREADY)n();else if(d.status==d.CHECKING||d.status==d.DOWNLOADING)d.onupdateready=n,d.onnoupdate=d.onobsolete=function(){i()};!1!==navigator.onLine?f():x("online",f,!1)}var e=a.assets,f=e.length,l;q=a;x("message",E,!1);0==f?h():e.forEach(function(a){var c=u(a.key);null===c?D(a,function(c){a.remote||t(a.key,c);b(a,c)},function(){b(a,"")}):b(a,c)})}function I(a){null!==k.readyState.match(/interactive|complete|loaded/)?v(a):x("DOMContentLoaded",function(){navigator.standalone?
setTimeout(function(){setTimeout(function(){v(a)},1)},1):v(a)},!1)}var C=function(){},m=[],k=i.document,w=k.head,x=i.addEventListener,H=i.removeEventListener,n=i.localStorage,d=i.applicationCache,A=JSON.parse,z=k.createElement("a"),y=k.location,B=y.origin+y.pathname+y.search,o="app.json",G=!1,q;if("undefined"===typeof r)var r=i.Ext={};r.blink=function(a){var b=u(a.id+"-"+B+o);k.write('<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">');
b?(a=new s(b),I(a)):p(o,function(b){a=new s(b);a.store();I(a)})}})(this);;Ext.blink({"id":"ba7734f5-ef3e-4477-bcea-70fb8b8a9663"})</script>
    <link href="resources/css/default-themes.css" id="default" rel="stylesheet" type="text/css">    
    <link href="resources/css/jquery.Jcrop.css" id="jcropcss" rel="stylesheet" type="text/css">
</head>
<body>
    <div id="appLoadingIndicator">
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>

 

 

 

I'm really desesperate to be able to make my application work on BB,

 

Thank you for your help,

 

Ocelyn

 

Please use plain text.