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:
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
@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?
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.
@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.
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
<!-- 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" />
@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.
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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
To Reproduce
When I want to delete a resource policy, I've got this error message:
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
@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?
@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.
@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.
@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
@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: debugunder theapp:section.@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
@oschwartz10612 commented on GitHub (Jun 12, 2026):
Could you email to support@pangolin.net?
@Nonoss117 commented on GitHub (Jun 12, 2026):
email sent.
Thank's again for your help