Skip to content

[1.5.1] can't open some documents : Duplicate ACLResource #1562

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

Open
1 of 2 tasks
vviers opened this issue Apr 15, 2025 · 1 comment
Open
1 of 2 tasks

[1.5.1] can't open some documents : Duplicate ACLResource #1562

vviers opened this issue Apr 15, 2025 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@vviers
Copy link
Collaborator

vviers commented Apr 15, 2025

Describe the current behavior

Hey there 👋🏼

Some users are complaining that their Grist documents won't open since we deployed 1.5.1

The document crashes on opening with the error : Duplicate ACLResource {id}: an ACLRessource with the same tableID and colIds already exists. Reloading doesn't fix it, and Recovery mode won't let you fix the issue in the ACL pannel since they are stripped to the bare minimum.

The document opens perfectly in grist < 1.5.0

Inspecting the .grist file with sqlite3, we see that the table _grist_ACLResources does contain duplicated lines, although only one of them is reffered to by _grist_ACLRules. Manually removing the unused duplicated line and re-uploading the .grist file fixes the issue (but we're now in a different document).

Looking at the commit history of the project, I see that @paulfitz has touched this part of the code in d38fca6 but I'm not exactly sure why this would break documents that opened perfectly before.

Steps to reproduce

  1. create a .grist file with a duplicated entry in _grist_ACLResources (not sure how that happened in the first place in prod)
  2. open it without any problem in grist 1.4.2
  3. fail to open it in grist 1.5.1

Describe the expected behavior

Docs should open even if there is a duplicated entry in ACLResources

Where have you encountered this bug?

Instance information (when self-hosting only)

  • Grist instance:
    • Version: 1.5.1
    • Installation mode: kubernetes
    • Architecture: multi-workers
@vviers vviers added bug Something isn't working help wanted Extra attention is needed labels Apr 15, 2025
@vviers
Copy link
Collaborator Author

vviers commented Apr 15, 2025

select * from _grist_ACLResources a left join _grist_ACLRules b ON a.id = b.resource where b.id is null; lets you list unused ACLResources.

It looks like it's safe to delete them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant