Error in project switcher

After we upgraded to 2019.10.5 today, I am getting an error when I click the Project Switcher button. The error shows about a quarter second after I click the button, while the search box overlay is being built.

How it appears in the browser:

How it appears in the console:

react-dom.production.min.js:193 TypeError: Cannot read property 'Id' of undefined
    at e.keyMapper [as _keyMapper] (VirtualListWithKeyboard.tsx:63)
    at e.rowHeight (CellMeasurerCache.js:41)
    at e.r.rowHeight [as _cellSizeGetter] (VirtualListWithKeyboard.tsx:172)
    at e.value (CellSizeAndPositionManager.js:87)
    at e.value (ScalingCellSizeAndPositionManager.js:82)
    at D (defaultCellRangeRenderer.js:39)
    at t.value (Grid.js:822)
    at t.value (Grid.js:649)
    at ja (react-dom.production.min.js:178)
    at Aa (react-dom.production.min.js:177)
el @ react-dom.production.min.js:193
logger.ts:7 TypeError: Cannot read property 'Id' of undefined
    at e.keyMapper [as _keyMapper] (VirtualListWithKeyboard.tsx:63)
    at e.rowHeight (CellMeasurerCache.js:41)
    at e.r.rowHeight [as _cellSizeGetter] (VirtualListWithKeyboard.tsx:172)
    at e.value (CellSizeAndPositionManager.js:87)
    at e.value (ScalingCellSizeAndPositionManager.js:82)
    at D (defaultCellRangeRenderer.js:39)
    at t.value (Grid.js:822)
    at t.value (Grid.js:649)
    at ja (react-dom.production.min.js:178)
    at Aa (react-dom.production.min.js:177)

The error is present:

  • in Chrome and IE11 on my laptop
  • in IE on a server that I have RDP access to
  • after logging out and back in again
  • and after clearing all cache, history and cookies
  • in incognito mode

No extensions or add-ins are active in the browser except SentinelOne (our antivirus/antimalware solution). We do have a global proxy server that is in effect for external websites, but our Octo server is an on-premises server, the proxy server is not involved.

Using the project search comboboxes from the Dashboard works fine.
Using the search comboboxes from the Projects page works fine.

So far I am the only one in my organization to report this problem, but I’m unable to eliminate this problem. As I said it’s not a showstopper because I can use other means to search projects.

Since it happens for my login on multiple machines and browsers, could it be connected to my specific username? Another member of my team, with the exact same permissions, is not hitting this problem.

Any other info I can provide?

Hi Ross,

Thanks for getting in touch! I’m very sorry to hear you’re hitting this unexpected and strange issue. I appreciate the level of detail you provided in this report. I haven’t been able to reproduce this issue in my local instance, so I would suspect it would be due somehow to this specific user’s permissions like you suspected. Would you be willing to send a permissions export from this affected user? This can be downloaded in your web portal under Configuration > Test Permissions, selecting the user and exporting.

I look forward to hearing back and getting to the bottom of this one!

Best regards,

Kenny

Hi Ross,

We’ve been looking into this issue today, and one way that this can happen is if you recently viewed a project and then your permissions changed such that you can no longer view that project. In this case the system can generate the error that you detailed. I’m not 100% sure yet that that’s what happened here, but it’s one possibility.

Would you be happy to send me the results from a couple of URLs in your Octopus Deploy instance? The URLs are:

For the first one I would only need the list of RecentlyViewedProjectIds, and for the second one I would only need the list of projects.

Thank you for your patience! I hope we can get this sorted for you quickly!

Kind regards,
Andrew.

Here you go!

from /api/users/me:

"RecentlyViewedProjectIds": {
    "Spaces-1": [
      "Projects-1464",
      "Projects-1282",
      "Projects-985",
      "Projects-1375",
      "Projects-1501"
    ]
},

From /api/Spaces-1/dashboard: api–Spaces-1–dashboard.zip (92.1 KB)

And here’s the Permissions export: Permissions_export_2019_11_12__15_17_33_UTC.csv (3.4 KB)

Hi Ross,

Thanks for sending through that information so quickly! I’ve compared the project ids in your recently viewed projects to the list of projects you have access to, and there is one project (Projects-1375) that you have viewed recently that you no longer have access to. That’s what will be causing this bug. The good news is that we’re working on a fix for this now.

Sorry for the inconvenience! We should have the project switcher working for you again soon!

Kind regards,
Andrew.

OK, that project apparently got deleted (and I remember deleting it). If I visit a bunch of other projects today, will that flush out Projects-1375 from the recent list and thereby bypass the problem, until you get the fix done and we get it upgraded?

Hi Ross,

Octopus Deploy will remember 5 recently used projects per space. There is a scoring algorithm that considers how many times you’ve accessed a project as well as how recently you last accessed it. If the deleted project was one that you accessed quite recently and frequently it may be hard to flush it out of the list, but it’s definitely worth a try. Let me know how you go!

The good news is that a fix for this issue should be released in version 2019.10.7. :slight_smile:

Kind regards,
Andrew.

Well, current status: Projects-1375 is now the last one listed in /api/users/me

"RecentlyViewedProjectIds": {
  "Spaces-1": [
    "Projects-985",
    "Projects-1464",
    "Projects-1282",
    "Projects-1372",
    "Projects-1375"
  ]
}

and (perhaps because it’s the last) the error is no longer blocking me from the Switcher button. So that’s great!

Thanks for your excellent help. Even though the problem has “fixed itself” in that I am no longer blocked, it is much better that I now understand what was going on!

1 Like