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
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Webapp not starting (on device/VM)

Hi guys,

 

I was thinking about porting a popular web app (currently available at the Apple App Store and Google Play) to BB10.

It shouldn't be too much of a problem, since this app runs nicely in my PlayBook's browser.

 

So I set up Ripple, VMware Fusion with BB10, added a config.xml (pointing to the correct index.html) and load webworks.js.

 

Two problems:

  1. Ripple is not really helpful for testing, because it ignores my viewport metatag and therefore renders my layout in a weird, streched way.
  2. "Package & Launch" works, but I only get to see the dark grey BlackBerry app startup screen. Nothing else happens: no crash, no close, nothing.

I played around with the config.xml and noticed:

  • Ripple recognizes some errors
  • The same thing (blank page) also happens when I set content to a non-existant file or a simple helloworld.html

Any ideas?

- - -
My approved apps @ App World
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Webapp not starting (on device/VM)

The black page suggests the app has failed to load a target URL that was specified in the config.xml file.  What page (local or remote) are you trying to load.

 

I'm interested in hearing more about the viewport issue you are experiencing.  I would like to see this improved for other developers.  Would you please submit an issue reporting this behavior (including an optional snippet of your META tag) to the Ripple-UI project in Github?

 

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

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Webapp not starting (on device/VM)

astanley wrote:

The black page suggests the app has failed to load a target URL that was specified in the config.xml file.  What page (local or remote) are you trying to load.

 

index.html in the root directory. But I also tried different dummy files I included with the project. Same result each time. Funnily: I used the exact same config.xml with the Getting Started "project" (consisting of three files) and it started properly.

Is there any way to look behind the curtain and see what's happening? Obviously the remote Webworks inspector does not help because my App never even launches WebWorks.

 

I'm interested in hearing more about the viewport issue you are experiencing. [...] Would you please submit an issue reporting this behavior (including an optional snippet of your META tag) to the Ripple-UI project in Github?

 

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

 

BTW: Looking forward to meeting you in Berlin. I hope to reolve this issue by then to have something to show...

- - -
My approved apps @ App World
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Webapp not starting (on device/VM)

Thanks for filing that issue.   I'm looking forward to meeting you as well.

 

 

I'll have to admit, I'm a little stumped as to why you are getting the black screen for your sample.  If its just index.html, the only thing I can think of may be

 

1) you actually have index.htm instead of index.html in your project?

 

2) there is some sort of character encoding error in the config.xml file, causing the engine to try and load an invalid URL?

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Webapp not starting (on device/VM)

Okay, it's just too weird.

 

Here's a config.xml for testing purposes (but I tried so many modifications):

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="2.0.0.0" id="camtest">
    
    <author href="http://www.test.com/" rim:copyright="Copyright 1998-2011 test">test</author>
    <name>camtest</name>
    
    <description>
    A sample application to demonstrate the cam.
    </description>
    
    <rim:category name="games"/>
    
    <rim:orientation mode="auto"/>
    
    <feature id="blackberry.ui.dialog"/>
    
    <rim:permissions>
        <rim:permit>access_shared</rim:permit>
        <rim:permit>read_geolocation</rim:permit>
        <rim:permit>use_camera</rim:permit>  
    </rim:permissions>
    
    <content src="index.html" />
    
</widget>

 

in the following folder:

SMBA:cam stiffel$ ls -la
total 88
drwxr-xr-x  5 stiffel  staff    170 22 Jun 08:13 .
drwxr-xr-x  7 stiffel  staff    238 22 Jun 09:09 ..
-rw-r--r--  1 stiffel  staff    751 22 Jun 09:08 config.xml
-rw-r--r--  1 stiffel  staff   2134 22 Jun 08:09 index.html
-rwxrwxr-x  1 stiffel  staff  36218 31 Mai 02:11 webworks.js

 

Very minimalistic, right?

 

What happens in the PlayBook sim: on the first run it asks for the three permissions, and directly closes thereafter.

And in the BB10 sim: the background stays the grey BB logo.

 

Given there's something completely messed up in my config.xml, the Ripple UI or at least the command line window should throw a error message. But everything seems fine:

 

2012-06-22 09:14:33 POST /ripple/launch/bb10 200
Checking output path /Users/stiffel/RippleSites/
Path already exists
Running zip in /Users/stiffel/RippleSites/Cam
exec - "zip" -r "/Users/stiffel/RippleSites/cam.zip" *
out:   adding: config.xml
out:  (deflated 54%)
  adding: index.html
out:  (deflated 70%)
  adding: webworks.js
out:  (deflated 77%)

out: [INFO]    Populating application source

out: [INFO]    Parsing config.xml

out: [INFO]    Generating output files

2012-06-22 09:14:34 GET /ripple/build_status/7921 200
2012-06-22 09:14:34 GET /ripple/build_status/7921 200
out: [WARN]    Warning: Cannot find application or default icon

out: [INFO]    Info: Package created: /Users/stiffel/RippleSites/simulator/cam.bar

2012-06-22 09:14:35 GET /ripple/build_status/7921 200
2012-06-22 09:14:35 GET /ripple/build_status/7921 200
out: [WARN]    Warning: Cannot find application or default icon

out: [INFO]    Info: Package created: /Users/stiffel/RippleSites/device/cam.bar

2012-06-22 09:14:36 GET /ripple/build_status/7921 200
out: [INFO]    BAR packaging complete

Done build
Build complete, now deploying...
>>> EXEC "/Developer/SDKs/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.0.15/dependencies/tools/bin/blackberry-deploy" -installApp -launchApp -device 192.168.39.128 -password 1234 "/Users/stiffel/RippleSites//simulator/cam.bar"
2012-06-22 09:14:36 GET /ripple/build_status/7921 200
Info: Sending request: Install and Launch

Info: Action: Install and Launch

Info: File size: 1044270

Info: Installing camtest.testDev_camtest____20c544e1...

Info: Processing 1044270 bytes

actual_dname::camtest.testDev_camtest____20c544e1
actual_id::testDev_camtest____20c544e1

actual_version::1.0.0.1
result::success
Info: Launching camtest.testDev_camtest____20c544e1...

result::6651992

Info: done

 Oh, and including an Icon does remove the warning, but not solve the problem...

- - -
My approved apps @ App World
Developer
Posts: 270
Registered: ‎12-13-2010
My Device: PlayBook 16GB, BB10 Dev Alpha
My Carrier: o2 (de)

Re: Webapp not starting (on device/VM)

Here's my screen...

- - -
My approved apps @ App World