Problem/Motivation

Can't make Sentry work with Raven module after upgrade to PHP 7.4 from PHP 7.0.

Steps to reproduce

PHP 7.2 or PHP 7.4

Raven 7.x-4.2

composer require sentry/sentry
Ok, Sentry 3 is installed via composer. composer_autoloader module is enabled.
/admin/reports/status says that Sentry PHP SDK is loaded. But drush raven-capture-message 'test' says `Raven client not available.`. Trying to call not existing function is not getting captured by Sentry neither.

Sentry PHP handler is enabled, Sentry DSN is set. What am I missing?

Raven 7.x-3.9

ls sites/all/libraries/sentry-php/lib/Raven/Client.php
sites/all/libraries/sentry-php/lib/Raven/Client.php
I have Libraries API 2, XAutoload and Sentry PHP library installed as described in README, but /admin/reports/status says "The Sentry PHP library could not be loaded".

composer require sentry/sentry ^1.11.0
Sentry 3.1 gets installed. It is not supported by Raven 7.x-3.9.

composer require sentry/sentry 1.11.0
1.x version can't be installed via composer:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - sentry/sdk 3.1.0 requires sentry/sentry ^3.1 -> satisfiable by sentry/sentry[3.1.0, 3.1.1, 3.1.x-dev] but these conflict with your requirements or minimum-stability.
    - sentry/sdk 3.1.0 requires sentry/sentry ^3.1 -> satisfiable by sentry/sentry[3.1.0, 3.1.1, 3.1.x-dev] but these conflict with your requirements or minimum-stability.
    - sentry/sdk 3.1.0 requires sentry/sentry ^3.1 -> satisfiable by sentry/sentry[3.1.0, 3.1.1, 3.1.x-dev] but these conflict with your requirements or minimum-stability.
    - Installation request for sentry/sdk (locked at 3.1.0) -> satisfiable by sentry/sdk[3.1.0].

Comments

quotesBro created an issue. See original summary.

quotesbro’s picture

Issue summary: View changes

  • mfb committed f71f1f6 on 7.x-4.x
    Issue #3189511 by quotesBro, mfb: Raven client not available
    
mfb’s picture

Component: Code » Documentation
Category: Support request » Bug report
Status: Active » Fixed

Thank you for the report, there was a typo in the README! For 7.x-4.x you should use composer require sentry/sdk:^3

quotesbro’s picture

Status: Fixed » Active

I tried sentry/sdk:^3. It is listed on Status report page: Sentry PHP SDK 3.1.1

drush raven-capture-message 'test' says `Raven client not available.`. Trying to call not existing function is not getting captured by Sentry neither.

quotesbro’s picture

Component: Documentation » Code
mfb’s picture

What does drush status-report | grep Sentry say?

mfb’s picture

There are only two cases that I know of where you could see "Raven client not available": 1) Sentry SDK is not installed and autoloaded - but it sounds like it is if the status report is showing "Sentry PHP SDK 3.1.1" or 2) Sentry DSN has invalid configuration, for example has a space at the start. Can you double check that the PHP Sentry DSN is configured correctly?

quotesbro’s picture

Component: Code » Documentation
Status: Active » Fixed

Oops, I double-checked and found out that my quota is depleted.
Thank you for your time!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.