laravel-notification-channels / pushover

šŸ“± Pushover notifications channel for Laravel
http://laravel-notification-channels.com
MIT License
55 stars 31 forks source link

How to debug Pushover? #15

Closed ARBURIUS closed 7 years ago

ARBURIUS commented 8 years ago

Hi, I'm deploying my project from homestead on Ubuntu 16.04, ngnix, php7. Everything is working correct, but pushover doesn't send notifications. On local homestead server everything works. Please help me to solve this problem.

This is my Route:

Route::get('n', function () {
    $user = App\User::first();
    $bid = App\Bid::first();
    $user->notify(new NewBid($bid));
});

This is my Push:

namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use NotificationChannels\Pushover\PushoverChannel;
use NotificationChannels\Pushover\PushoverMessage;
class NewBid extends Notification implements ShouldQueue
{
    use Queueable;

    protected $bid;

    public function __construct($bid)
    {
         $this->bid = $bid;
    }
    public function via($notifiable)
    {
        return [PushoverChannel::class];
    }
    public function toPushover($notifiable)
    {
        return PushoverMessage::create($this->bid->name .' ā„– ' .$this->bid->phone)
            ->title('example.com')
            ->sound('incoming')
            ->normalPriority()
            ->url('http://example.com/invoices', 'Go to Link');
    }
}

This is from my config/services.php:

    'pushover' => [
        'token' => 'Here I'm using my token for application',
    ],

Please help!

ARBURIUS commented 8 years ago

After update laravel-notification-channels/pushover to version 1.0.1 this happens. Then I rolled back to version 1.0.0 everything working on my production project and homestead project too. There is no time to make a debug of all changes of a new version, and there is no any changelogs about it. Maybe somebody knows want needs to be corrected in new version. Thanks.

RamonSmit commented 7 years ago

Same here, just can't get this package to work properly.

casperboone commented 7 years ago

Totally missed this issue, sorry guys. Changelog can be found here: https://github.com/laravel-notification-channels/pushover/releases, forgot to update CHANGELOG.md.

Note that, as to the official standards, instead of raising exceptions the package fires Illuminate\Notifications\Events\NotificationFailed events for most of the cases where it failed. So make sure to have a listener for that event.

I don't think there are any major changes in 1.0.1 that can cause problems, but will look into it.

casperboone commented 7 years ago

@RamonSmit Can you provide some more details about what is not working as expected?

casperboone commented 7 years ago

I have (re-)reviewed the changes of version 1.0.1, and haven't spotted any potential issues because of this new version. Please let me know if you're still experiencing issues @ARBURIUS.

I have created a gist that shows a very basic (but complete) example, may it helps you @RamonSmit, https://gist.github.com/casperboone/23d4919d0086d115137364489b533114.

RamonSmit commented 7 years ago

Going to play with it! šŸ‘