owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.4k stars 663 forks source link

[oCIS] Cannot dismiss the notification in the server activity tab #11974

Open saw-jan opened 2 weeks ago

saw-jan commented 2 weeks ago

Pre-submission Checks

Describe the bug

Nothing happens when clicking the notification dismiss button.

The request to delete the notification is wrong for ocis:

Incorrect Request:x:

DELETE https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958

Correct request :heavy_check_mark:

DELETE https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications
body: {"ids":["c92bb8b1-7759-48f5-ad30-7a8450c75958"]}

Expected behavior

Notification gets dismissed/removed

Steps to reproduce the issue

  1. Add admin user to the desktop-client
  2. as demo user, share a file to admin from the oCIS server
  3. as admin user, try to dismiss the notification from the Server Activity tab

Screenshots

Screenshot from 2024-11-08 14-14-10

Logs

24-11-08 14:22:24:447 [ info gui.notifications ]:   Notification Link:  "DELETE" "https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958"
24-11-08 14:22:24:447 [ info gui.activity ]:    Server Notification Request  "DELETE" "https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958" on account "Admin@192.168.56.1:9200"
24-11-08 14:22:24:448 [ info sync.networkjob ]: Created OCC::NotificationConfirmJob(OCC::Account("Admin@192.168.56.1:9200"), "https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958", "DELETE", Original-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222", X-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222") for OCC::ActivityWidget(0x161b620, name = "OCC__ActivityWidget")
24-11-08 14:22:24:448 [ info sync.httplogger ]: REQUEST 31f6a5a7-f143-4572-933f-15d605ac7222 {"request":{"body":{"length":0},"header":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jAEITJYj3EhYOVOFKSnVd7V0SbLKS_1Hyg_5sOC8zeImeDK2OSufMFCs4kw8uQKzh8gvyn31HNkvX8FdmhdWyYO2JNA2vuXulYKtrWipQ8H47nV3nUwVTkvc7RJUyTsIy_imbqk94LdP1ZBYSeHAYAPx5Lm8GQQimDi8hx6dHJ2q3-_uD6NJG-zHmPhyPxCJpmkT-qnppTl909QK7HK92n_RqYEZ1hKhPBQKFovbwD0du6Sgb_Te3Io1wzvZ_t1BZEzwma-rY5kN7GrUaM-EU4jKp-VCUm8D2X7-KNclFHID0","original-request-id":"31f6a5a7-f143-4572-933f-15d605ac7222","user-agent":"Mozilla/5.0 (Linux) mirall/6.0.0.14906-daily20241029 (ownCloud, ubuntu-6.2.0-39-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","x-request-id":"31f6a5a7-f143-4572-933f-15d605ac7222"},"info":{"cached":false,"id":"31f6a5a7-f143-4572-933f-15d605ac7222","method":"DELETE","url":"https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958"}}}
24-11-08 14:22:24:451 [ info sync.httplogger ]: RESPONSE 31f6a5a7-f143-4572-933f-15d605ac7222 {"response":{"body":{"data":"19 bytes of  data","length":19},"header":{"content-length":"19","content-security-policy":"child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/owncloud/awesome-ocis/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'","content-type":"text/plain; charset=utf-8","date":"Fri, 08 Nov 2024 08:37:24 GMT","referrer-policy":"strict-origin-when-cross-origin","strict-transport-security":"max-age=315360000; preload","vary":"Origin","x-content-type-options":"nosniff, nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-request-id":"31f6a5a7-f143-4572-933f-15d605ac7222","x-robots-tag":"none","x-userlog-version":"6.6.1","x-xss-protection":"1; mode=block"},"info":{"id":"31f6a5a7-f143-4572-933f-15d605ac7222","method":"DELETE","reply":{"cached":false,"duration":2,"durationString":"duration(0h, 0min, 0s, 2ms)","error":"Error transferring https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958 - server replied: Not Found","status":404,"version":"HTTP 2"},"url":"https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958"}}}
24-11-08 14:22:24:451 [ warning sync.networkjob.jsonapi ]:  Network error:  OCC::NotificationConfirmJob(OCC::Account("Admin@192.168.56.1:9200"), "https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958", "DELETE", Original-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222", X-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222", NetworkError: "Error transferring https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958 - server replied: Not Found") "Server replied \"404 Not Found\" to \"DELETE https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958\""
24-11-08 14:22:24:451 [ warning gui.notifications ]:    Notification Request to Server failed, leave button visible.
24-11-08 14:22:24:451 [ warning gui.activity ]: Server notify job failed with code  0
24-11-08 14:22:24:451 [ debug sync.networkjob ] [ OCC::AbstractNetworkJob::slotFinished ]:  Network job finished OCC::NotificationConfirmJob(OCC::Account("Admin@192.168.56.1:9200"), "https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958", "DELETE", Original-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222", X-Request-ID: "31f6a5a7-f143-4572-933f-15d605ac7222", NetworkError: "Error transferring https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958 - server replied: Not Found")
DELETE https://192.168.56.1:9200/ocs/v2.php/apps/notifications/api/v1/notifications/c92bb8b1-7759-48f5-ad30-7a8450c75958

> 404 Not Found

Client version number

Tested on client 6.0.0 and 5.3.1

Server information

Tested on: Infinite Scale 4.0.7 Community Infinite Scale 5.0.7 Community Infinite Scale 7.0.0-rc.1 Community

DeepDiver1975 commented 2 weeks ago

So ocis and oc10 Apis are not compatible? Or am I missing anything

@kobergj

saw-jan commented 2 weeks ago

In this case, yes!

kobergj commented 2 weeks ago

No. They are not compatible. This issue is know since long: https://github.com/owncloud/enterprise/issues/6307 https://github.com/owncloud/ocis/issues/5675#issuecomment-1878845801

saw-jan commented 2 weeks ago

In this case, yes!

I meant, the way notification is deleted is different in ocis and oc10. In oC10, notification id is used in the url path not in the body like ocis

DELETE http://localhost:8080/ocs/v2.php/apps/notifications/api/v1/notifications/1