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

Adobe AIR Development

Reply
Developer
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified
Accepted Solution

Can't get anything to show up in the Simulator

Hi,

 

despite the great 'getting started' documentation and webcasts, I just can't get the Simulator to work ...

 

I can ping it, and I don't get any errors when I chose a Run configuration from Flash Builder - it builds the .bar file alright and gives me the following output:

 

 

Using icon: C:\Documents and Settings\aperryman\My Documents\_UI\PlayBook Tutorial\FB_PlayBookTest\bin-debug\BB_icon_72.png
The bar manifest file is valid.
Package created: C:\Documents and Settings\aperryman\My Documents\_UI\PlayBook Tutorial\FB_PlayBookTest/PlayBookTest.bar
Action: Install and Launch
File size: 145772
Installing com.amp.PlayBookTest.testLlBsYXlCb29rVGVzdCAgICA...
actual_dname::com.amp.PlayBookTest.testLlBsYXlCb29rVGVzdCAgICA
actual_id::testLlBsYXlCb29rVGVzdCAgICA
actual_version::
result::

But it stops there and nothing appears in the simulator.

 

 

When I do a Debug launch, it's about the same thing, except that I eventually get a timeout error because it can't connect to the debugger - probably not surprising.

 

When I package and deploy via the command line, I even get a promising "done" at the end:

 

 

C:\Documents and Settings\apman\My Documents\PlayBook Tutorial\FB_PlayBookTest\bin-debug>blackberry-airpackager -package PlayBookTest.bar -installApp -launchApp PlayBookTest-app.xml PlayBookTest.swf BB_icon_72.png -device 192.168.223.128
Using icon: C:\Documents and Settings\apman\My Documents\PlayBook Tutorial\FB_PlayBookTest\bin-debug\BB_icon_72.png
The bar manifest file is valid.
Package created: PlayBookTest.bar
Action: Install
File size: 145776
Installing ...
actual_dname::
actual_id::
actual_version::
result::
[-launchApp, -package, PlayBookTest.bar, -device, 192.168.223.128]
Action: Launch
Launching com.amp.PlayBookTest.bXAuUGxheUJvb2tUZXN0ICAgICA...
done

 

but nothing in the simulator.

 

The app is just the helloWorld app from the samples and works fine when I compile it as desktop AIR app.

 

I'm on Windows XP and I do have admin rights.

 

Does anyone have an idea what else could be wrong?

 

Thanks a lot

Anna

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Can't get anything to show up in the Simulator

[ Edited ]

do you have your simulator in developer mode? what does it say for the IP?

 

Edit: also whats the exact code you are trying to deploy... like did you modify the AIRHelloWorld sample code?

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Can't get anything to show up in the Simulator

[ Edited ]

If you're not in developer mode, it lets you know.  Does the application run as a normal AIR application?

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Can't get anything to show up in the Simulator

@jtegen: you're rite... and theres an IP in her post.. thats a double my bad hah

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Can't get anything to show up in the Simulator

If an app is actually installed onto the Simulator, the line in your first output example that says result:: would be result::success. Your example output also also doesn't show a version number, which it should be reading from the application descriptor. The second output doesn't show any application information at all aside from the size of the package. Is it possible that you're missing some information in the app descriptor file?

 

I also notice something strange with the file locations... 

 

In the first example, it places the BAR file in the root folder of your Flash Builder project, but it's pulling resources from bin-debug. Does your command for the first one use an absolute path for the location of the BAR file? What is the working folder for the commands that run in the command line for that example? (Working folder would be the location shown before ">blackberry-airpackager")

 

It also looks strange that in the Package Created line in the first example is using "/" instead of "\" for the last bit of the path. In my mind, if the system generated that entire path, it would use the Windows path separator "\" throughout the entire output path since you're on a Windows XP system (I don't use Flash Builder though, so that could be something Flash Builder does since Windows can use either and Mac OS uses "/"). What is the actual command used to generate the first sample?

 

To contrast with the second example, which uses what appears to be a correct command, your working directory is bin-debug where all of your files are located, and the BAR file is created in bin-debug as well (which is why it doesn't show a full path). 

 

Which location is the correct location for the BAR file -- is it the project's root folder like the first example or bin-debug like the second example? Something is off with your file locations and/or the working folder in the command line.

BlackBerry Development Advisor
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Can't get anything to show up in the Simulator

Unzip your bar file or use option --list to what what is in the package (sometimes packager works incorrectly and it will cause application fail to launch)

Developer
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: Can't get anything to show up in the Simulator

Thanks everyone for their thoughts (and very thorough examination of my output code!)!

John, the app runs fine as desktop AIR, and yes, I'm in dev mode, and the IP must be right, since I can ping the simulator (and when I change the target IP (at some point I thought, maybe it's got to be the 'broadcast IP', whatever that is) I get a clear error message, about not being able to connect.


Stuidochris, yes, I was also puzzled by the missing version number, but the app.xml file contains one: 1.0.0 - I'm using the file that is auto-created by Flash Builder, and the only change I made is specifying an icon file as shown in the webcast.


