Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 494041

Summary: TypeError: Cannot read property 'logs' of undefined (in logView.js)
Product: [ECD] Orion Reporter: Grant Gayed <grant_gayed>
Component: ClientAssignee: Curtis Windatt <curtis.windatt.public>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: curtis.windatt.public, steve_northover
Version: unspecified   
Target Milestone: 15.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Grant Gayed CLA 2016-05-19 11:34:58 EDT
Reported by GA, 'this.applicationInfo' may be undefined in the line marked below:

load: function(){
	var logName = this.getInput();
	this._acceptPatch = null;
			
	var fullLog = "";
	this.applicationInfo.logs.forEach(function(line){ // <---------

The stack:

TypeError: Cannot read property 'logs' of undefined
    at r.o.mixin.load (/code/cfui/logs.js:37:14805)
    at I.T.Command.callback (/code/cfui/logs.js:38:2543)
    at p._collectAndInvoke (/code/cfui/logs.js:10:1783)
    at p._invoke (/code/cfui/logs.js:10:1516)
    at N (/code/cfui/logs.js:10:12592)
    at y (/code/cfui/logs.js:4:1803)
    at t (/code/cfui/logs.js:4:2293)
    at HTMLButtonElement.<anonymous> (/code/cfui/logs.js:4:2353)
Comment 1 Michael Rennie CLA 2017-01-10 15:45:44 EST
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04002.html
Comment 2 Grant Gayed CLA 2017-01-12 16:34:25 EST
reopening, this still happens in V2
Comment 3 Steve Northover CLA 2017-03-30 12:19:03 EDT
Seems like something we should fix.  Whatever the pattern is that is causing it, it might occur in many more places.
Comment 4 Curtis Windatt CLA 2017-03-30 12:55:14 EDT
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aa043cbd5ab0d688b871540b934a531c06ea4a1a
Fixed in master

ApplicationInfo is managed with a getter/setter and is only used in that one place to concatenate the logs.  A simple check that applicationInfo has been set is sufficient.