nextcloud / integration_google

🇬 Google integration into Nextcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notification failed to send: Error: ValueError: The arguments array must contain 2 items, 1 given at <<closure>>

shalak opened this issue · comments

commented

It appears that there is an issue with now the integration uses Nextcloud's notification API.

[cron] Error: ValueError: The arguments array must contain 2 items, 1 given at <<closure>>

 0. /var/www/html/lib/private/L10N/L10NString.php line 88
    vsprintf("%s file was imp ... .", [41])
 1. /var/www/html/lib/private/L10N/L10N.php line 127
    OC\L10N\L10NString->__toString()
 2. /var/www/html/lib/private/L10N/LazyL10N.php line 56
    OC\L10N\L10N->n("%s file was imported from Google Drive.", "%s files were i ... .", 41, [41])
 3. /var/www/html/custom_apps/integration_google/lib/Notification/Notifier.php line 103
    OC\L10N\LazyL10N->n("%s file was imported from Google Drive.", "%s files were i ... .", 41, [41])
 4. /var/www/html/lib/private/Notification/Manager.php line 368
    OCA\Google\Notification\Notifier->prepare(OC\Notification\Notification {}, "en_GB")
 5. /var/www/html/apps/notifications/lib/Push.php line 263
    OC\Notification\Manager->prepare(OC\Notification\Notification {}, "en_GB")
 6. /var/www/html/apps/notifications/lib/App.php line 57
    OCA\Notifications\Push->pushToDevice(17, OC\Notification\Notification {})
 7. /var/www/html/lib/private/Notification/Manager.php line 329
    OCA\Notifications\App->notify(OC\Notification\Notification {})
 8. /var/www/html/custom_apps/integration_google/lib/Service/GoogleAPIService.php line 97
    OC\Notification\Manager->notify(OC\Notification\Notification {})
 9. /var/www/html/custom_apps/integration_google/lib/Service/GoogleDriveAPIService.php line 212
    OCA\Google\Service\GoogleAPIService->sendNCNotification("USERNAME", "import_drive_finished", [41,"/Google Drive"])
10. /var/www/html/custom_apps/integration_google/lib/BackgroundJob/ImportDriveJob.php line 38
    OCA\Google\Service\GoogleDriveAPIService->importDriveJob("USERNAME")
11. /var/www/html/lib/public/BackgroundJob/Job.php line 78
    OCA\Google\BackgroundJob\ImportDriveJob->run(["USERNAME"])
12. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 58
    OCP\BackgroundJob\Job->start(OC\BackgroundJob\JobList {})
13. /var/www/html/lib/public/BackgroundJob/QueuedJob.php line 48
    OCP\BackgroundJob\QueuedJob->start(OC\BackgroundJob\JobList {})
14. /var/www/html/cron.php line 152
    OCP\BackgroundJob\QueuedJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

by USERNAME at 2023-02-12T11:27:56+00:00
commented

Similar error to he above is also showing up:

[no app in context] Error: Exception: The arguments array must contain 2 items, 1 given in file '/var/www/html/lib/private/L10N/L10NString.php' line 88 at <<closure>>

0. /var/www/html/lib/private/AppFramework/App.php line 172
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notification ... {}, "listNotifications")
1. /var/www/html/lib/private/Route/Router.php line 298
   OC\AppFramework\App::main("OCA\\Notificati ... r", "listNotifications", OC\AppFramework\ ... {}, ["v2","ocs.notif ... "])
2. /var/www/html/ocs/v1.php line 63
   OC\Route\Router->match("/ocsapp/apps/no ... s")
3. /var/www/html/ocs/v2.php line 23
   require_once("/var/www/html/ocs/v1.php")

Caused by ValueError: The arguments array must contain 2 items, 1 given
    /var/www/html/lib/private/L10N/L10NString.php - line 88:
    vsprintf("%s photo wa ... .", [ 3092])
    /var/www/html/lib/private/L10N/L10N.php - line 127:
    OC\L10N\L10NString->__toString()
    /var/www/html/lib/private/L10N/LazyL10N.php - line 56:
    OC\L10N\L10N->n("%s photo wa ... .", "%s photos w ... .", 3092, [ 3092])
    /var/www/html/custom_apps/integration_google/lib/Notification/Notifier.php - line 92:
    OC\L10N\LazyL10N->n("%s photo wa ... .", "%s photos w ... .", 3092, [ 3092])
    /var/www/html/lib/private/Notification/Manager.php - line 368:
    OCA\Google\Notification\Notifier->prepare(OC\Notification\Notification {}, "en_GB")
    /var/www/html/apps/notifications/lib/Controller/EndpointController.php - line 111:
    OC\Notification\Manager->prepare(OC\Notification\Notification {}, "en_GB")
    /var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 225:
    OCA\Notifications\Controller\EndpointController->listNotifications("v2")
    /var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 133:
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Notifica ... {}, "listNotifications")
    /var/www/html/lib/private/AppFramework/App.php - line 172:
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Notifica ... {}, "listNotifications")
    /var/www/html/lib/private/Route/Router.php - line 298:
    OC\AppFramework\App::main("OCA\\Notifi ... r", "listNotifications", OC\AppFramew ... {}, [ "v2","ocs. ... "])
    /var/www/html/ocs/v1.php - line 63:
    OC\Route\Router->match("/ocsapp/app ... s")
    /var/www/html/ocs/v2.php - line 23:
    require_once("/var/www/html/ocs/v1.php")

I faced the same issue. The bug is that the application cannot send a notification about the completion of downloading data from a Google account. Moreover, the problem appears only when the user has an interface language other than English. A temporary solution is to change the user interface language to English.

commented

when the user has an interface language other than English. A temporary solution is to change the user interface language to English.

I'm still facing this issue with the have following settings on user that imports data:
image
And here is admin's account:
image

Are you sure it's the language, not the locale? Also - at what moment the check for this setting is being done? When the notification is sent, or when the download is triggered? Or even during the nextcloud startup?

I checked your case with interface language English (British English). With these settings, the error appears. Therefore, to clarify, a temporary solution is to change the user interface language to English (US).

I can confirm switching the Nextcloud Language (not Locale) to English (US) works, immediately as the page reloaded with hte new language I got the notification from last import.

Out of curiosity what really is the difference between English (GB) and English (US), is it just the little stuff like color/colour, armor/armour, lift/elevator, aluminum/aluminium etc? Would this affect for example spell checking in Collabora?

Should be fixed with v2.x release.