Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Notifications app on ownCloud is not compatible with Sciencemesh app #319

Open
MahdiBaghbani opened this issue May 22, 2023 · 9 comments · May be fixed by #350
Open

Notifications app on ownCloud is not compatible with Sciencemesh app #319

MahdiBaghbani opened this issue May 22, 2023 · 9 comments · May be fixed by #350
Assignees

Comments

@MahdiBaghbani
Copy link
Member

Debugging with @Thirsa, we found ot that the notifications app is not compatible with Sciencemesh app and leads to the receiver not seeing the incoming share accept dialog.

1[Mon May 22 16:20:07.768699 2023] [php7:error] [pid 20787] [client 10.234.0.3:40282] PHP Fatal error:  Declaration of OCA\\ScienceMesh\\Notifier\\ScienceMeshNotifier::prepare(OCP\\Notification\\INotification $notification, string $languageCode): OCP\\Notification\\INotification must be compatible with OCP\\Notification\\INotifier::prepare(OCP\\Notification\\INotification $notification, $languageCode) in /var/www/owncloud/apps/sciencemesh/lib/Notifier/ScienceMeshNotifier.php on line 72

public function prepare(INotification $notification, string $languageCode): INotification {

@MahdiBaghbani
Copy link
Member Author

after disabling notifications, the dialog shows up, but we are stuck with an endless loop of accept share pop ups.

@parhamin2010
Copy link

I tried to reproduced the fatal error. It's not showing up.
Some possible reason for this case:
1- upgrade the app
2- recent commits

The issue still presists. checking the files to find out where INotification instance is calling to find the root cause.

@parhamin2010
Copy link

parhamin2010 commented May 31, 2023

Finally, I reproduced the error which is irrelavant to add share federated event:

1- The error is related to notification that sciencemesh tries to send via email
[Wed May 31 22:15:49.838361 2023] [php7:notice] [pid 257] [client 172.18.0.8:49384] PHP Fatal error: Declaration of OCA\\ScienceMesh\\Notifier\\ScienceMeshNotifier::prepare(OCP\\Notification\\INotification $notification, string $languageCode): OCP\\Notification\\INotification must be compatible with OCP\\Notification\\INotifier::prepare(OCP\\Notification\\INotification $notification, $languageCode) in /var/www/html/apps/sciencemesh/lib/Notifier/ScienceMeshNotifier.php on line 72
image

step to reproduce it:
1- share a file from oc1/nc1 to oc2
2- add new row in oc_notification table with this query
image

Fix this first here and here.

Also there's still conflict between file federated app with notificaion app. Still checking to find the root cause.
Here's report for now:
in this section, it's using different structure to call the file accept popup. In notification app, I couldn't find anything like this. However, in this section it seems the notification fetched but it's always empty. I'm trying to find out where this object filled.

@parhamin2010
Copy link

Find this
The notification app prevent to show the modal and notification app will add new row in the ring bell section on the header.
Checking why it's not add the row.

@parhamin2010 parhamin2010 linked a pull request Jun 2, 2023 that will close this issue
@parhamin2010
Copy link

parhamin2010 commented Jun 5, 2023

The notification appears on the topbar in notifcation app.
image
There's point that still has conflict

  • It seems two times the accept/decline button called while in db the structure of the row has single value
    image

  • Storage Controller + methods to handlePost and handleDelete
    *** Sciencemesh share provider has complex instruction for delete/unshare a file. (working on this)

@parhamin2010
Copy link

Methods are implemeneted to the StorageController
The links for accept/decline is not still working
find this as accept and this as decline. Still working on it.

@parhamin2010
Copy link

I tried to send a post request based on this Accept a Pending Federated Cloud Share and Decline a Pending Federated Cloud Share documents it will return null.
The root cause of this is related to headers that send by the curl request.
Needs another way for accept/decline pending federated share in StorageController
@michielbdejong do you have any advice on this?

@parhamin2010
Copy link

As I checked with MohamadReza and Mahdi, It seems the header of curl request is similar to the request that normally we send through app without notification app.

@parhamin2010
Copy link

The funny thing is that when we send a curl request to HTTP_ORIGIN as POST it doesn't read the params from Header Request and it reads from Query params!
Also, externalShares endpoint always return 200 if we decline/accept without any information.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants