Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error in logs when sending push messages #193

Open
tabuna opened this issue Sep 19, 2023 · 0 comments
Open

Error in logs when sending push messages #193

tabuna opened this issue Sep 19, 2023 · 0 comments

Comments

@tabuna
Copy link

tabuna commented Sep 19, 2023

Problem description:

Whenever I send push messages, I encounter an error in the logs. The error message in the logs is as follows:

Unable to read stream contents: stream_get_contents(): Argument #1 ($stream) must be of type resource, int given

The error occurs in Guzzle, specifically in the file /guzzlehttp/psr7/src/Utils.php:424. The exception is thrown by the object initialized in minishlink/web-push/src/MessageSentReport.php:127.

While this error doesn't affect the functionality and the push messages are successfully delivered, it clutters the logs and makes them difficult to read.

Steps to reproduce:

Create a new push message using the provided code example:

public function toWebPush()
{
    return (new WebPushMessage)
        ->title(__('common.reminder.push.title'))
        ->icon('/pwa/icons/manifest-icon-512.png')
        ->body(__('common.reminder.push.description'));
}

Environment:

  • PHP version 8.2.10
  • Laravel v10.23.1
  • Package version 7.1.0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant