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
New Contributor
jmountford
Posts: 2
Registered: ‎04-19-2012
My Device: BlackBerry Torch 9860
My Carrier: Orange

JavaScript execution exceeded timeout.

On my Torch 9860, I intermittently but regularly see "JavaScript execution exceeded timeout." in the remote inspector console.

I've bumped up the JAVASCRIPT_TIMEOUT value in the JAVA code to 20 seconds but this seems to make no difference. In fact, I get the timeout message in less than 20 seconds since the browser field loaded the page!

Typically, the JavaScript code where the timeout occurs will be executing a loop such as the one below. I know that the ranges of the loop are valid and are not causing an infinite loop.

$ in this example is an object similar to jQuery but not actually jQuery.

function parentElement(el, c) {
  var parent;
  parent = el;
  while (parent && !$.hasClass(parent, c)) {
    parent = parent.parentElement;
  }
  return parent;
}

Does anyone have any ideas as to how I can resolve or work around this issue?

Many thanks.

 

Please use plain text.
Contributor
rg_bb
Posts: 21
Registered: ‎04-25-2012
My Device: 9800
My Carrier: Vodafone

Re: JavaScript execution exceeded timeout.

Did you ever resolve this? I am experiencing the same issue, intermittently.

Please use plain text.
New Contributor
jmountford
Posts: 2
Registered: ‎04-19-2012
My Device: BlackBerry Torch 9860
My Carrier: Orange

Re: JavaScript execution exceeded timeout.

Sadly, there was no solution. I had a lot of JavaScript execution during the DOMContentLoaded event which was causing the problem. To work around this I changed my code to execute the necessary JavaScript at different times or during different events.

 

Since then the company I work for has seen sense and dropped BB support. Honestly, what a pile of pants :smileyhappy:

 

Please use plain text.