getsentry / sentry-laravel

The official Laravel SDK for Sentry (sentry.io)
https://sentry.io
MIT License
1.26k stars 188 forks source link

Unable to send events after update libcurl to v8.1.0 #712

Closed defser closed 1 year ago

defser commented 1 year ago

Environment

What version are you running? Production

Steps to Reproduce

After updating libcurl to 8.1.0 the Laravel SDK is not able to send events to Sentry, it fails with the following error:

/var/www/html $ php artisan sentry:test
DSN discovered from Laravel config or `.env` file!
Sending test event...
There was an error sending the event.
SDK: Failed to send the event to Sentry. Reason: "HTTP/2 stream 1 was reset for "https://o468856.ingest.sentry.io/api/5848562/envelope/".".
Please check the error message from the SDK above for further hints about what went wrong.

[sentry-laravel] error: Failed to send the event to Sentry. Reason: "HTTP/2 stream 1 was reset for "https://o468856.ingest.sentry.io/api/5848562/envelope/".". | {"exception":{},"event":{}}

"sentry/sentry-laravel": "^3.2.0" (3.4.1)

Looks like same issue as: https://github.com/getsentry/sentry-php/issues/1537

Working environment:

/var/www/html $ php -v
PHP 8.1.17 (cli) (built: Mar 28 2023 00:05:31) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.17, Copyright (c), by Zend Technologies
/var/www/html $ cat /etc/os-release 
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.16.4
PRETTY_NAME="Alpine Linux v3.16"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Not working environment:

/var/www/html $ php -v
PHP 8.1.17 (cli) (built: Mar 29 2023 23:10:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.17, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.17, Copyright (c), by Zend Technologies
/var/www/html $ cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.3
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
cleptric commented 1 year ago

You can run composer update -W sentry/sentry-laravel which will update the underlying PHP SDK that contains a bug fix for this issue. Working on a new Laravel release that will bump the SDK by default as well.

defser commented 1 year ago

@cleptric I'm sorry, you are right! I did not update other dependencies. Please close this issue.

Thanks for the quick reply!

divineslight commented 1 year ago

Why a simple install as documented in official guide was breaking for me? sorry not that experienced in PHP ecosystem

cleptric commented 1 year ago

This depended on when you installed the SDK. We do not always bump the underlying PHP SDK on every release of the Laravel SDK and, instead, only do so if the PHP SDK contains essential updates or bug fixes. In the case of the cURL issue, we missed the mark and enforced the update in the Laravel SDK too late.