Riverscapes / gcd

Geomorphic Change Detection For Windows
http://gcd.riverscapes.xyz
GNU General Public License v3.0
25 stars 5 forks source link

Cannot install GCD ESRI Addin on Virtualized Windows #250

Closed MattReimer closed 6 years ago

MattReimer commented 6 years ago

This is a collector ticket for issues around installing the ESRI addin on virtualized windows. I will be adding to it as I get more evidence about what the problem is.

We were noticing this problem on Alasdair Matheson's machine as well as one other. It seems that remote desktoping is pretty common, at least in Scotland.

What's interesting is that the standalone has no trouble installing so it makes me think that either:

I'll investigate more before I leave scotland.

I noticed in the Addin there are a bunch of these entries:

    <Content Include="..\ext\Deploy\ExcelTemplates\BudgetSegregationSummaryTemplate.xml">
      <Link>Deploy\ExcelTemplates\BudgetSegregationSummaryTemplate.xml</Link>
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>

And it makes me thing OutputDirectory might not be correct somehow (or at least not correct for these few users).

philipbaileynar commented 6 years ago

@MattReimer could this be related to #246 ? In that ticket you mention a Roaming folder path and I've never seen that location used in my testing.

Perhaps it's unrelated to virtual environments and more related to folks who are using corporate networks and Active Directory accounts? Perhaps these network accounts store certain stuff in their roaming profile (that gets copied to whatever computer on the network that the user logs into) whereas, standalone Windows accounts simply use the Local folder. Needs research.

MattReimer commented 6 years ago

Currently in the process of interfacing with SEPA's IT to get this solved but I haven't heard back.

Let's punt this to the next version.

MattReimer commented 6 years ago

Call with Iain Curr and Alasdair:

We were unable to get a GCD project explorer to show either automatically or with the "Show explorer" menu function

We tried:

  1. Creating a new project from scratch
  2. Opening one of the pre-existing Dee projects from the may workshop

According to Iain users have full control of AppData/Roaming and %temp% (as well as their V: drive where the projects live.

screen shot 2018-09-06 at 8 03 53 am screen shot 2018-09-06 at 8 06 38 am screen shot 2018-09-06 at 8 12 22 am screen shot 2018-09-06 at 8 12 47 am
philipbaileynar commented 6 years ago

I've created a new branch called sepa and implemented several diagnostic measures to help us pin down why the virtual machines are failing to run GCD:

  1. ShowInExtensionDialog flag in esri config XML is now set to true.
  2. Several message pop up dialogs in the code at critical moments.
  3. Converted several Console.Write() statements to exception handling messages.

The sequence of message boxes that appear now when ArGIS starts should be:

  1. GCD Extension Start Up
  2. GCD Extension Start Up Has Completed

When Opening a Project:

  1. Open Project 1
  2. Open Project 2
  3. File Open Dialog
  4. Open Project 3
  5. File path to project file
  6. Project XML Loaded
  7. About to set Project Singleton
  8. project name
  9. Open Project 4
  10. Before Load Project Tree
  11. Before Load Project Tree Object Click
  12. Project Item Status shows the project name
  13. After Load Project Tree Object Click
  14. Project Tree Appears Populated With Items
  15. After Project Tree Node Loading
  16. After Load Project Tree
  17. Open Project 5

Opening FIS Library:

  1. Before Retrieving FIS Library Items
  2. GCDCore,ErrorCalculation.FIS.FISLibrary
  3. After Retrieving FIS Library Items
  4. Populated FIS Library appears
philipbaileynar commented 6 years ago

My latest suspicion is that the GCDAddIn.GCDExtension object is not starting up when ArcMap loads. This code initializes the ProjectManager singleton which in turns initializes the FIS Library object (that appears to be null in @MattReimer 6 Sept 2018 comment on this issue)

philipbaileynar commented 6 years ago

Note the following file path locations:

When an AddIn is installed (i.e. double clicked in Windows Explorer or added via the AddIn Manager) the entire *.esriaddin zip file is copied to the user's profile Documents folder:

C:\Users\philip\Documents\ArcGIS\AddIns\Desktop10.4\{f8ca7dea-22fb-40a3-8412-b84a4b528602}

When this AddIn is actually loaded, the *.esriaddin zip archive gets uncompressed into the users %APPDATA% folder:

C:\Users\philip\AppData\Local\ESRI\Desktop10.4\AssemblyCache\{F8CA7DEA-22FB-40A3-8412-B84A4B528602}

This latter location is where ArcMap actually runs the code from...

philipbaileynar commented 6 years ago

Here is a temporary diagnostic release of the GCD AddIn intended to help diagnose the problem running GCD on virtual computers. Details:

philipbaileynar commented 6 years ago

FIS library XML file missing. --- Stacktrace --- at GCDCore.ErrorCalculation.FIS.FISLibrary.LoadFISLibrary(FileInfo filePath, FISLibraryItemTypes eType) in D:\Code\gcd\gcd\GCDCore\ErrorCalculation\FIS\FISLibrary.cs:line 104 at GCDCore.ErrorCalculation.FIS.FISLibrary.Load() in D:\Code\gcd\gcd\GCDCore\ErrorCalculation\FIS\FISLibrary.cs:line 47 at GCDCore.Project.ProjectManager.Init(String sAutomaticPyramids) in D:\Code\gcd\gcd\GCDCore\Project\ProjectManager.cs:line 76 at GCDAddIn.GCDExtension.OnStartup() in D:\Code\gcd\gcd\GCDAddIn\GCDExtension.cs:line 21 --- Exception Data --- FIS Library File Path = C:\Users\XD\AppData\Roaming\GCD\FISLibrary.xml FIS Library Type = User ArcMap = 10.5.1.7333 GCD = 7.2.1.0 Windows: Microsoft Windows NT 6.1.7601 Service Pack 1 Date: 13/09/2018 12:08:21

philipbaileynar commented 6 years ago

Commit ebc485a appeared to fix this issue during 13 Sep 2018 web conference with Iain at SEPA.

MattReimer commented 6 years ago

As of September 24, this issue seems to be fixed. We can re-open again if there are further problems.

For completeness, there were a few small, minor issues with the deployment different from what we were expecting:

From Alasdair

Good news – it works J. There were a couple of things from the video that I could not do but this doesn’t seem to have stopped it from working.

The first thing I couldn’t do was delete all the existing add-ins. We have one GCD add-in which is a shared add-in and I didn’t have the option of deleting this. I’m guessing that was because it was a centrally installed add-in that everyone with ArcMap could access. Interestingly, once I had installed the new version this shared add-in seems to have disappeared from the add-in manager.

The second thing was that I didn’t have permission to explore my appdata folder. With the help of IS I was able to establish that there was no GCD folder in it anyway so not a problem.

I downloaded the add-in and installed it with no issue. When I then opened ArcMap and tried to select things from the toolbar every item in all of the menus was described as “ [ Missing ] ” with a red circle beside each. I closed down ArcMap, re-opened it and the menus appeared as they should. I was able to create a new project and then open it again with the GCD project explorer opening on both occasions. I then opened the River Dee project we had used during the workshop in April and it all looks to be working as it should.

To which Iain responded:

Not being able to view the app data folder is as expected. While the user has full permissions to the folder, as we confirmed during the remote session, the user cannot browse the C drive. The GCD plugin will still have full access as required.

So I'm going to say this is closed.