UnifiedPush provider for Nextcloud - server application

Related tags

Laravel server-app
Overview

NextPush - Server App

UnifiedPush provider for Nextcloud - server application

This is still a WIP version

Requirement

It require the nextcloud server to be installed with Redis.

Installation

  1. The app had to be installed to nextcloud/apps/uppush :
git clone https://github.com/UP-NextPush/server-app/ nextcloud/apps/uppush
  1. The reverse-proxy need to be configured for long timeout :

Nginx:

    proxy_connect_timeout   10m;
    proxy_send_timeout      10m;
    proxy_read_timeout      10m;

Apache:

    ProxyTimeout 600
  1. The reverse-proxy need to be configured without buffering : Nginx:
    proxy_buffering off;

Apache (php configuration):

    <Proxy "fcgi://localhost/" disablereuse=on flushpackets=on max=10>
    </Proxy>

Credit

This application has been inspired by Nextcloud Push Notifier

Comments
  • array_key_exists

    array_key_exists

    Hello

    I see several times in my log the following error message:

    {"reqId":"GVAqi9xoqVDhdl1bU8nM","level":3,"time":"01.03.2022 14:04:20","remoteAddr":"93.212.25.232","user":"--","app":"index","method":"GET","url":"/index.php/apps/uppush/device/1d6cf04d-4ae8-492f-a892-50f133b8e1e5","message":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file 'WEBPATH/lib/public/AppFramework/Controller.php' line 121","userAgent":"okhttp/4.9.3","version":"23.0.2.1","exception":{"Exception":"Exception","Message":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file 'WEBPATH/lib/public/AppFramework/Controller.php' line 121","Code":0,"Trace":[{"file":"WEBPATH/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"WEBPATH/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"WEBPATH/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"WEBPATH/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"WEBPATH/lib/private/AppFramework/Http/Dispatcher.php","Line":158,"Previous":{"Exception":"TypeError","Message":"array_key_exists(): Argument #2 ($array) must be of type array, null given","Code":0,"Trace":[{"file":"WEBPATH/lib/public/AppFramework/Controller.php","line":121,"function":"array_key_exists"},{"file":"WEBPATH/lib/private/AppFramework/Http/Dispatcher.php","line":228,"function":"getResponderByHTTPHeader","class":"OCP\\AppFramework\\Controller","type":"->"},{"file":"WEBPATH/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"WEBPATH/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"WEBPATH/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"WEBPATH/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"WEBPATH/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"WEBPATH/lib/public/AppFramework/Controller.php","Line":121},"CustomMessage":"--"}}
    

    [Nextcloud Hub II] 23.0.2 Unified Push Provider 0.2.1

    opened by Tealk 29
  • RedisException: read error on connection to 127.0.0.1:6379

    RedisException: read error on connection to 127.0.0.1:6379

    Hey, thanks for your amazing app. I quite regularly get this error in my log. Do you have any idea if it can be fixed, or why my be the issue?

    RedisException: read error on connection to 127.0.0.1:6379
        /srv/www/nextcloud/apps/uppush/lib/Controller/UnifiedPushProviderController.php - line 221:
        Redis->brPop("ba493811-d6 ... c", 600)
        /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 217:
        OCA\UnifiedPushProvider\Controller\UnifiedPushProviderController->syncDevice("ba493811-d6 ... c")
        /srv/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 126:
        OC\AppFramework\Http\Dispatcher->executeController(OCA\UnifiedP ... {}, "syncDevice")
        /srv/www/nextcloud/lib/private/AppFramework/App.php - line 157:
        OC\AppFramework\Http\Dispatcher->dispatch(OCA\UnifiedP ... {}, "syncDevice")
        /srv/www/nextcloud/lib/private/Route/Router.php - line 302:
        OC\AppFramework\App::main("OCA\\Unifie ... r", "syncDevice", OC\AppFramew ... {}, { deviceId: ... "})
        /srv/www/nextcloud/lib/base.php - line 1006:
        OC\Route\Router->match("/apps/uppus ... c")
        /srv/www/nextcloud/index.php - line 36:
        OC::handleRequest()
    
    opened by tacruc 15
  • Can't remove Devices/Apps

    Can't remove Devices/Apps

    When I click on delete button for any device or app in the settings and confirm it, nothing happens with no logs.

    • Nextcloud 24.0.2
    • UnifiedPush 1.0.5
    opened by danialbehzadi 10
  • Matrix push not working (nextcloud 25, php-fpm8.1, nginx)

    Matrix push not working (nextcloud 25, php-fpm8.1, nginx)

    Hi,

    I installed unified push provider 1.1.2 on the configuration mentioned in the title configured according to the instructions in this repo. Tests with up-example work fine hence I believe the whole constellation of services is working correctly, nextcloud log show no errors.

    Yet I receive no notification for matrix messages on my phone. Element is configured for using unified push and it shows no error (even its test notification works when setting it up).

    I disabled battery optimization for both element and the unified push app.

    Can someone please give me instructions for testing what the culprit might be? Thanks!

    opened by danielegobbetti 5
  • I can't register my phone

    I can't register my phone

    When I try to login using the account from Nextcloud app, UP-NextPush/android crashes and nginx log shows this:

    "PUT /index.php/apps/uppush/device? HTTP/1.1" 200 66 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.19.1"
    "GET /index.php/apps/uppush/device/{{ALWAYS_THE_SAME_UUID_HERE}} HTTP/2.0" 200 98 "-" "okhttp/4.9.3"
    

    But nothing else happens: No registered devices server side, no applications on the android side and not notifications.

    I switched to https://gitlab.com/Nextcloud-Push and it works perfectly: connection succeeds immediately notifications arrive instantly and are even queued if I disconnect my phone and are delivered as soon as it comes back. So I'd say php/nginx configuration is ok.

    opened by kakuy 5
  • Notification debugging problem

    Notification debugging problem

    Hi, I´ve set up next push with my nextcloud instance as by README.

    1. Server side I´ve installed the current version from nextcloud apps (not from github directly)
    2. Server is using apache and redis (debian 11 system)
    3. Client side I´ve installed from F-Droid
    4. Applications register (fluffy chat, fedilab and UP-Example)
    5. If I try UP-Example I never receive a notification though...

    Sorry, could not find a good FAQ of what else to check, so asking here. any help appreciated :)

    opened by akallabeth 4
  • Question regarding paths in reverse proxy and Nextcloud server

    Question regarding paths in reverse proxy and Nextcloud server

    Hi

    I wonder how I should/can secure the paths used for NextPush.

    For my Matrix Synapse server I have two locations defined in the reverse proxy: /_matrix allowed for all /_matrix/client only allowed from within my network.

    I can do this as all my Element clients are inside my network. The /_matrix/client path does not need to be accessible from outside.

    For NextPush I wonder if I can do similar.

    For Matrix the path /_matrix/push/v1/notify, is this needed from outside? Who is using this endpoint? The clients? Other matrix server?

    Also, for Nextpush: /index.php/apps/uppush

    I assume this is only used by the clients and also called from e.g. the Matrix server as forwarded in the reverse proxy. So it does not need to be accessible fromoutside if all my clients are inside my network?

    opened by ne20002 3
  • Change to Server Sent Events (SSE)

    Change to Server Sent Events (SSE)

    Tutanota explained, how they did notification to replace GCM/FCM with an old protocol SSE (Server Sent Events) in this german article.

    https://f-droid.org/de/2018/09/03/replacing-gcm-in-tutanota.html

    Do you think, it could be implemented

    opened by xundeenergie 3
  • "Connecting to redis without password" while reading response header from upstream

    I get a number of log lines in nginx error log

    2022/07/02` 09:03:06 [error] 82#82: *362 FastCGI sent in stderr: "PHP message: Nextcloud/UnifiedPushProvider: Connecting to redis without password" while reading response header from upstream, client: 192.168.xxx.xxx, server: , request: "GET /index.php/apps/uppush/device/xxxxxxxxxxxx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.xxxx.xx"

    but it seems as if the android app is connected.

    How to get rid of this error?

    opened by ne20002 2
  • Made installation directions a bit clearer

    Made installation directions a bit clearer

    I did some testing with NGINX with having the proxy options:

    • nested inside the location /_matrix/push/v1/notify { block, or
    • inside the server block

    Having the proxy options nested inside the location block showed much better results with my phone actually receiving the push notifications when idle.

    I've done no testing with apache, so I do not know if my changes work, though nothing was really changed.

    opened by th0mcat 2
  • HTTP PUT is supposed to be idempotent

    HTTP PUT is supposed to be idempotent

    Consider changing this to a POST? https://github.com/UP-NextPush/server-app/blob/73efb123232c4f82f2405a779dc5ed2504fce150/appinfo/routes.php#L10-L13

    According to MDN:

    The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.

    Here, when calling PUT /device/ several times with the same deviceName, it creates a new device each time, which is more suitable for POST than PUT.

    Edit: the same would probably apply to createApp

    opened by karmanyaahm 2
  • Support localization

    Support localization

    Hello, Would it be possible to follow instructions on: https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/l10n.html ...and make your app more accessible for non-English speakers please?

    Thanks :-)

    opened by p-bo 2
  • [Feature request] Send push notification through HTTP

    [Feature request] Send push notification through HTTP

    Hello,

    This is not a bug. I want to replace a Gotify server with a NextPush one but I can't find any information on how to send notification through a simple HTTP request (curl or httpie)

    I didn't find a better canal for asking you this :-/

    Damien

    opened by koug44 4
  • 500 Internal Server Error when no auth

    500 Internal Server Error when no auth

    When using createdevice and createapp, when there's no authentication (I'm using http basic auth) specified, it throws a 500 instead of a 40x. I don't know if this is an issue in this server-app or in nextcloud itself, so I'll put it here for now.

    opened by karmanyaahm 2
Releases(1.1.3)
Owner
NextPush
NextPush
Driver for managing cash payments in the Cashier Provider ecosystem

Cash Driver Provider Installation To get the latest version of Cash Driver Provider, simply require the project using Composer: $ composer require cas

Cashier Provider 4 Aug 30, 2022
Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite

Mollie for Laravel Laravel-Mollie incorporates the Mollie API and Mollie Connect into your Laravel or Lumen project. Accepting iDEAL, Apple Pay, Banco

Mollie 289 Nov 24, 2022
Laravel Lumen service provider for Understand.io

The service provider is deprecated - it does not support error grouping. Laravel Lumen service provider for Understand.io You may also be interested i

null 6 May 30, 2019
A simple Laravel service provider for easily using HTMLPurifier inside Laravel

HTMLPurifier for Laravel 5/6/7/8 A simple Laravel service provider for easily using HTMLPurifier inside Laravel. From their website: HTML Purifier is

MeWebStudio - Muharrem ERİN 1.7k Jan 6, 2023
Laravel package to periodically monitor the health of your server and application.

Laravel package to periodically monitor the health of your server and application. It ships with common checks out of the box and allows you to add your own custom checks too. The packages comes with both console and web interfaces.

Sarfraz Ahmed 170 Dec 13, 2022
Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Jameson Lopp 28 Dec 19, 2022
Laravel API wrapper to interact fluently with your Janus Media Server

Laravel API wrapper to interact fluently with your Janus Media Server. Core server interactions, as well as the video room plugin included.

Richard  Tippin 11 Aug 21, 2022
Learning Websocket by creating Custom Websocket-server package provided by Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling.

Chisty Md.Muzammel Hossain 3 Oct 25, 2022
JSON-RPC 2.0 API server for @Laravel framework

Sajya is an open-source project aiming to implement the JSON-RPC 2.0 server specification for the Laravel quickly.

Sajya 179 Dec 29, 2022
Add Server-Timing header information from within your Laravel apps.

Laravel Server Timings Add Server-Timing header information from within your Laravel apps. Installation You can install the package via composer: comp

Beyond Code 498 Dec 15, 2022
BigBlueButton Server API Library for Laravel

BigBlueButton Server API Library for Laravel Package that provides easily communicate between BigBlueButton server and laravel framework Requirements

Jignesh 124 Jan 6, 2023
This is a plugin written in the PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform. It helps to liven up your server with Tags!

General This is a plugin written in the PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform.

Thành Nhân 4 Oct 21, 2021
This package enables you to create and run a fully functioning WebSocket server in your Laravel app.

This package enables you to create and run a fully functioning WebSocket server in your Laravel app. It can optionally receive messages broadcast over ZeroMQ.

Asked.io 181 Oct 6, 2022
Server-side handler of DataTables Jquery Plugin for Laravel 4

Project is not being maintained actively. You will most likely find a better more actively maintained fork here https://github.com/yajra/laravel-datat

Bilal Gultekin 264 Jul 2, 2022
This is a laravel 4 package for the server and client side of datatables at http://datatables.net/

Datatable Important This package will not receive any new updates! You can still use this package, but be preparared that there is no active developme

Nils Plaschke 388 Dec 30, 2022
Easy Laravel Server-Side implementation of PrimeVue Datatables

Laravel + PrimeVue Datatables This is a simple, clean and fluent serve-side implementation of PrimeVue Datatables in Laravel. Features Global Search i

Savannabits 11 Dec 29, 2022
🐦 A personal music streaming server that works.

koel Intro Koel (also stylized as koel, with a lowercase k) is a simple web-based personal audio streaming service written in Vue on the client side a

Koel 14.3k Dec 29, 2022
Asynchronous WebSocket server

Ratchet A PHP library for asynchronously serving WebSockets. Build up your application through simple interfaces and re-use your application without c

Ratchet 5.9k Jan 5, 2023
A plugin for Blessing Skin Server that can let you display Google Ads with Google AdSense in the website.

A plugin for Blessing Skin Server that can let you display Google Ads with Google AdSense in the website.

Big_Cake 2 Jan 25, 2022