Records.json import web interface does not work
OS & Hardware Debian 12
Version 0.26.0
Describe the bug Unable to create import for records.json using web interface
To Reproduce Steps to reproduce the behavior:
- Go imports page
- Click on Records.json
- Select file
- It is unclear what one should do now. Intuitively, I would click "Create Import" but if I just wait, I will see the upload progress bar goto 100%. Then if I wait a little longer, the progress bar jumps back to 0% then goes slowly goes up to 100%. I don't know if it is uploading twice.
- Click on Create Import, nothing happens
- Wait longer, Click on Create Import, an error message pops up saying I need to select a file eventhough it is already selected
Expected behavior If one needs to wait for upload prior to clicking "Create Import" it should probably be greyed out until the upload is complete. Clicking on "Create Import" should actually create the import.
Please provide logs from both dawarich_sidekiq and dawarich_app containers
Logs
dawarich_app | D, [2025-05-17T02:45:13.669136 #17028] DEBUG -- : TRANSACTION (0.2ms) BEGIN dawarich_app | D, [2025-05-17T02:45:13.936964 #17028] DEBUG -- : ActiveStorage::Blob Create (267.6ms) INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "service_name", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["key", "7xstym4o72spn37lwhqcrw29tr0a"], ["filename", "Records.json"], ["content_type", "application/json"], ["metadata", nil], ["service_name", "local"], ["byte_size", 1051669069], ["checksum", "uLQrJ6UeO9dIYmJByXJoAg=="], ["created_at", "2025-05-17 02:45:13.612833"]] dawarich_app | D, [2025-05-17T02:45:14.007100 #17028] DEBUG -- : TRANSACTION (52.9ms) COMMIT dawarich_app | D, [2025-05-17T02:45:14.050817 #17028] DEBUG -- : Disk Storage (13.2ms) Generated URL for file at key: 7xstym4o72spn37lwhqcrw29tr0a (http://172.17.17.20:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiI3eHN0eW00bzcyc3BuMzdsd2hxY3J3Mjl0cjBhIiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vanNvbiIsImNvbnRlbnRfbGVuZ3RoIjoxMDUxNjY5MDY5LCJjaGVja3N1bSI6InVMUXJKNlVlTzlkSVltSkJ5WEpvQWc9PSIsInNlcnZpY2VfbmFtZSI6ImxvY2FsIn0sImV4cCI6IjIwMjUtMDUtMTdUMDI6NTA6MTQuMDMwWiIsInB1ciI6ImJsb2JfdG9rZW4ifX0=--60288160e85da493646c52fca0521ab90d78a221) dawarich_app | I, [2025-05-17T02:45:14.064724 #17028] INFO -- : {"method":"POST","path":"/rails/active_storage/direct_uploads","format":"json","controller":"ActiveStorage::DirectUploadsController","action":"create","status":200,"allocations":11666,"duration":575.13,"view":8.43,"db":330.77} dawarich_app | D, [2025-05-17T02:45:28.784253 #17028] DEBUG -- : TRANSACTION (0.2ms) BEGIN dawarich_app | D, [2025-05-17T02:45:28.797309 #17028] DEBUG -- : ActiveStorage::Blob Create (13.0ms) INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "service_name", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["key", "t0w6oe3phyy1jax83yoiq9camqly"], ["filename", "Records.json"], ["content_type", "application/json"], ["metadata", nil], ["service_name", "local"], ["byte_size", 1051669069], ["checksum", "uLQrJ6UeO9dIYmJByXJoAg=="], ["created_at", "2025-05-17 02:45:28.780663"]] dawarich_app | D, [2025-05-17T02:45:28.841408 #17028] DEBUG -- : TRANSACTION (35.8ms) COMMIT dawarich_app | D, [2025-05-17T02:45:28.843453 #17028] DEBUG -- : Disk Storage (0.2ms) Generated URL for file at key: t0w6oe3phyy1jax83yoiq9camqly (http://172.17.17.20:3000/rails/active_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJrZXkiOiJ0MHc2b2UzcGh5eTFqYXg4M3lvaXE5Y2FtcWx5IiwiY29udGVudF90eXBlIjoiYXBwbGljYXRpb24vanNvbiIsImNvbnRlbnRfbGVuZ3RoIjoxMDUxNjY5MDY5LCJjaGVja3N1bSI6InVMUXJKNlVlTzlkSVltSkJ5WEpvQWc9PSIsInNlcnZpY2VfbmFtZSI6ImxvY2FsIn0sImV4cCI6IjIwMjUtMDUtMTdUMDI6NTA6MjguODQyWiIsInB1ciI6ImJsb2JfdG9rZW4ifX0=--6c2cdb09983b70c85c5ce5b43bce0f205db6f524) dawarich_app | I, [2025-05-17T02:45:28.849483 #17028] INFO -- : {"method":"POST","path":"/rails/active_storage/direct_uploads","format":"json","controller":"ActiveStorage::DirectUploadsController","action":"create","status":200,"allocations":5723,"duration":77.32,"view":2.61,"db":48.92} dawarich_app | I, [2025-05-17T02:45:58.635484 #17226] INFO -- : {"method":"GET","path":"/api/v1/health","format":"/","controller":"Api::V1::HealthController","action":"index","status":200,"allocations":903,"duration":1.46,"view":0.04,"db":0.19} dawarich_app | D, [2025-05-17T02:46:10.197154 #17226] DEBUG -- : User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."api_key" IS NULL LIMIT $1 [["LIMIT", 1]] dawarich_app | D, [2025-05-17T02:46:10.197626 #17226] DEBUG -- : ��� app/controllers/api_controller.rb:22:in 'ApiController#current_api_user' dawarich_app | I, [2025-05-17T02:46:10.197846 #17226] INFO -- : {"method":"GET","path":"/api/v1/health","format":"/","controller":"Api::V1::HealthController","action":"index","status":200,"allocations":903,"duration":1.65,"view":0.05,"db":0.24} dawarich_app | [265] - Worker 1 (PID: 20097) booted in 0.12s, phase: 0 dawarich_app | D, [2025-05-17T02:46:23.898297 #17226] DEBUG -- : User Load (60.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 2], ["LIMIT", 1]] dawarich_app | D, [2025-05-17T02:46:23.898682 #17226] DEBUG -- : ��� app/channels/application_cable/connection.rb:14:in 'ApplicationCable::Connection#find_verified_user' dawarich_app | I, [2025-05-17T02:46:23.950063 #17226] INFO -- : {"method":null,"path":null,"format":null,"params":{},"controller":"ApplicationCable::Connection","action":"connect","status":200,"allocations":2454,"duration":115.29} dawarich_app | I, [2025-05-17T02:46:24.020501 #17226] INFO -- : {"method":null,"path":null,"format":null,"params":null,"controller":"NotificationsChannel","action":"subscribe","status":200,"allocations":164,"duration":10.07} dawarich_app | I, [2025-05-17T02:46:24.029094 #17226] INFO -- : {"method":null,"path":null,"format":null,"params":null,"controller":"ImportsChannel","action":"subscribe","status":200,"allocations":128,"duration":0.22} dawarich_app | I, [2025-05-17T02:46:24.026599 #17226] INFO -- : {"method":null,"path":null,"format":null,"params":null,"controller":"NotificationsChannel","action":"subscribe","status":200,"allocations":113,"duration":0.25} dawarich_app | I, [2025-05-17T02:46:24.022059 #17226] INFO -- : {"method":null,"path":null,"format":null,"params":null,"controller":"PointsChannel","action":"subscribe","status":200,"allocations":128,"duration":0.45} dawarich_app | D, [2025-05-17T02:46:26.480487 #20097] DEBUG -- : ActiveRecord::SchemaMigration Load (44.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC dawarich_app | D, [2025-05-17T02:46:27.797172 #20097] DEBUG -- : User Load (20.0ms) SELECT "users".* FROM "users" WHERE "users"."api_key" IS NULL LIMIT $1 [["LIMIT", 1]] dawarich_app | D, [2025-05-17T02:46:27.806901 #20097] DEBUG -- : ��� app/controllers/api_controller.rb:22:in 'ApiController#current_api_user'
No activity on sidekiq during the period.
Good, I can see that file was successfully uploaded, but I don't see you hit the "Create import" button, there are no logs for that
Correct, as described in my OP when I click "Create Import" either nothing happens or an error message pops up saying I need to select a file eventhough it is already selected