cloud-py-api / mediadc

Nextcloud Media Duplicate Collector application
https://apps.nextcloud.com/apps/mediadc
GNU Affero General Public License v3.0
93 stars 6 forks source link

Cannot add any target directories #224

Open ibizaman opened 5 months ago

ibizaman commented 5 months ago

Describe the bug Cannot add target directories or exclude directories.

To Reproduce Steps to reproduce the behavior:

  1. Go to MediaDC app page
  2. In Target Directories, click + Select
  3. Choose any folder in the popup dialog
  4. Click on Choose in the popup dialog
  5. Dialog closes, no directory added in the target directories. Follow error appears in browser console log - no error in nextcloud server log:
Uncaught (in promise) Error: FilePicker: No nodes selected
    pick index.mjs:68
    close index.mjs:37
    VueJS 4
    handleClose FilePicker-0bd54f66.mjs:939
    VueJS 4
    c NcDialog.mjs:130
    handleButtonClose NcDialog.mjs:126
[index.mjs:68:48](webpack:///mediadc/node_modules/@nextcloud/dialogs/dist/index.mjs)

Expected behavior A folder is added in the target directories.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context When the popup dialog is open and I close it by clicking on the X in the top right, I get another similar although different stack trace:

Uncaught (in promise) Error: FilePicker: No nodes selected
    pick index.mjs:68
    close index.mjs:37
    VueJS 4
    handleClose FilePicker-0bd54f66.mjs:939
    VueJS 4
    c NcDialog.mjs:130
    VueJS 4
    close NcModal.mjs:374
    setTimeout handler*close NcModal.mjs:373
    handleKeydown NcModal.mjs:392
    beforeMount NcModal.mjs:351
    VueJS 36
    pick index.mjs:30
    pick index.mjs:56
    pick index.mjs:55
    openDirectoriesExplorer TasksNew.vue:265
    VueJS 4
    click NcButton.mjs:185
    VueJS 3
andrey18106 commented 5 months ago

@ibizaman Could you verify that after selecting your target directory there are no failing requests in the browser dev tools -> network tab, in particular remote.php/dav/files/path/to/your/target/folder?

I couldn't reproduce this on local dev env (NC 28.0.2).

ibizaman commented 5 months ago

Yes! I thought not but I found this:

PROPFIND    https://<redacted>/remote.php/dav/files/<me>/

<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/files/<me>/
    </d:href>
    <d:propstat>
      <d:prop>
        <d:getetag>&quot;65c07011c634b&quot;
        </d:getetag>
        <d:getlastmodified>Mon, 05 Feb 2024 05:20:17 GMT
        </d:getlastmodified>
        <d:quota-available-bytes>-3
        </d:quota-available-bytes>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <nc:has-preview>false
        </nc:has-preview>
        <nc:is-encrypted>0
        </nc:is-encrypted>
        <nc:mount-type>
        </nc:mount-type>
        <nc:share-attributes>[]
        </nc:share-attributes>
        <oc:comments-unread>0
        </oc:comments-unread>
        <oc:favorite>0
        </oc:favorite>
        <oc:fileid>1686089
        </oc:fileid>
        <oc:owner-display-name>timi
        </oc:owner-display-name>
        <oc:owner-id><me>
        </oc:owner-id>
        <oc:permissions>GDNVCK
        </oc:permissions>
        <oc:share-types/>
        <oc:size>707916113616
        </oc:size>
        <x1:share-permissions xmlns:x1="http://open-collaboration-services.org/ns">15
        </x1:share-permissions>
      </d:prop>
      <d:status>HTTP/1.1 200 OK
      </d:status>
    </d:propstat>
    <d:propstat>
      <d:prop>
        <d:getcontentlength/>
        <d:getcontenttype/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found
      </d:status>
    </d:propstat>
  </d:response>
...
</d:multistatus>

(I've got no idea what that empty propstat means).

Then:

GET    https://<redacted>/core/preview?fileId=1689521&x=32&y=32&mimeFallback=true&a=0&c=65c07011c634b

404

^ Same for all files.

jeliastam commented 5 months ago

I have the same problem but I am not seeing any failed network requests. The FilePicker error shows long before the request for the target directory completes.

adding system info:

{
  "nextcloud-version": "28.0.2.5",
  "app-versions": {
    "cloud_py_api-version": "0.1.9",
    "mediadc-version": "0.3.8"
  },
  "is-videos-supported": true,
  "is-snap": false,
  "arch": "amd64",
  "webserver": "nginx/1.24.0",
  "database": {
    "type": "mysql",
    "version": "10.11.6",
    "size": "868737024"
  },
  "php-version": "8.2.13",
  "php-interpreter": "php",
  "python-interpreter-setting": "/usr/bin/python3",
  "os": "Linux",
  "os-release": "5.19.17-Unraid",
  "machine-type": "x86_64"
}
Sblop commented 4 months ago

I have the same problem.

jeliastam commented 4 months ago

Was there an update? I was just testing some different things to see if I could narrow down the problem and I was actually able to add my directory! woohoo!

ibizaman commented 4 months ago

@jeliastam I'm beginning to think I'm insane but it works for me too now. Nextcloud version is 28.0.2.5

Rehaell commented 4 months ago

I have this same issue. I managed once to add a folder, but I didn't finished adding the task.

Now, it just wont populate any of the folder targets.

moarsmokes commented 3 months ago

Can confirm, cannot select path.

{
  "nextcloud-version": "28.0.4.1",
  "app-versions": {
    "cloud_py_api-version": "0.1.9",
    "mediadc-version": "0.3.8"
  },
  "is-videos-supported": true,
  "is-snap": false,
  "arch": "amd64",
  "webserver": "nginx/1.24.0",
  "database": {
    "type": "mysql",
    "version": "10.11.6",
    "size": "65224704"
  },
  "php-version": "8.3.4",
  "php-interpreter": "php",
  "python-interpreter-setting": "/usr/bin/python3",
  "os": "Linux",
  "os-release": "6.1.64-Unraid",
  "machine-type": "x86_64"
}

No failing requests, except core/preview?fileId=29737&x=32&y=32&mimeFallback=true&a=0&c=661127fa2c983

davidfrickert commented 1 month ago

Same bug here. Any ideas? Edit: well okay i tried another folder and now it works for both folders.. wtf?