How can I resolve an issue where a Protractor test hangs indefinitely?
<p>I am running into an issue where a test case that I previously ran and I know is working, is now getting stuck indefinitely when it is executed. This occurs every time the test clicks a specific element. The test just hangs and is unable to continue with the script. No error occurs besides a timeout error. When I run the test I get the regular prompts:</p>

<pre><code>[11:58:20] I/direct - Using ChromeDriver directly...
[11:58:20] I/launcher - Running 1 instances of WebDriver
Started
A Jasmine spec timed out. Resetting the Webdriver Control Flow.
F

Failures:
1) clicks menu buttons
Message:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Stack:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
at Timer.listOnTimeout (timers.js:92:15)

1 spec, 1 failure
Finished in 3000.147 seconds
[12:48:47] I/launcher - 0 instance(s) of Webdriver still running
[12:48:47] I/launcher - chrome #01 failed 1 test(s)
[12:48:47] I/launcher - overall: 1 failed spec(s)
[12:48:47] E/launcher - Process exited with error code 1
</code></pre>

<p>Then it just hangs there until it reaches the timeout I set. The following is a copy of the config and part of the testing script I am using.</p>

<p>config.js</p>

<pre><code> exports.config = {
    seleniumAddress: 'http://localhost:4444/wd/hub',
    directConnect: true,
    //getPageTimeout: timeout_in_millis
    // Capabilities to be passed to the webdriver instance.
    capabilities: {
    'browserName': 'chrome'
    //'browserName': 'firefox'

    },

    //suites:{},

    specs: ['basic_testing.js'],

    allScriptsTimeout: 3000000,

   //framework: 'jasmine2',
    onPrepare: function() { 
                browser.driver.manage().window().maximize();
    var jasmineReporters = require('jasmine-reporters');
    jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
        consolidateAll: true,
        savePath: 'testresults',
        filePrefix: new Date().toJSON().substring(0,10).replace(/-/g , "")  + '_xmloutput'
    }))
},
    //Options to be passed to Jasmine.
    jasmineNodeOpts: {
       defaultTimeoutInterval: 3000000
    }
};
</code></pre>

<p>basic_testing.js</p>

<pre><code>describe('menu page', function()
{
    it('clicks menu buttons', function()
    {
        element(by.id("nav-group-ServiceOrders")).click();

        element(by.id("nav-item-Dashboard")).click();

        //This element is clicked but then the test hangs here
        element(by.id("nav-item-OrdersConsole")).click();

        element(by.id("nav-item-PersonnelConsole")).click();

        element(by.id("nav-item-PriorityPoints")).click();

    });
});
</code></pre>