Start a new topic

Titanium run JS not finding javascript context

I have an ARWindow that is loaded using the demo code. It all seems to work fine, however when I try and run a function defined in the poiselected.js file, I get the following error:

Uncaught Reference Error: World is not defined.

It seems like the wikitude AR view is receiving my callJavaScript call, but can't resolve the context... Is there a way to troubleshoot/determine what is going on?


 Hi Ray,

could it be possible that the poiselected.js is not finished loading when you are calling the world?

In this case you could use the world is loaded callback:


wikitude.addEventListener('WORLD_IS_LOADED', function(){

 Best regards,


I can confirm that I am calling AFTER the world is loaded. Still get the error " chromium: [INFO:CONSOLE(1)] "Uncaught ReferenceError: World is not defined", source:  (1)". Not sure how to troubleshoot this...


I know I am calling from the right context because I get this:

WikitudeViewProxy: (main) [8818,288964] callJavaScript called

[INFO] :   chromium: [INFO:CONSOLE(1)] "Uncaught ReferenceError: World is not defined", source:  (1)

Just not sure why I can't see the 'World' javascript variable. 

Hi Ray,

can you send the code where you make the callJavaScript call and of your AR world?

Best Regards,


Login or Signup to post a comment