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
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile
Accepted Solution

Please help: Error running "HelloWorld" for webworks on blackberry 10 simulator

I am trying to start webworks development on blackberry 10 simulator.

 

It runs correctly and shows a string of "Hello World" on Ripper simulator, and then tried to package and launch the application on the simulator.

 

But the application shows the follow error upon starting:

 

Application did not open a window within the allotted time and has been slayed

 

I have been struggle with this error for a whole night, could anybody help me on this if you have any idea what's the issue? your great help will be very appreciated.

 

Here are contents of the files(I have copied file webworks-1.0.1.17.js to the same folder as config.xml and index.html)

 

config.xml: 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.5" id="helloworld" xml:lang="en">
<author href="http://www.example.com/" rim:copyright="Copyright 1998-2011 My Corp">My Corp</author>
<name>helloWorld</name>
<content src="index.html"/>
</widget>

 

index.html

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Hello World</title>
</head>
<body>
<div>
Hello World
</div>
<script src="webworks-1.0.1.17.js"></script>
<script>
function ready() {
var ele = document.createElement("div");
ele.innerHTML = "uuid: " + blackberry.identity.uuid;
document.documentElement.appendChild(ele);
}
window.addEventListener("load", function(e) {
document.addEventListener("webworksready", ready);
}, false);
</script>
</body>
</html>

 

And here are the console output of package and deployment.

 

2012-09-17 02:20:34 POST /ripple/launch/bb10 200
Checking output path /Users/Lawrence/RippleSites/Output/
Path already exists
Running zip in /Users/Lawrence/RippleSites/HelloWorld
exec - "zip" -r "/Users/Lawrence/RippleSites/Output/HelloWorld.zip" *
out: adding: config.xml
out: (deflated 37%)
adding: index.html (deflated 45%)
adding: webworks-1.0.1.17.js
out: (deflated 78%)

out: [INFO] Populating application source

out: [INFO] Parsing config.xml

out: [WARN] Build ID set in config.xml [version], but signing key file was not found: author.p12

out: [WARN] Build ID set in config.xml [version], but no signing password was provided [-g]. Bar will be unsigned

out: [INFO] Generating output files

out: [WARN] Failed to find debug token

2012-09-17 02:20:34 GET /ripple/build_status/8001 200
2012-09-17 02:20:35 GET /ripple/build_status/8001 200
out: [INFO] Info: Package created: /Users/Lawrence/RippleSites/Output/simulator/HelloWorld.bar

2012-09-17 02:20:35 GET /ripple/build_status/8001 200
2012-09-17 02:20:36 GET /ripple/build_status/8001 200
2012-09-17 02:20:36 GET /ripple/build_status/8001 200
2012-09-17 02:20:37 GET /ripple/build_status/8001 200
2012-09-17 02:20:37 GET /ripple/build_status/8001 200
2012-09-17 02:20:38 GET /ripple/build_status/8001 200
2012-09-17 02:20:38 GET /ripple/build_status/8001 200
out: [WARN] Failed to find debug token

2012-09-17 02:20:39 GET /ripple/build_status/8001 200
2012-09-17 02:20:39 GET /ripple/build_status/8001 200
out: [INFO] Info: Package created: /Users/Lawrence/RippleSites/Output/device/HelloWorld.bar

2012-09-17 02:20:40 GET /ripple/build_status/8001 200
2012-09-17 02:20:40 GET /ripple/build_status/8001 200
2012-09-17 02:20:41 GET /ripple/build_status/8001 200
2012-09-17 02:20:41 GET /ripple/build_status/8001 200
2012-09-17 02:20:42 GET /ripple/build_status/8001 200
out: [INFO] BAR packaging complete

Done build
Build complete, now deploying...
>>> EXEC "/Developer/SDKs/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.1.17/dependencies/tools/bin/blackberry-deploy" -installApp -launchApp -device 172.16.177.128 "/Users/Lawrence/RippleSites/Output/simulator/HelloWorld.bar"
2012-09-17 02:20:42 GET /ripple/build_status/8001 200
Info: Sending request: Install and Launch

