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

Stuck in "Training" with no progress if a HEIF image was uploaded. #123

Closed
kitchung opened this issue Oct 10, 2021 · 8 comments
Closed

Stuck in "Training" with no progress if a HEIF image was uploaded. #123

kitchung opened this issue Oct 10, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@kitchung
Copy link

kitchung commented Oct 10, 2021

Describe the bug
Stuck in "Training" with no progress if a HEIF image was uploaded.
uploading unsupported image format causes a bad row in train table in the sqlite database causes "Training" to be stuck

Version of Double Take
v1.3.0-5fdac97

Expected behavior
Failed detection should be purged from the database, restrict unsupported file types or convert it to a supported file type.

Screenshots
N/A

Hardware

  • OS: N/A
  • Browser (if applicable) [e.g. Chrome, Safari]: N/A

Additional context
Very impressive app!

@kitchung kitchung added the bug Something isn't working label Oct 10, 2021
@jakowenko
Copy link
Owner

Thank you for reporting this. Do you have a sample file that produces this error I could use to test with?

@kitchung
Copy link
Author

This may have been the log entry:

error: TypeError: Cannot convert undefined or null to object at /double-take/api/src/controllers/train.controller.js:44:7 at Array.forEach (<anonymous>) at /double-take/api/src/controllers/train.controller.js:42:15 at Array.forEach (<anonymous>) at module.exports.get (/double-take/api/src/controllers/train.controller.js:39:9) at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20) at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5) at next (/double-take/api/node_modules/express/lib/router/route.js:137:13) at /double-take/api/src/middlewares/index.js:42:5 at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)

@kitchung kitchung changed the title [BUG] uploading unsupported image format causes a bad row in train table in the sqlite database causes "Training" to be stuck Oct 10, 2021
@kitchung kitchung changed the title uploading unsupported image format causes a bad row in train table in the sqlite database causes "Training" to be stuck Stuck in "Training" with no progress if a HEIF image was uploaded. Oct 10, 2021
@kitchung
Copy link
Author

i shell'd into the container, installed sqlite and used sqlite3 with the following commands:

select * from train;
and found the following entry:
866||||deepstack|{"message":"Cannot read property 'name' of undefined","status":500,"detector":"deepstack"}|2021-10-09T23:59:28.791Z
I got rid of the stuck training by running the following command:
delete from train where ID = 866;

@kitchung
Copy link
Author

Thank you for reporting this. Do you have a sample file that produces this error I could use to test with?

I'd rather not provide what caused the problem, but i think it's pretty easy to repro; the HEIF image in question taken the camera on an Apple iPhone 13 Pro.

@jakowenko
Copy link
Owner

What steps did you go through to produce the error? I also have an iPhone 13 Pro and when I select photos from my camera roll they upload to the train page just fine.

I verified I have the HEIF mode turned on as well.

@kitchung
Copy link
Author

What steps did you go through to produce the error? I also have an iPhone 13 Pro and when I select photos from my camera roll they upload to the train page just fine.

I verified I have the HEIF mode turned on as well.

A bit clarification on how i uploaded the file; I didn't directly upload it from the iOS device:

Google Photos is running on an iphone 13 Pro. I used MS Edge on an android device, and selected a HEIF image that was sync'd Google Photos instead.

I bectcha native iOS upload would transcode it to jpeg instead.

@jakowenko
Copy link
Owner

I pushed a few more checks last night that should hopefully catch this in the future. I was able to break the training page as well, though I got a different error. I found the root cause of this though and that should be fixed.

jakowenko added a commit that referenced this issue Oct 12, 2021
# [1.4.0](v1.3.0...v1.4.0) (2021-10-12)

### Bug Fixes

* **api:train:** validate mime type and result of database.get.fileByFilename ([#123](#123)) ([d5e050f](d5e050f))
* **api:** catch facebox error before normalizing data ([67c93c4](67c93c4))
* **api:** delete orphaned db records when deleting training folder / files ([f031545](f031545))
* **ui:** fix multiselect dropdowns when open and scrolling ([ae2085b](ae2085b))
* **ui:** theme wouldn't load if setting to same theme ([88b0976](88b0976))

### Features

* **api:** api/latest/<name>.jpg ([#120](#120)) ([cd765ae](cd765ae))
* **api:** use camera name when using custom mqtt topic ([70a4ce3](70a4ce3))
* **ui:** enable/disable sockets on matches page ([bb95e0a](bb95e0a))
@jakowenko
Copy link
Owner

This is now released in v1.4.0. I'm going to close it for now, but feel free to reopen if you run into any other issues.

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

No branches or pull requests

2 participants