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: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Phone simulators not working

I've developed and tested my app using Ripple but I wanted to verify the compiled app works on the OS 6 and 7 simulators.  In the past I've seen differences in how applications run between Ripple and the simulators.  When I try to run the simulator for OS 6 in Eclipse it doesn't load my app onto the phone, even if I try to load it from the file menu.  It has been compiled using the 2.0 and 2.1 phone WebWorks SDK.  When I try to load a version of the app that was compiled by hand with SDK 2.1 the icon appears on the phone but when it is clicked a white screen appears or I get an exception/VM error screen. I've also tried downloading other simulators and running them but I get the same problems.

 

I've tried uninstalling the simulators and and reinstalling them but nothing changes.  I've been able to run the app on the Ripple and VM simulators for Playbook as well as my personal Playbook. 

 

Anyone else experienced this?  Figure out what the problem was?

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero
Developer
Posts: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Re: Phone simulators not working

I think I should have posted this in the Test and Simulators board, anyway I can move it over there without reposting this?

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero
Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: Phone simulators not working

Hey I'm not sure if this is relevant for your problem, but for me to get my app to run on OS.6 simulator I needed to run

 

"BlackBerry Email and MDS Services Simulator"

and even then I only got it to work when I ran the simulator as admin (on Windows 7)

 

(Error I had was connection timeout 1200 .. or similar)

 

The same App worked fine on OS 5.0 Simulators without requiring MDS Simulator

 

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Phone simulators not working

[ Edited ]

Hi bnolan001,

 

Can you try the following and see if it works to load your cod on the simulator.

  1. Run the clean.bat file in the simulator folder to clean the installation
  2. Make sure the simulator is connected via USB (Under the simulate menu)
  3. Install the cod file using javaloader.exe contained in the bin folder of the SDK. The command should be javaloader.exe -u load <AppName>.cod
  4. If you can't see the app in the banner, check it has been loaded by going to options>applications and trying to find it there.

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Developer
Posts: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Re: Phone simulators not working

I ran the clean.bat and then started up the Eclipse Torch VM.

JavaLoader.exe -u load wwWeatherPilot.cod
RIM Wireless Handheld Java Loader
Copyright 2001-2009 Research In Motion Limited
Connecting to device...Error: unable to open port

But it didn't work.  I tried it from the standalone VM for the Torch but that failed as well.  These all worked a few weeks ago.  

 

I just tried the HelloWorldWidget and that one loaded in just  fine from the File menu.  I then tried my app again and all I saw was a black screen.  I remembered though that black is my Background Color defined in the config.xml so I changed it to blue and saw that blue was then the color shown in the simulator.  It doesn't ever seem to get passed this color to my index.html file.

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero
Developer
Posts: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Re: Phone simulators not working

[ Edited ]

Another thing I just noticed is the fact that the .cod file in my latest version is only 900kb in size and one of my previous versions had a size of 2.7mb but another was closer to 1mb too so maybe this isn't anything.  I have done a major code change to include jquery after the first version.  That might explain the size difference.  All were built through Eclipse.

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero
Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Phone simulators not working

[ Edited ]

Hi bnolan001,

 

My fault, I forgot to tell you to connect the simulators via USB (I've edited my post since). But it seems like you were indeed able to load the app on the sim. Now you have to figure out why the HTML isn't rendering properly.

 

Its bizarre that it works in Ripple but not on device, is it perhaps a whitelisting issue? Do you have any remote resources that aren't whitelisted?



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Developer
Posts: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Re: Phone simulators not working

Thanks for the update.  A few of my friends tested the app on their phones and it worked just fine even though the simulator failed.  Running the app in Ripple worked fine as did the app in the Tablet Simulator version 1.01.

 

I tried using the JavaLoader as you described and had the same results.  The background screen appears but nothing else does.  Doesn't appear to load the index.html.

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero
Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Phone simulators not working

Hi bnolan001,

 

Now that we've confirmed the apps are loading but the resources of the app aren't, I believe the likely cause is what  was referring to. BlackBerry Smartphone Simulators cannot easily access the internet without the MDS Simulators running as well.


Heiko wrote:

Hey I'm not sure if this is relevant for your problem, but for me to get my app to run on OS.6 simulator I needed to run

 

"BlackBerry Email and MDS Services Simulator"

and even then I only got it to work when I ran the simulator as admin (on Windows 7)

 

(Error I had was connection timeout 1200 .. or similar)

 

The same App worked fine on OS 5.0 Simulators without requiring MDS Simulator

 


 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Highlighted
Developer
Posts: 151
Registered: ‎02-19-2011
My Device: Bold 9930 and PlayBook

Re: Phone simulators not working

It turns out the issue was that my app couldn't create its database in the simulator.  I'm still working that issue but am making progress.  Thank you for your help.

"Not to know what happened before you were born is to be forever a child." Marcus Tullius Cicero