Info: Action: Install and Launch

Info: File size: 1007722

Info: Installing helloworld.testDev_helloworld_a520b600...


Info: Processing 1007722 bytes

Info: Progress 100%...

actual_dname::helloworld.testDev_helloworld_a520b600
actual_id::testDev_helloworld_a520b600
actual_version::1.0.0.5

result::success
Info: Launching helloworld.testDev_helloworld_a520b600...

result::6910050

Info: done

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 619
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: Please help: Error running "HelloWorld" for webworks on blackberry 10 simulator

I think it's your config.xml.  I looks like a BBOS config.xml and not a BB10 config.xml.

 

I ran your sample code, with my BB10 config.xml and it loaded fine on the simulators.

 

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="1.0.0"
        id="myAppIdGoesHere">
    <name>App Name</name>
    <content src="local:///index.html"/>
    <author rim:copyright="2012"
            href="http://www.rim.com/"
            email = "my@email.com">My Name</author>
    <description>A sample app</description>
    <license href="http://www.apache.org/licenses/LICENSE-2.0">license text</license>
    <access uri="*" subdomains="true" />
    <icon src="images\icon.png"/>
</widget>

 Note specifically, the <widget> element, you're missing an "id".

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
New Contributor
yey2000
Posts: 5
Registered: ‎10-29-2012
My Device: Dev Alpha B, 9810, Developer
My Carrier: Rogers

Re: Please help: Error running "HelloWorld" for webworks on blackberry 10 simulator

I have the same problem.

 

I am using BB10 simulator, here is the folder name where I launched the simulator, BB10_0_09-386, I assume it tells the version.

 

I am able to run Hello World in Ripple Simulator.

 

However, while running it in the simulator, I am getting

"Error, The file could not be opened. Check that you have the correct permissions and try again."

 

The app shows up in the simulator with icon image displayed correctly. Here is my index.html file and config file.

 

Index.html

<!DOCTYPE html>
<html>
<head>
    <title>HelloWorld</title>
    <meta id="viewport" name="viewport" content="user-scalable=no,
        width=device-width" />
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="geo.js"></script>
</head>
 
<body>
    <div id="container">
        <div id="world">
            <img src="images/helloWorld.png" width="500" height="500" alt="world" />
        </div>    
        <div id="button">
            <h2>Hello world, where am I?</h2>
            <button type="button" id="btnGPSDefault" onClick="getPosition('')">Get my coordinates</button>
        </div>
        <div id="geolocationInfo"></div>
    </div>
</body>
</html>

 

config.xml

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="1.0.0"
        id="myAppIdGoesHere">
    <name>HelloWorld</name>
    <content src="\index.html"/>
    <author rim:copyright="2012"
            href="http://www.rim.com/"
            email = "my@email.com">My Name</author>
    <description>HelloWorld</description>
    <license href="http://www.apache.org/licenses/LICENSE-2.0">license text</license>
    <access uri="*" subdomains="true" />
    <icon src="images\icon.png"/>
</widget>

 

Please be noted, I have tried various combination of content

<content src="\index.html"/>

<content src="index.html"/>

<content src="local:///index.html"/>

 

All of them results in the same error message. I have googled and searched the support forum and can't find a solution.

 

Please advise.

 

Thanks

Yi

 

 

 

 

 

Please use plain text.
New Contributor
yey2000
Posts: 5
Registered: ‎10-29-2012
My Device: Dev Alpha B, 9810, Developer
My Carrier: Rogers

Re: Please help: Error running "HelloWorld" for webworks on blackberry 10 simulator

Found the problem, index.html is case sensitive. The actual file name is Index.html with first letter as upper case. In content, it should reference it as "Index.html". I had it written as "index.html" with first letter as lower case.
Please use plain text.
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Actually the issue you faced is not the same as mine, My...

Actually the issue you faced is not the same as mine, My issue was resolved just by updated to the latest version of webworks SDK and simulator,

 

Still don't know what's the issue before.

Please use plain text.