Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharing dataset with user does not persist #480

Open
LAMaglan opened this issue Feb 10, 2025 · 6 comments
Open

Sharing dataset with user does not persist #480

LAMaglan opened this issue Feb 10, 2025 · 6 comments

Comments

@LAMaglan
Copy link

I am trying to share my dataset with another user (4CAT v1.46). See xample below (a random dataset)
Image

This seems to work, but when refreshing the page, the user disappears from "Dataset access" (i.e. it reverts back to the previous state).

Image

@dale-wahl
Copy link
Member

I am having trouble recreating this error. I have a few questions that might be able to help us track it down:

  1. Is this a new error (as in you used to be able to share ownership but now cannot)?
  2. Can you create new datasets or run analyses? I ask because right now my best guess is that you cannot actually update the database from the frontend. But you clearly can read from it.
  3. What does your 4CAT setup look like (Docker/directly installed; is it local or on a server, etc.)?

Some findings when trying to recreate this error for us:

  • You can add the same user multiple time and it will show up again and again in the interface. The duplicates then disappear on a refresh (because you can only really add a user once). Does not appear to be what this user is experiencing though.
  • You can also add multiple users, but if a user does not exist in the middle of the group, it will fail and create a popup to inform the user of the non-existing user ID. In this case, no users will appear in the interface until a refresh (and only the users prior to the failure will actually be added).

@LAMaglan
Copy link
Author

LAMaglan commented Feb 10, 2025

  1. I have not tested the functionality until now, so I unfortunately do not know
  2. I can create a new dataset with the Zeeschuimer add-on. Just now tested harvesting data from Linkedin. I can also run an anlysis (I tried "sentence split" from "text analysis")

Image

  1. It is running with docker-compose on a server (technically speaking, via rootless podman, but it should not be functionally different from docker)I replicated this error with the new dataset I just created (the one from the screenshot).

After some testing, I notice that when I first make the dataset "public", then add the user, and refresh the page, the added user "persists". When I then make the dataset private again, the user is there. So this seems like a sort of workaround?

@dale-wahl
Copy link
Member

Well, that is weirder. There are no checks related to a dataset being private in relation to adding new owners/viewers. If you own the dataset (or are an admin with rights to manipulate dataset), you can share it.

You can monitor the frontend logs when you are trying to add a user to see if any error shows up. They located in /usr/src/app/logs/ and you would most likely see something in error_gunicorn.log. I cannot recreate this error.

Found another oddity:

  • If you add multiple users at once, only the last immediately appears in UI. The rest appear only after a refresh.

@LAMaglan
Copy link
Author

I have done some more testing.
It seems like I can in fact add a user to a "private" dataset, but it does not show up immediately after "refreshing" the page, but only after a few hours (or at least, I checked 10 minutes after, and then a few hours after).

Nothing shows up for this in the various log files in the frontend:/usr/src/app/logs/

@stijn-uva
Copy link
Member

That is quite strange! The query should either work immediately, or not at all. I don't know of any code in 4CAT that would make the query execute, but only after a delay.

Two possibilities come to mind:

  • The database is configured in some non-standard way where it caches query results for far longer than it usually does, and does not invalidate the cache properly after data has been updated.
  • The browser caches the dataset result page and does not properly re-fetch it when reloading the page after adding someone to the dataset.

The second is relatively easy to check - add a user, and then force a refresh of the page (e.g. with ctrl + f5). Does the new user show up?

The former is harder to ascertain, but are you connecting 4CAT to a different database than the one that would usually be used when running it via Docker? Did you change config.ini to point at a different database server than what is configured by default, for example?

@LAMaglan
Copy link
Author

LAMaglan commented Feb 11, 2025

The second is relatively easy to check - add a user, and then force a refresh of the page (e.g. with ctrl + f5). Does the new user show up?

Yes, forcing a refresh of the page (i.e. not using the cached files) worked

Other than running docker-compose with rootless podman instead of docker (and changing some port numbers, and version of postgres), the setup is otherwise the same (including no changes to config.ini)

(message edited because formatting made unclear that force refreshing page worked)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants