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
fredhan
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile
Accepted Solution

BB10 Webworks app can't call the index page

Hi all,

 

  I am working on the BB 10 Webworks and test it on the Ripple is fine, but If it launched  on bb10 simulator on VM Fusion,  the app can't show the index page.

 

 SDK: BlackBerry 10 WebWorks SDK 1.0.4.11

 

 Ripple: 0.9.14

 

 VM Fusion: 5.02

 

 simulator: BB10_1_X-807

 

 can anyone help me this, very thanks.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,543
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: BB10 Webworks app can't call the index page

[ Edited ]

Can you please post the sample config.xml and index.html you are using?

 

When you say it can't show the index page...

- Do you get any errors?

- Is the page simply white/blank?

- Are any errors thrown during startup? Have you connected Web Inspector?

- Are you listeneing for the webworksready event?

- Have you included the webworks.js script?

 

For that last point, the script would look as follows:

 

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

Let us know and we'll do our best to help.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
fredhan
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile

Re: BB10 Webworks app can't call the index page

[ Edited ]

EDIT (oros): Moved config.xml content to code tags for readability.

 

please see my 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.10" id="Testc" xml:lang="en">
  <author>Fred</author>
  <publisher>LC</publisher>

  <name>Testc</name>
  <content src="index.html"/>

 
  <icon src="icon.png" />
  <rim:splash src="images/splash.png"/>
 
  <!-- features used -->
  <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
  <feature id="blackberry.ui.toast" />
  <feature id="blackberry.ui.contextmenu" />
  <feature id="blackberry.ui.dialog" />
  <feature id="blackberry.ui.menu" />
  <feature id="blackberry.system.event" />
  <feature id="blackberry.app">
      <param name="orientation" value="portrait" />
  </feature>
  <feature id="blackberry.app.event"/>
  <feature id="blackberry.invoke" />
  <feature id="blackberry.connection" />
  <feature id="blackberry.invoke.card" />
 
  <rim:permissions>
    <rim:permit>read_device_identifying_information</rim:permit>
    <rim:permit>read_geolocation</rim:permit>
    <rim:permit>access_shared</rim:permit>
  </rim:permissions>
</widget>

 

and the index.html include the webwork.js too.

 

but I think the index.html page can not called when the app start(only find the splach image is shown, then the app looks frozen)

 

can you help me check it again, thanks

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,543
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: BB10 Webworks app can't call the index page

I don't see anything in the config.xml that would prevent your application from loading. Can you try replacing your index.html with the following and confirm if anything shows up?

 

<!DOCTYPE html>
<html>
	<head>
		<title>Hello World</title>
	</head>
	<body>
		Hello World!
	</body>
</html>

Basically, if this simple sample does get displayed, then it's likely an issue with a script or other resource that your index.html is loading.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
fredhan
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile

Re: BB10 Webworks app can't call the index page

I think it maybe is the simulator issue. I try to run on macOS, use the latest BB10 simulator to run it, the index content page can be called yet.

 

but If I run the same code on Windows 2008 with the newest simulator , it is run correctly.

 

Why. what difference? very confused,  I need to run it on MACOS, not windows 2008.

 

 

 

 

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,543
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: BB10 Webworks app can't call the index page

I'm not sure off the top of my head what the difference would be; potentially something to do with the network? Does your app require external resources? (JS, images, etc.)

 

Would you be comfortable posting your index.html file here so we could take a look? If not, can you email it to me (eoros@blackberry.com) and I'll take a look.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
New Contributor
fredhan
Posts: 6
Registered: ‎03-24-2013
My Device: bb10
My Carrier: China Mobile

Re: BB10 Webworks app can't call the index page

I think i have resolve this issue, 

 

I try to remove the old bb10 sdk from macos, and then reinstall the latest JDK & JRE & bb10 sdk again, issue resolved.

 

 

 

 

 

Please use plain text.