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
Highlighted
New Contributor
Posts: 3
Registered: ‎01-03-2014
My Device: none
My Carrier: none
Accepted Solution

WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

Being very new to BlackBerry WebWorks and Cordova, I would please like some help getting set up with WebWorks Hello World tutorial.


Platform: Windows 7 ultimate x64 chrome Version 31.0.1650.63 m firefox version 26, Blackberry Web Works SDK 2.0BETA &Blackberry Web Works SDK 1.0.4.11, MomenticsIDE, cordova 3.3.1-0.1.2, VMWare Player version 5.0.3 build-1410761 using BlackBerry10Simulator.vmdk 

 

Background:

I have been following the getting started tutorial ( https://developer.blackberry.com/html5/documentation/beta/getting_started.html ) and I have checked it over several times to ensure I did it correctly.

 

I have also been trying to follow along with the Blackberry guides provided by cordova( http://cordova.apache.org/docs/en/3.3.0/guide_platforms_blackberry10_index.md.html#BlackBerry%2010%2... ).

 

I  have tested this problem using both 10.2.0 and 10.2.1 Blackberry simulator within VMWare Player.

 

unfortunately, when I follow the tutorial I get to the point in the project where I press save, then chrome & firefox (I tried both) they hang. For additional details and photos, you can check out my post at http://stackoverflow.com/q/20907450/2115934 and this http://pastebin.com/BjCxHDfB .

 

Lastly, I am not sure if this is related, but when I try to run 

webworks target add <target_id> <ip-address> [ -t device | simulator]  [-p <password>]  [--pin <device-pin>]

As described in the section for setting targets, I get this error:

 

'webworks' is not recognized as an internal or external command,
operable program or batch file.

 

This makes me wonder if I didn't properly install webworks, or if I was supposed to set the sytem PATH varible.

 

My System Path Variables

C:\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\Java\jdk1.7.0_45\bin\;C:\Program Files\nodejs\;C:\Windows\Microsoft.NET\Framework\v4.0.30319;Z:\adroidsdk\platform-tools;Z:\adroidsdk\tools;ANT_HOME=Z:\ant\apache-ant-1.9.3;JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45;Z:\ant\apache-ant-1.9.3\bin;Z:\bbndk\host_10_2_0_15\win32\x86\usr\bin;Z:\BB10WebWorksSDK\cordova-blackberry\bin\dependencies\bb-tools\bin;Z:\MomenticsIDE_BBNativeSDK\host_10_2_0_15\win32\x86\usr\bin

 


 

I would be very grateful for any tips on how to proceed.

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

That's the output of the Path variable on the command line? It's strange to see the ANT_HOME and other variables being set there - I'm not sure that should be there, but it might not be the problem here either.

 

What I see missing is any reference to the new WebWorks SDK. When you ran the installer, it should have created a new User Environment Variable named WEBWORKS_HOME which should be set to the location where it was installed. Then it should have added %WEBWORKS_HOME%; to your User Path variable. It doesn't look like that happened. Perhaps you can try installing it again and it should put those variables in. You can try adding them yourself as well but a reinstall should include anything else that's missing.

 

Those missing path variables are why the webworks command doesn't do anything, and since the GUI interface just calls webworks commands, that's why that is also failing.

 

It's possible that there's an issue with the installer if it doesn't have the permissions to create those variables.

Tim Windsor
Open Source Technical Lead
Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

webworks command should be in this path:
Z:\BB10WebWorksSDK

check if it's really there, if so, then add that to your path var



New Contributor
Posts: 3
Registered: ‎01-03-2014
My Device: none
My Carrier: none

Re: WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

Thanks.

 

When I set up ANT, I did it wrong. I was supposed to add ANT_HOME as a new user variable, rather than addding it to the system path and user path. It was helpful that you pointed this out, but I am not sure if this alone fixed my entire problem.

 

I uninstalled all BlackBerry WebWorks SDK's I had installed on my system, then I reinstalled them, this time letting it install to it's default directory at "C:\Program Files\BlackBerry\BB10 WebWorks SDK 2.0.0.54". I made sure to look at my environment variables to verify that WEBWORKS_HOME was automatically set, as you said it should. Yes it was.

 

I verified that the webworks command worked merely by typing 'webworks' from the command. It worked.

 

Then, I proceeded to continue from the BlackBerry Hello World tutorial , then the tutorial appeared to function normally. 

 

A very special thanks for all those offering  help, I hope this can help other new programmers down the road.

 

 

New Contributor
Posts: 3
Registered: ‎01-03-2014
My Device: none
My Carrier: none

Re: WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

[ Edited ]

@gpl4all Thanks. I think you were correct to conclude that the problem is related to not properly having the environment variable defined. However rather than manually editing the environment variable, I reinstalled it to it's default installation location, and the installation process appeared to automatically add the necessary environment variables.

 

 

Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: WebWorks Hello World tutorial, Webworks SDK tool hangs in the browser

@ddpkwisc: my pleasure

i don't know that reinstall can fix that problem in windows.
i work only on Linux, so accustomed to set anything necessary manually, specially webworks 2.0, since it has not Linux installation, i have to use Badtoyz hack and later move to Cordova 3.3 completely, all should be done manually.