The inconsistant back- and forward-slash notation can also be explained: the default location for the bar file in FlashBuilder is auto-filled as ${project_loc}/PlayBookTest.bar, so I guess it gets the path from the system and then tacks on the "/PlayBookTest.bar" bit.


While Flash Builder puts the bar file into the project root by default, when I used the command-line tool I only specified the output filename, so it's created in the same directory where the .swf and app.xml files are. From what I understand, it doesn't matter where the bar file is created since the same command that creates it should also be responsible for copying/installing it to the simulator then ... But I'll experiment with giving a full path ...


Elena, when I unzip the bar file, I get an air directory with the 3 source files in (.swf, app.xml and icon file), and a META_INF directory with a MANIFEST.MF file like this:

Archive-Manifest-Version: 1.0
Archive-Created-By: Air Bar Packager 1.0.0

Package-Type: application
Package-Author: Unknown
Package-Author-Id: VW5rbm93biAgICAgICAgICAgICA
Package-Name: com.amp.PlayBookTest
Package-Id: testLlBsYXlCb29rVGVzdCAgICA
Package-Version: 1.0.0.0
Package-Version-Id: MS4wLjAuMCAgICAgICAgICAgICA
Package-Architecture: armle-v7

Application-Name: PlayBookTest
Application-Id: Y29tLmFtcC5QbGF5Qm9va1Rlc3Q
Application-Description: PlayBookTest
Application-Version: 1.0.0.0
Application-Version-Id: MS4wLjAuMCAgICAgICAgICAgICA

Entry-Point-Name: PlayBookTest
Entry-Point: app/air/PlayBookTest-app.xml
Entry-Point-Type: Qnx/Air
Entry-Point-Icon: air/BB_icon_72.png

Archive-Asset-Name: air/PlayBookTest-app.xml
Archive-Asset-SHA-512-Digest: sfKaHggvljE5EKAMuqgDdwFPyKDOO7dM6ulJxpSFkOqf28FkdKT1ZTqe50yDONU751WLkIkboGWAeWHk0orcFw

Archive-Asset-Name: air/BB_icon_72.png
Archive-Asset-SHA-512-Digest: E_hsFwhywI9LCMCLbeQQJNQlyaehvmVYpslNJzat5tllT6IHpzmHrJpWVj1fQ8-oW0_9VlLuFJjRdaMfBM3PVQ

Archive-Asset-Name: air/PlayBookTest.swf
Archive-Asset-SHA-512-Digest: dsfQHoVbnNP_XC9Xp7MkKjJQZAOlwgRlEgbVji8JFjrZ5_v_HkSLcm5goaq06uUc5aQhSW2yWXuuQvmQrRK0qA

 


Is that would you would expect to find?


(the manifest files created by Flash Builder and the blackberry-airpackager command are identical, except that the command-line tool gives it a different ID (bXAuUGxheUJvb2tUZXN0ICAgICA) - probably irrelevant, but I'm just including any possilbe info now, as I'm out of my depth with reasonable assumptions of what might be relevant .. :-) )


Might it be worth throwing the VM out and re-installing the simulator ...?

 

Developer
Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: Can't get anything to show up in the Simulator

finally got it working!!

 

It doesn't sound as if anyone else had the same problem, but just in case, here is what did the job:

 

I just did a command-line deployment with the -devMode flag set (without it I got the same results as with Flash Builder or blackberry-airpackager, i.e. no errors but nothing showing up in the Simulator) :

 

 

>blackberry-deploy -installApp -devMode -device 192.168.223.128 -package PlaybookTest.bar

 

 

And the weird thing is: now that it's been installed once, I'm able to run my FlashBuilder debug configuration and it installs and launches any new builds without problems!

 

Anyway, thanks again to everyone who tried to help - I did learn a few things along the way ...

Anna

 

 

 

 

New Contributor
Posts: 3
Registered: ‎12-18-2010
My Device: PlayBook
My Carrier: O2

Re: Can't get anything to show up in the Simulator

[ Edited ]

I had the same problem - I had DEV mode on in the PlayBook simulator, and I had a *.bar file sucessfully compiled in Terminal but it just wouldn't install onto the Simulator...

 

I did 2 things to get this working:

1. I also enabled Web Sharing as I figured the IP address of the PlayBook probably needs this on...

2. I reinstalled the Simulator onto VMFusion.

 

I'm not sure which of the 2 did it - but I've got it working now thankfully!

So I've posted my findings in this thread in the hope that it helps someone else.

 

The main line to notice when you're deploying & compiling from the Terminal command line is:

'result::success'

If you don't get this it won't even install onto the Simulator.

New Developer
Posts: 3
Registered: ‎11-28-2010
My Device: Not Specified

Re: Can't get anything to show up in the Simulator

Just want to do add that in my case shutting down the virtual machine and starting it again solved the problem. After that, I got 'result::success'.