TypeError: agency.inboundPartnerAgencies is undefined

Hello!

I keep getting this error when accessing either Boardings, Vessels, or Crews, and the results are not loading.

e.g. clicking Boarding Records on main menu > Boardings

Repro with local setup using the sandbox, or on the sandbox itself

Should I create a Github Issue (maybe it’s a recent regression), or is it because I’m trying to access it on a Saturday morning? :sweat_smile:

1 Like

Hi! This was fixed on Friday in our sandbox server, can you “git pull” on your local code to get the latest code and test against the sandbox server? (it was bugging me too, so I looked into it and finally resolved it)

Thanx!

-Sheeri

1 Like

Thanks for looking at it @Sheeri_Cabral

I’m still getting an error though

This time, it is
asyncToGenerator.js:6 Uncaught (in promise) TypeError: Cannot read property 'filter' of undefined

Ah, I got it resolved.
For some reason, it was only happening on the user that I was using.
When I created another user, it worked fine.

Thanks!

That’s weird! Are they different user types, like the one that had an error was a Field Officer, and the one that didn’t is an Agency Administrator? We’re still working out some permissions issues, so it would be helpful to know.

I’m so glad you got unstuck!

Yes, that’s actually true. Good catch!
I checked, and the one that is getting the error was a Field Officer, and the newly one I created got the default Agency Admin, so it worked

1 Like

If you’re interested, I fixed it today (on the sandbox), the fix was to put an if statement around the block of code so it doesn’t run if inboundPartnerAgencies is null (because the function just returns the agency name and shared agencies, to the agency variable). See Update get-data.js by Sheeri · Pull Request #355 · WildAid/o-fish-web · GitHub

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.