Second Life of a Hungarian SharePoint Geek

May 16, 2016

“Project Professional needs to be installed to open the project. Install Project and try again.” Warning, When Trying to Open Project in Microsoft Project

Filed under: PS 2013 — Tags: — Peter Holpar @ 15:56

Recently a few users complained that they receive this warning in Internet Explorer (version 11) every time they try to open a project from PWA using Microsoft Project (for example, by clicking the Gantt-icon left to the project name in the Project Center):

Action Not Available
Project Professional needs to be installed to open the project. Install Project and try again.

Despite of the warning, the project was opened without other problems, but the users found this behavior disturbing. Other users with the same browser version did not have any problem opening projects in the same way.

I found this and this related entries on the web, but none of them helped to solve the issue in my case.

As it turned out, a JavaScript component called ProjectServer.Imported.ActiveXTaskLauncher (defined in 15\TEMPLATE\LAYOUTS\INC\PWA\LIBRARY\ps.core.js) is responsible for starting Project Professional from the browser.

The way the external application should be started depends on the browser version, in our case this code block performs the action:

var h=setTimeout(function(){
    a:;
    window.removeEventListener("blur",c);
    d()
},1e3);
function c(){
    a:;
    clearTimeout(h);
    window.removeEventListener("blur",c)
}
var i=window.addEventListener("blur",c);
window.location.href=b

where function d() contains displaying the warning:

function d(){
        a:;
        PJMessageBox(PJMessageType.Error,PWA.Res.GENERAL_ERROR_ACTION_NOT_AVAILABLE,PWA.Res.WEBPARTS_PROJECTCENTER_PROJPRO_REQUIRED,SP.UI.DialogResult.OK,null)
    }

Although it is not obvious at the first sight, what the first code block does, it starts a timer that should display the warning in 1e3 (that is 103 in JavaScript notation) milliseconds ( = 1 sec.) by calling function d(), unless this action is cancelled by function c() if a focus loss of the browser is detected via the event listener subscribed for the event blur.

The value of the b variable, that is used to set the value of the window.location.href in the last line of the first cod block above:

ms-project:osp|u|https://YourProjectServer/PWA/|g|50e73545-3ee3-489c-963d-0e0f06050737|p|<>\\YourProject|r|0

where the Guid is the ID of the PWA site collection. This value is passed to the ProjectServer.Imported.ActiveXTaskLauncher constructor by the GetActiveXTaskLauncher method of the PJ.ProjectDrilldownSatelliteImpl (15\TEMPLATE\LAYOUTS\INC\PWA\LIBRARY\ProjectDrilldownSatellite.js).

In our case the issue was performance-related: Project Professional was simply not started within the 1 second limit. The quick and dirty “solution” was to increase the time-out value to 1e4 (that is 10 seconds) by editing the ps.core.js.

Note: this workaround is generally considered as a bad practice, as it contains editing of  standard Project Server files. The patch state of the farm is 2016 March CU. I hope the 2016 April CU provides a solution for the problem, as its description at the Project Server 2013 Cumulative Updates page contains this one in the list of fixed issues:

Even though you have already installed Project 2013, you may still receive the following error message from PWA:
Action Not Available.
Project Professional needs to be installed to open the project. Install Project and try again.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: