[GH-ISSUE #3257] Impossible to delete a public resource policy #30180

Open
opened 2026-06-13 10:43:06 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @Nonoss117 on GitHub (Jun 12, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/3257

Originally assigned to: @oschwartz10612 on GitHub.

Describe the Bug

Error when I try to delete a public resource policy

Environment

  • OS Type & Version: Ubuntu 24.04.4 LTS
  • Pangolin Version: ee-1.19.1
  • Edition (Community or Enterprise): Enterprise
  • Gerbil Version: 1.4.1
  • Traefik Version: 3.7.5
  • Newt Version: 1.13.0

To Reproduce

When I want to delete a resource policy, I've got this error message:

Image

I think this log is related to this issue:
Stack: SqliteError: FOREIGN KEY constraint failed at Statement.run (file:///app/dist/server.mjs:1270:19) at PreparedQuery.run (file:///app/node_modules/drizzle-orm/better-sqlite3/session.js:72:22) at QueryPromise.resultCb (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:119:64) at QueryPromise.execute (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:13:17) at QueryPromise.then (file:///app/node_modules/drizzle-orm/query-promise.js:21:17) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {"code":"SQLITE_CONSTRAINT_FOREIGNKEY"}

Expected Behavior

Deleting a resource policy should be possible

Originally created by @Nonoss117 on GitHub (Jun 12, 2026). Original GitHub issue: https://github.com/fosrl/pangolin/issues/3257 Originally assigned to: @oschwartz10612 on GitHub. ### Describe the Bug Error when I try to delete a public resource policy ### Environment - OS Type & Version: Ubuntu 24.04.4 LTS - Pangolin Version: ee-1.19.1 - Edition (Community or Enterprise): Enterprise - Gerbil Version: 1.4.1 - Traefik Version: 3.7.5 - Newt Version: 1.13.0 ### To Reproduce When I want to delete a resource policy, I've got this error message: <img width="1289" height="523" alt="Image" src="https://github.com/user-attachments/assets/fd4a95dd-c555-4ffb-bd2c-14db50bf65b4" /> I think this log is related to this issue: `Stack: SqliteError: FOREIGN KEY constraint failed at Statement.run (file:///app/dist/server.mjs:1270:19) at PreparedQuery.run (file:///app/node_modules/drizzle-orm/better-sqlite3/session.js:72:22) at QueryPromise.resultCb (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:119:64) at QueryPromise.execute (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:13:17) at QueryPromise.then (file:///app/node_modules/drizzle-orm/query-promise.js:21:17) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {"code":"SQLITE_CONSTRAINT_FOREIGNKEY"}` ### Expected Behavior Deleting a resource policy should be possible
GiteaMirror added the bugpotential bug labels 2026-06-13 10:43:06 -05:00
Author
Owner

@oschwartz10612 commented on GitHub (Jun 12, 2026):

Yeah that seems like a bug. Is it still associated with a resource? If you remove it first does it allow you to delete it?

<!-- gh-comment-id:4694314976 --> @oschwartz10612 commented on GitHub (Jun 12, 2026): Yeah that seems like a bug. Is it still associated with a resource? If you remove it first does it allow you to delete it?
Author
Owner

@Nonoss117 commented on GitHub (Jun 12, 2026):

Thank you for your reply.
The policy is not associated to any resource. The screen capture confirme that.

<!-- gh-comment-id:4694352120 --> @Nonoss117 commented on GitHub (Jun 12, 2026): Thank you for your reply. The policy is not associated to any resource. The screen capture confirme that.
Author
Owner

@oschwartz10612 commented on GitHub (Jun 12, 2026):

Do you have any pincodes, passcodes, or rules on the policy? If so could you try removing them one by one and let me know which one allows it to delete? We are investigating this issue from the code side as well.

<!-- gh-comment-id:4694403211 --> @oschwartz10612 commented on GitHub (Jun 12, 2026): Do you have any pincodes, passcodes, or rules on the policy? If so could you try removing them one by one and let me know which one allows it to delete? We are investigating this issue from the code side as well.
Author
Owner

@Nonoss117 commented on GitHub (Jun 12, 2026):

I only have pincode. But when I try to unselect the pin code rule, and save settings I have this error:
and the same log message
Image

<!-- gh-comment-id:4694517371 --> @Nonoss117 commented on GitHub (Jun 12, 2026): I only have pincode. But when I try to unselect the pin code rule, and save settings I have this error: and the same log message <img width="848" height="801" alt="Image" src="https://github.com/user-attachments/assets/74d106ea-8158-4ab0-902c-e0e7174782bc" />
Author
Owner

@oschwartz10612 commented on GitHub (Jun 12, 2026):

Hum seems the policy is really messed up some how. Would you be able to provide larger log dump including doing both of these actions (deleteing and removing the pincode) when the server is in debug mode? You can change this in the config/config.yml file adding log_level: debug under the app: section.

<!-- gh-comment-id:4695453191 --> @oschwartz10612 commented on GitHub (Jun 12, 2026): Hum seems the policy is really messed up some how. Would you be able to provide larger log dump including doing both of these actions (deleteing and removing the pincode) when the server is in debug mode? You can change this in the config/config.yml file adding `log_level: debug` under the `app:` section.
Author
Owner

@Nonoss117 commented on GitHub (Jun 12, 2026):

I have the log in debug mode. With first trying to delete pincode and after trying to delete the resource policy.
But how can I send you the file without posting it here and making the log "public" ?
Thank's

<!-- gh-comment-id:4695564818 --> @Nonoss117 commented on GitHub (Jun 12, 2026): I have the log in debug mode. With first trying to delete pincode and after trying to delete the resource policy. But how can I send you the file without posting it here and making the log "public" ? Thank's
Author
Owner

@oschwartz10612 commented on GitHub (Jun 12, 2026):

Could you email to support@pangolin.net?

<!-- gh-comment-id:4695567435 --> @oschwartz10612 commented on GitHub (Jun 12, 2026): Could you email to support@pangolin.net?
Author
Owner

@Nonoss117 commented on GitHub (Jun 12, 2026):

email sent.
Thank's again for your help

<!-- gh-comment-id:4695637136 --> @Nonoss117 commented on GitHub (Jun 12, 2026): email sent. Thank's again for your help
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#30180