Server Crash upon dynamic loading of dependency in addon

Hi,

I’m back at cobbling addons together.
I’ve been trying to get a dependency added through a pypoetry.toml in the client, and I saw the shotgrid addon using a git link for this.
I thought, why not try it with the dependency I’m trying to add, which is LDAP3.
https://github.com/cannatag/ldap3

[tool.poetry.dependencies]
python = "^3.10"
ldap3 = { git = "https://github.com/cannatag/ldap3.git", tag = "^2.9.1" }

Upon adding the package and restarting the server however, I found myself completely locked out of the website, there were some quick red colored messages saying something like “Error loading dynamic module” with a javascript file on the end, that I couldn’t read, as well as “Server Connection Failed”.

EDIT:
Was able to catch the error by spamming printscreen.

Funnily enough, the actual server stayed online. From my dev seat I don’t have access to the file system that Ayon Server uses so I can’t rummage around and manually delete the dependency, so I used postman to login through the api and I deleted the entire plugin. I requested a restart, which succeeded,
but the login problems persisted with the same messages popping up, even though I set ?purge=true when issuing the addon delete request.

While we figure out how to get our AYON site back up and running,
can anyone outline what makes a specific python package work in this way, and if anyone is willing to take a look, what about this one isn’t compatible with loading through a poetry git dependency?

The ayon container has internet access and succesfully interfaces with shotgrid / flow, so that’s not a problem.

Thanks in advance!

Sas

any chance to let it crash with browser dev console / network tab opened, in order to track if there’s a failing request?

there’s a spot in the server that returns the content of client pyproject actually so it could under some circumstances return an error response to the frontend. if that’s a case, it should be handled better.

The console log with relevant error messages (on login)

Networking snapshot:


After taking these screenshots, i can log back in.

It seems to have resolved itself? Have I gotten lucky?
This is all very weird.

Either way I think the thing of note here is the GraphQL Error.

With these types of things - if it’s frontend misbehaving I always tend to recommend to try:

  1. Hard refresh: CTRL+F5
  2. Incognito mode

Just so that any caching or cookies may not be affecting your results. The Type Error you were getting I’ve seen every now and then just due to the browser trying to use some older ‘cached’ endpoint that doesn’t exist after e.g. a server update.

1 Like