l3tnun / EPGStation

Mirakurun を使用した録画管理ソフト
https://twitter.com/l3tnun
MIT License
566 stars 151 forks source link

EPGUpdater で TypeORMError がスローされる #687

Open hiroxto opened 5 months ago

hiroxto commented 5 months ago

環境

l3tnun/epgstation:v2.10.0-debian がベースの Docker 上で動いています

Issue

定期的に EPGUpdater で TypeORMError: Empty criteria(s) are not allowed for the delete method. がスローされエラーログが記録されます。

エラーログの記録箇所は src/model/db/ProgramDB.tsProgramDB.update() と思われますが,発生条件などは調査できていません。

https://github.com/l3tnun/EPGStation/blob/5cf2ea383d37937eacecf424820dbd7a278d577e/src/model/db/ProgramDB.ts#L320-L323

ログの記録を始めたのがここ最近のため古いログは残っておらず,いつから発生しているのかは不明ですが,記録を開始した 2024/06/24 から同じ内容のエラーログが記録されていました

エラー発生時の周辺のログ (logs/EPGUpdater/system.log info 以上のログのみ)

[2024-07-04T16:35:20.321] [INFO] system - update program db start
[2024-07-04T16:35:20.322] [INFO] system - { deleteValues: 2, insertValues: 0, updateValues: 124 }
[2024-07-04T16:35:20.332] [ERROR] system - program delete error: undefined
[2024-07-04T16:35:20.332] [ERROR] system - TypeORMError: Empty criteria(s) are not allowed for the delete method.
    at EntityManager.delete (/app/node_modules/typeorm/entity-manager/EntityManager.js:366:35)
    at ProgramDB.update (/app/dist/model/db/ProgramDB.js:252:49)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async EPGUpdateManageModel.saveProgram (/app/dist/model/epgUpdater/EPGUpdateManageModel.js:433:21)
    at async EPGUpdater.updateMirakurunEventStream (/app/dist/model/epgUpdater/EPGUpdater.js:138:13)
[2024-07-04T16:35:20.333] [ERROR] system - program delete error: undefined
[2024-07-04T16:35:20.333] [ERROR] system - TypeORMError: Empty criteria(s) are not allowed for the delete method.
    at EntityManager.delete (/app/node_modules/typeorm/entity-manager/EntityManager.js:366:35)
    at ProgramDB.update (/app/dist/model/db/ProgramDB.js:252:49)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async EPGUpdateManageModel.saveProgram (/app/dist/model/epgUpdater/EPGUpdateManageModel.js:433:21)
    at async EPGUpdater.updateMirakurunEventStream (/app/dist/model/epgUpdater/EPGUpdater.js:138:13)
[2024-07-04T16:35:20.489] [INFO] system - update program db done
[2024-07-04T16:41:20.467] [INFO] system - delete old program db start
[2024-07-04T16:41:20.486] [INFO] system - delete old program db done
[2024-07-04T16:41:20.531] [INFO] system - update channel db start
[2024-07-04T16:41:20.531] [INFO] system - { insertValues: 0, updateValues: 7 }
[2024-07-04T16:41:20.544] [INFO] system - update channel db done
[2024-07-04T16:41:20.545] [INFO] system - update program db start
[2024-07-04T16:41:20.545] [INFO] system - { deleteValues: 1, insertValues: 0, updateValues: 300 }
[2024-07-04T16:41:20.558] [ERROR] system - program delete error: undefined
[2024-07-04T16:41:20.558] [ERROR] system - TypeORMError: Empty criteria(s) are not allowed for the delete method.
    at EntityManager.delete (/app/node_modules/typeorm/entity-manager/EntityManager.js:366:35)
    at ProgramDB.update (/app/dist/model/db/ProgramDB.js:252:49)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async EPGUpdateManageModel.saveProgram (/app/dist/model/epgUpdater/EPGUpdateManageModel.js:433:21)
    at async EPGUpdater.updateMirakurunEventStream (/app/dist/model/epgUpdater/EPGUpdater.js:149:13)
[2024-07-04T16:41:20.906] [INFO] system - update program db done
[2024-07-04T16:51:20.694] [INFO] system - delete old program db start
[2024-07-04T16:51:20.722] [INFO] system - delete old program db done
[2024-07-04T17:01:10.860] [INFO] system - update program db start