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
New Contributor
jittu_n
Posts: 5
Registered: ‎01-03-2013
My Device: Blackberry 10
My Carrier: Airtel

Error while running Webworks app in Ripple emulator

Hi,

 

I have recently started working working with Blackberry Webworks application. I have developed a small app and when i run this app in Ripple emulator in chrome i am seeing below error in chrom console.

 

Failed to load resource local:///chrome/webworks.js
Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.) ripple.js:475
webworks.bb10 :: Initialization Finished (Make it so.) ripple.js:475
eula response: true ripple.js:483
Failed to load resource local:///chrome/webworks.js
webworks.bb10 :: fired webworksready event! ripple.js:475
 
Same issue is happening when i try to run Webwork samples downloaded from github. 
 
Below is the code from my index.html file.
 
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, 
            initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, 
            user-scalable=no">
        <title>Who Picks It?</title>        
        <link rel="stylesheet" href="css/bbui-min.css">
    </head>
    <body>                
        <script src="local:///chrome/webworks.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/bbui-min.js"></script>
        <script type="text/javascript">
          var webworksreadyFired = false;
          document.addEventListener('webworksready', function(e) {
              if (webworksreadyFired) return;
              webworksreadyFired = true;

              bb.init({actionBarDark: true, controlsDark: true,
                       onscreenready: function(element, id, params) {
                       if (id == 'gameScreen') {                                          
                            //blackberry.app.lockOrientation ('landscape-primary');
                      } 
                   }  
                });
              // Open main screen
              bb.pushScreen('mainScreen.html', 'mainScreen');
          }, false);
        </script>        
    </body>
</html>

 Also when i try to access Webworks provided API (as below) i am getting error saying lockOrientation method is not available. Same is happening even if i copy webworks<version>.js file from framework directory to my app folder. 

blackberry.app.lockOrientation ('landscape-primary');

 

Please help me in resolving this.

 

Thanks in advance.

 

Thanks and Regards,

Jittu

Please use plain text.
Developer
kpbird
Posts: 23
Registered: ‎01-05-2013
My Device: 9800
My Carrier: IDEA

Re: Error while running Webworks app in Ripple emulator

[ Edited ]

Are you using latest workworks SDK

I think this problem is fixed in latest version,

I am using workwork latest sdk with chrome 23.xx.xxx in iMac OS X Lion

Following lines load perfect in ripple simulator and alpha device both

<script type="text/javascript" src="bbui.js"></script>
<script type="text/javascript" src="local:///chrome/webworks.js"></script>

Please use plain text.
New Contributor
jittu_n
Posts: 5
Registered: ‎01-03-2013
My Device: Blackberry 10
My Carrier: Airtel

Re: Error while running Webworks app in Ripple emulator

Yes. I am using latest SDK i.e BlackBerry 10 WebWorks SDK 1.0.4.5 and chrome version is 23.0.x.

Please use plain text.
New Contributor
jittu_n
Posts: 5
Registered: ‎01-03-2013
My Device: Blackberry 10
My Carrier: Airtel

Re: Error while running Webworks app in Ripple emulator

Hi,

 

 

I have tried the same on Mac as well and facing same issue.

 

I have uninstalled all other extensions in chrome and tried but same issue.

 

I have installed ripple on latest chrome canay release there also same issue is happening.

 

Do i need to enable any flags in chrome for this to work?

 

Thanks,

Please use plain text.
New Contributor
jittu_n
Posts: 5
Registered: ‎01-03-2013
My Device: Blackberry 10
My Carrier: Airtel

Re: Error while running Webworks app in Ripple emulator

Somebody please help me...i m not able to proceed with development.

Please use plain text.
BlackBerry Development Advisor
gtanner
Posts: 8
Registered: ‎02-08-2011
My Device: Not Specified

Re: Error while running Webworks app in Ripple emulator

You can ignore the error about not downloading the webworks.js file.  Ripple injects its own version of the API's and does not use that file.

 

I do not belive that ripple supports the lockOrientation API.

 

You can log a feature request here:

https://github.com/blackberry/Ripple-UI/issues/

Please use plain text.
New Contributor
jittu_n
Posts: 5
Registered: ‎01-03-2013
My Device: Blackberry 10
My Carrier: Airtel

Re: Error while running Webworks app in Ripple emulator

Do we have any webpage where we can check which all things are supported by Ripple emulator?

Please use plain text.
BlackBerry Development Advisor
bryanhiggins
Posts: 201
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: Error while running Webworks app in Ripple emulator

Ripple compatibility is listed along with the BB platforms for each API

 

https://developer.blackberry.com/html5/apis/

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Please use plain text.