Development Troubleshooting and Tips - tsgrp/HPI GitHub Wiki

Note - for troubleshooting client support items, see: Client Support Troubleshooting

Chrome Freezing during Action?

This has been seen when javascript code gets stuck in an infinite loop. Breakpoint and follow the code path to discover where this is happening.

Found when: Clicking on a result in search creates an infinite loop if there is a Recent Objects Dashlet configured but no folder types in OTC for the dashlet to utilize.

Further Questions? Ask Bradley W.

Peer not authenticated when building Alfresco?

Solution found here: http://stackoverflow.com/questions/22887829/peer-not-authenticated-while-importing-gradle-project-in-eclipse

Found when: This has been seen when building the Alfresco Gradle Amp Plugin..

Further Questions? Ask Bradley W.

Full Page Reload when running Unit Tests?

Solution:

console.profile('cause of reload');

window.addEventListener('beforeunload', function() { console.profileEnd('cause of reload'); debugger; });

If the reload you're looking for happens, you should be taken to the "Sources" view of Chrome Devtools with the app paused at the debugger line.

  1. Add the above code to the bottom of mockjquery.js ,and run your unit tests in localhost:9876 with your debugger open.
  2. Navigate to "Profiles" tab and choose the "Charts" view.
  3. Command+F and search for "location".
  4. Use the up and down arrows in the search box to jump to the last occuring matches for that phrase.
  5. Hit enter in the search field to jump to the match.
  6. Look back through the call stack for code you recognise.

Found when: Unit tests are failing.

Further Questions? Ask Bradley W.

Cannot create JDBC class of '' for connect URL 'null'?

This has been seen starting up an Alfresco instance. This error usually means that the build.gradle file used to build this project defines a version different from the one you are using.

Found when: Kicking off Alfresco, during the core of Alfresco startup.

Further Questions? Ask Rene S.

Unable to reach any page but login on a Documentum HPI project?

This has been seen after starting up a Documentum project and hitting the HPI login page, failing to successfully log in with a validated user. No stack trace is available on the tomcat logs and no pertinent console errors show up.

Found when: Attempting to log into HPI when using a Documentum based project.

Solutions:

  • The app.root variable isn't being set properly in the HPI config.js file.

Further Questions? Ask Rene S.

AlfrescoRuntimeException: aclchangesets return status:404

This error occurs when Solr cannot successfully communicate with Alfresco because Solr cannot find the specified endpoint. This is usually due to Alfresco failing to startup for one reason or another (check earlier in the Alfresco logs to find the offending class, context file, config, etc) and not due to anything Solr related usually. It's a bit of a red herring!

Found when: Starting up Alfresco

Solution: Check the Alfresco log for the source of the error preventing Alfresco from starting properly.

Further Questions? Ask Devin S. (Devin[0])

Grunt hogging your CPU?

Workaround: when starting grunt, pass in the option --noWatch.

Note: this will completely turn off the watch option in grunt, meaning that if you make any changes in the code while --noWatch is enabled, they will not show up until a restart.

Found From: https://github.com/gruntjs/grunt-contrib-watch/issues/35

Further Questions? Ask Dan G

Having problems debugging listeners?

For better or worse, lots of listeners are setup on the global app variable out of necessity. Debugging around problems that hit many global listeners can quickly devolve into a mess.

Solution: See all of the listeners called in order by opening your web console and adding in

window.myEvents = []
app.on("all", function() { myEvents.push(arguments); })

and then perform the action in the application you are debugging. After running, log out myEvents by running

console.log(myEvents)

in the web console. All of the events trigger on app will show up in order.

Note: This will only be showing you events trigger on the global app variable, not events that are non-globally scoped to other variables. So while this is a good start, it won't necessarily show you all of the events that are running when performing an action in the application.

Further Questions? Ask Dan G or Joe Hof

⚠️ **GitHub.com Fallback** ⚠️