kreait / firebase-php

Unofficial Firebase Admin SDK for PHP
https://firebase-php.readthedocs.io/
MIT License
2.28k stars 433 forks source link

sendMulticast in v5.26.5 #933

Closed WilliamGeorge1997 closed 2 months ago

WilliamGeorge1997 commented 2 months ago

Describe the bug

Good evening using the Admin SDK the problem rely on using sendMulticast() or sendAll() that always return status 200 but never send notification while using send() works very well

Versions of server:

Installed packages

composer                2.2.4    Composer package
composer-plugin-api     2.2.0    The Composer Plugin API   
composer-runtime-api    2.2.2    The Composer Runtime API  
ext-bcmath              7.4.33   The bcmath PHP extension  
ext-bz2                 7.4.33   The bz2 PHP extension     
ext-calendar            7.4.33   The calendar PHP extension
ext-ctype               7.4.33   The ctype PHP extension   
ext-curl                7.4.33   The curl PHP extension    
ext-date                7.4.33   The date PHP extension    
ext-dom                 20031129 The dom PHP extension     
ext-exif                7.4.33   The exif PHP extension    
ext-fileinfo            7.4.33   The fileinfo PHP extension
ext-filter              7.4.33   The filter PHP extension  
ext-ftp                 7.4.33   The ftp PHP extension     
ext-gd                  7.4.33   The gd PHP extension      
ext-gettext             7.4.33   The gettext PHP extension 
ext-hash                7.4.33   The hash PHP extension    
ext-iconv               7.4.33   The iconv PHP extension   
ext-imagick             3.7.0    The imagick PHP extension
ext-json                7.4.33   The json PHP extension
ext-libxml              7.4.33   The libxml PHP extension
ext-mbstring            7.4.33   The mbstring PHP extension
ext-mysqli              7.4.33   The mysqli PHP extension
ext-mysqlnd             0        The mysqlnd PHP extension (actual version: mysqlnd 7.4.33)
ext-openssl             7.4.33   The openssl PHP extension
ext-pcre                7.4.33   The pcre PHP extension
ext-pdo                 7.4.33   The PDO PHP extension
ext-pdo_mysql           7.4.33   The pdo_mysql PHP extension
ext-pdo_sqlite          7.4.33   The pdo_sqlite PHP extension
ext-phar                7.4.33   The Phar PHP extension
ext-readline            7.4.33   The readline PHP extension
ext-reflection          7.4.33   The Reflection PHP extension
ext-session             7.4.33   The session PHP extension
ext-simplexml           7.4.33   The SimpleXML PHP extension
ext-spl                 7.4.33   The SPL PHP extension
ext-tokenizer           7.4.33   The tokenizer PHP extension
ext-xml                 7.4.33   The xml PHP extension
ext-xmlreader           7.4.33   The xmlreader PHP extension
ext-zip                 1.15.6   The zip PHP extension
ext-zlib                7.4.33   The zlib PHP extension
lib-bz2                 1.0.8    The bz2 library
lib-curl                7.70.0   The curl library
lib-curl-libssh2        1.9.0    curl libssh2 version
lib-curl-openssl        1.1.1.19 curl OpenSSL version (1.1.1.19)
lib-curl-zlib           1.2.12   curl zlib version
lib-date-timelib        2018.04  date timelib version
lib-date-zoneinfo       2022.1   zoneinfo ("Olson") database for date
lib-fileinfo-libmagic   537      fileinfo libmagic version
lib-gd                  2.0.35   The gd library
lib-gd-freetype         2.9.1    freetype version for gd
lib-gd-libjpeg          9.0      libjpeg version for gd
lib-gd-libpng           1.6.34   libpng version for gd
lib-gd-libxpm           3.5.12   libxpm version for gd
lib-iconv               1.16     The iconv library
lib-imagick-imagemagick 7.1.1.12 The imagick-imagemagick library
lib-libxml              2.9.10   libxml library version
lib-mbstring-libmbfl    1.3.2    mbstring libmbfl version
lib-mbstring-oniguruma  6.9.5    mbstring oniguruma version
lib-openssl             1.1.1.19 OpenSSL 1.1.1s  1 Nov 2022
lib-pcre                10.35    The pcre library
lib-pcre-unicode        13.0.0   PCRE Unicode version support
lib-pdo_sqlite-sqlite   3.31.1   The pdo_sqlite-sqlite library
lib-zip-libzip          1.7.1    The zip-libzip library
lib-zlib                1.2.12   The zlib library
php                     7.4.33   The PHP interpreter
php-64bit               7.4.33   The PHP interpreter, 64bit
php-ipv6                7.4.33   The PHP interpreter, with IPv6 support
php-zts                 7.4.33   The PHP interpreter, with Zend Thread Safety
PS G:\William\Training\wedding_backend> composer show
PHP Warning:  Version warning: Imagick was compiled against ImageMagick version 1808 but version 1809 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0

Warning: Version warning: Imagick was compiled against ImageMagick version 1808 but version 1809 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0
asm89/stack-cors                   v2.2.0              Cross-origin resource sharing library and stack middleware
brick/math                         0.9.3               Arbitrary-precision arithmetic library
carbonphp/carbon-doctrine-types    1.0.0               Types to use Carbon in Doctrine
code-lts/laravel-fcm               1.8.1               Laravel / Lumen package for Firebase Cloud Messaging
composer/semver                    3.4.2               Semver library that offers utilities, version constraint parsing and valida...   
dflydev/dot-access-data            v3.0.3              Given a deep data structure, access data by dot notation.
doctrine/cache                     1.13.0              PHP Doctrine Cache library is a popular cache implementation that supports ...   
doctrine/dbal                      2.13.0              Powerful PHP database abstraction layer (DBAL) with many features for datab...   
doctrine/deprecations              v0.5.3              A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging w...   
doctrine/event-manager             1.2.0               The Doctrine Event Manager is a simple PHP event system that was built to b...   
doctrine/inflector                 2.0.10              PHP Doctrine Inflector is a small library that can perform string manipulat...   
doctrine/instantiator              1.5.0               A small, lightweight utility to instantiate objects in PHP without invoking...   
doctrine/lexer                     1.2.3               PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive D...   
dragonmantank/cron-expression      v3.3.3              CRON for PHP: Calculate the next or previous run date and determine if a CR...   
egulias/email-validator            2.1.25              A library for validating emails against several RFCs
ezyang/htmlpurifier                v4.17.0             Standards compliant HTML filter written in PHP
facade/flare-client-php            1.10.0              Send PHP errors to Flare
facade/ignition                    2.17.7              A beautiful error page for Laravel applications.
facade/ignition-contracts          1.0.2               Solution contracts for Ignition
fakerphp/faker                     v1.23.1             Faker is a PHP library that generates fake data for you.
fig/http-message-util              1.1.5               Utility classes and constants for use with PSR-7 (psr/http-message)
filp/whoops                        2.15.4              php error handling for cool kids
firebase/php-jwt                   v6.10.0             A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should ...   
fruitcake/laravel-cors             v2.2.0              Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel a...   
google/auth                        v1.37.1             Google Auth Library for PHP
google/cloud-core                  v1.56.0             Google Cloud PHP shared dependency, providing functionality useful to all c...   
google/cloud-storage               v1.39.0             Cloud Storage Client for PHP
google/common-protos               v4.5.0              Google API Common Protos for PHP
google/gax                         v1.29.1             Google API Core for PHP
google/grpc-gcp                    v0.3.0              gRPC GCP library for channel management
google/longrunning                 0.4.3               Google LongRunning Client for PHP
google/protobuf                    v3.25.4             proto library for PHP
graham-campbell/result-type        v1.1.3              An Implementation Of The Result Type
grpc/grpc                          1.57.0              gRPC library for PHP
guzzlehttp/guzzle                  7.9.2               Guzzle is a PHP HTTP client library
guzzlehttp/promises                1.5.3               Guzzle promises library
guzzlehttp/psr7                    2.7.0               PSR-7 message implementation that also provides common utility methods
hamcrest/hamcrest-php              v2.0.1              This is the PHP port of Hamcrest Matchers
intervention/image                 2.7.2               Image handling and manipulation library with support for Laravel integration     
kreait/clock                       1.2                 A PHP 7.0 compatible clock abstraction
kreait/firebase-php                5.26.5              Firebase Admin SDK
kreait/firebase-tokens             1.17.0              A library to work with Firebase tokens
kreait/laravel-firebase            3.3.0               A Laravel package for the Firebase PHP Admin SDK
laravel/framework                  v8.83.27            The Laravel Framework.
laravel/sail                       v1.19.0             Docker files for running a basic Laravel application.
laravel/sanctum                    v2.15.1             Laravel Sanctum provides a featherweight authentication system for SPAs and...   
laravel/serializable-closure       v1.3.4              Laravel Serializable Closure provides an easy and secure way to serialize c...   
laravel/tinker                     v2.9.0              Powerful REPL for the Laravel framework.
lcobucci/clock                     2.0.0               Yet another clock abstraction
lcobucci/jwt                       4.0.4               A simple library to work with JSON Web Token and JSON Web Signature
league/commonmark                  2.5.3               Highly-extensible PHP Markdown parser which fully supports the CommonMark s...   
league/config                      v1.2.0              Define configuration arrays with strict schemas and access values with dot ...   
league/flysystem                   1.1.10              Filesystem abstraction: Many filesystems, one API.
league/mime-type-detection         1.15.0              Mime-type detection for Flysystem
maatwebsite/excel                  3.1.58              Supercharged Excel exports and imports in Laravel
maennchen/zipstream-php            2.2.6               ZipStream is a library for dynamically streaming dynamic zip files from PHP...   
markbaker/complex                  3.0.2               PHP Class for working with complex numbers
markbaker/matrix                   3.0.1               PHP Class for working with matrices
mockery/mockery                    1.6.12              Mockery is a simple yet flexible PHP mock object framework
monolog/monolog                    2.9.3               Sends your logs to files, sockets, inboxes, databases and various web services   
mtdowling/jmespath.php             2.8.0               Declaratively specify how to extract elements from a JSON document
myclabs/deep-copy                  1.12.0              Create deep copies (clones) of your objects
myclabs/php-enum                   1.8.4               PHP Enum implementation
namshi/jose                        7.2.3               JSON Object Signing and Encryption library for PHP.
nesbot/carbon                      2.72.5              An API extension for DateTime that supports 281 different languages.
nette/schema                       v1.2.5              📐 Nette Schema: validating data structures against a given Schema.
nette/utils                        v3.2.10             🛠  Nette Utils: lightweight utilities for string & array manipulation, i...      
nikic/php-parser                   v5.2.0              A PHP parser written in PHP
nunomaduro/collision               v5.11.0             Cli error handling for console/command-line PHP applications.
nwidart/laravel-modules            8.6.0               Laravel Module management
opis/closure                       3.6.3               A library that can be used to serialize closures (anonymous functions) and ...   
paragonie/random_compat            v9.99.100           PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
paragonie/sodium_compat            v1.21.1             Pure PHP implementation of libsodium; uses the PHP extension if it exists        
phar-io/manifest                   2.0.4               Component for reading phar.io manifest information from a PHP Archive (PHAR)     
phar-io/version                    3.2.1               Library for handling version information and constraints
phpoffice/phpspreadsheet           1.29.1              PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spre...   
phpoption/phpoption                1.9.3               Option Type for PHP
phpunit/php-code-coverage          9.2.32              Library that provides collection, processing, and rendering functionality f...   
phpunit/php-file-iterator          3.0.6               FilterIterator implementation that filters files based on a list of suffixes.    
phpunit/php-invoker                3.1.1               Invoke callables with a timeout
phpunit/php-text-template          2.0.4               Simple template engine.
phpunit/php-timer                  5.0.3               Utility class for timing
phpunit/phpunit                    9.6.20              The PHP Unit Testing framework.
psr/cache                          1.0.1               Common interface for caching libraries
psr/clock                          1.0.0               Common interface for reading the clock.
psr/container                      1.1.2               Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0               Standard interfaces for event handling.
psr/http-client                    1.0.3               Common interface for HTTP clients
psr/http-factory                   1.1.0               PSR-17: Common interfaces for PSR-7 HTTP message factories
psr/http-message                   1.1                 Common interface for HTTP messages
psr/log                            1.1.4               Common interface for logging libraries
psr/simple-cache                   1.0.1               Common interfaces for simple caching
psy/psysh                          v0.12.4             An interactive shell for modern PHP.
pusher/pusher-php-server           7.2.4               Library for interacting with the Pusher REST API
ralouphie/getallheaders            3.0.3               A polyfill for getallheaders.
ramsey/collection                  1.3.0               A PHP library for representing and manipulating collections.
ramsey/uuid                        4.2.3               A PHP library for generating and working with universally unique identifier...   
riverline/multipart-parser         2.1.2               One class library to parse multipart content with encoding and charset supp...   
rize/uri-template                  0.3.8               PHP URI Template (RFC 6570) supports both expansion & extraction
sebastian/cli-parser               1.0.2               Library for parsing CLI options
sebastian/code-unit                1.0.8               Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3               Looks up which function or method a line of code belongs to
sebastian/comparator               4.0.8               Provides the functionality to compare PHP values for equality
sebastian/complexity               2.0.3               Library for calculating the complexity of PHP code units
sebastian/diff                     4.0.6               Diff implementation
sebastian/environment              5.1.5               Provides functionality to handle HHVM/PHP environments
sebastian/exporter                 4.0.6               Provides the functionality to export PHP variables for visualization
sebastian/global-state             5.0.7               Snapshotting of global state
sebastian/lines-of-code            1.0.4               Library for counting the lines of code in PHP source code
sebastian/object-enumerator        4.0.4               Traverses array structures and object graphs to enumerate all referenced ob...   
sebastian/object-reflector         2.0.4               Allows reflection of object attributes, including inherited and non-public ...   
sebastian/recursion-context        4.0.5               Provides functionality to recursively process PHP variables
sebastian/resource-operations      3.0.4               Provides a list of PHP built-in functions that operate on resources
sebastian/type                     3.2.1               Collection of value objects that represent the types of the PHP type system      
sebastian/version                  3.0.2               Library that helps with managing the version number of Git-hosted PHP projects   
spatie/laravel-activitylog         3.17.0              A very simple activity logger to monitor the users of your website or appli...   
spatie/laravel-permission          5.11.1              Permission handling for Laravel 6.0 and up
spatie/laravel-translatable        4.6.0               A trait to make an Eloquent model hold translations
stella-maris/clock                 0.1.7               A pre-release of the proposed PSR-20 Clock-Interface
swiftmailer/swiftmailer            v6.3.0              Swiftmailer, free feature-rich PHP mailer
symfony/console                    v5.4.43             Eases the creation of beautiful and testable command line interfaces
symfony/css-selector               v5.4.40             Converts CSS selectors to XPath expressions
symfony/deprecation-contracts      v2.5.3              A generic function and convention to trigger deprecation notices
symfony/error-handler              v5.4.42             Provides tools to manage errors and ease debugging PHP code
symfony/event-dispatcher           v5.4.40             Provides tools that allow your application components to communicate with e...   
symfony/event-dispatcher-contracts v2.5.3              Generic abstractions related to dispatching event
symfony/finder                     v5.4.43             Finds files and directories via an intuitive fluent interface
symfony/http-foundation            v5.4.42             Defines an object-oriented layer for the HTTP specification
symfony/http-kernel                v5.4.43             Provides a structured process for converting a Request into a Response
symfony/mime                       v5.4.43             Allows manipulating MIME messages
symfony/polyfill-ctype             v1.31.0             Symfony polyfill for ctype functions
symfony/polyfill-iconv             v1.31.0             Symfony polyfill for the Iconv extension
symfony/polyfill-intl-grapheme     v1.31.0             Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn          v1.31.0             Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.31.0             Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.31.0             Symfony polyfill for the Mbstring extension
symfony/polyfill-php56             v1.20.0             Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions        
symfony/polyfill-php73             v1.31.0             Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions        
symfony/polyfill-php80             v1.31.0             Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions        
symfony/polyfill-php81             v1.31.0             Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions        
symfony/process                    v5.4.40             Executes commands in sub-processes
symfony/routing                    v5.4.43             Maps an HTTP request to a set of configuration variables
symfony/service-contracts          v2.5.3              Generic abstractions related to writing services
symfony/string                     v5.4.43             Provides an object-oriented API to strings and deals with bytes, UTF-8 code...   
symfony/translation                v5.4.42             Provides tools to internationalize your application
symfony/translation-contracts      v2.5.3              Generic abstractions related to translation
symfony/var-dumper                 v5.4.43             Provides mechanisms for walking through any arbitrary PHP variable
theseer/tokenizer                  1.2.3               A small library for converting tokenized PHP source code into XML and poten...   
tijsverkoyen/css-to-inline-styles  v2.2.7              CssToInlineStyles is a class that enables you to convert HTML-pages/files i...   
tymon/jwt-auth                     dev-develop 014be8d JSON Web Token Authentication for Laravel and Lumen
vlucas/phpdotenv                   v5.6.1              Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVE...   
voku/portable-ascii                1.6.1               Portable ASCII library - performance optimized (ascii) string functions for...   
webmozart/assert                   1.11.0              Assertions to validate method input/output with nice error messages.

PHP version and extensions

composer                2.2.4    Composer package
composer-plugin-api     2.2.0    The Composer Plugin API   
composer-runtime-api    2.2.2    The Composer Runtime API  
ext-bcmath              7.4.33   The bcmath PHP extension  
ext-bz2                 7.4.33   The bz2 PHP extension     
ext-calendar            7.4.33   The calendar PHP extension
ext-ctype               7.4.33   The ctype PHP extension   
ext-curl                7.4.33   The curl PHP extension    
ext-date                7.4.33   The date PHP extension    
ext-dom                 20031129 The dom PHP extension     
ext-exif                7.4.33   The exif PHP extension    
ext-fileinfo            7.4.33   The fileinfo PHP extension
ext-filter              7.4.33   The filter PHP extension  
ext-ftp                 7.4.33   The ftp PHP extension     
ext-gd                  7.4.33   The gd PHP extension      
ext-gettext             7.4.33   The gettext PHP extension 
ext-hash                7.4.33   The hash PHP extension    
ext-iconv               7.4.33   The iconv PHP extension   
ext-imagick             3.7.0    The imagick PHP extension
ext-json                7.4.33   The json PHP extension
ext-libxml              7.4.33   The libxml PHP extension
ext-mbstring            7.4.33   The mbstring PHP extension
ext-mysqli              7.4.33   The mysqli PHP extension
ext-mysqlnd             0        The mysqlnd PHP extension (actual version: mysqlnd 7.4.33)
ext-openssl             7.4.33   The openssl PHP extension
ext-pcre                7.4.33   The pcre PHP extension
ext-pdo                 7.4.33   The PDO PHP extension
ext-pdo_mysql           7.4.33   The pdo_mysql PHP extension
ext-pdo_sqlite          7.4.33   The pdo_sqlite PHP extension
ext-phar                7.4.33   The Phar PHP extension
ext-readline            7.4.33   The readline PHP extension
ext-reflection          7.4.33   The Reflection PHP extension
ext-session             7.4.33   The session PHP extension
ext-simplexml           7.4.33   The SimpleXML PHP extension
ext-spl                 7.4.33   The SPL PHP extension
ext-tokenizer           7.4.33   The tokenizer PHP extension
ext-xml                 7.4.33   The xml PHP extension
ext-xmlreader           7.4.33   The xmlreader PHP extension
ext-xmlwriter           7.4.33   The xmlwriter PHP extension
ext-zip                 1.15.6   The zip PHP extension
ext-zlib                7.4.33   The zlib PHP extension
lib-bz2                 1.0.8    The bz2 library
lib-curl                7.70.0   The curl library
lib-curl-libssh2        1.9.0    curl libssh2 version
lib-curl-openssl        1.1.1.19 curl OpenSSL version (1.1.1.19)
lib-curl-zlib           1.2.12   curl zlib version
lib-date-timelib        2018.04  date timelib version
lib-date-zoneinfo       2022.1   zoneinfo ("Olson") database for date
lib-fileinfo-libmagic   537      fileinfo libmagic version
lib-gd                  2.0.35   The gd library
lib-gd-freetype         2.9.1    freetype version for gd
lib-gd-libjpeg          9.0      libjpeg version for gd
lib-gd-libpng           1.6.34   libpng version for gd
lib-gd-libxpm           3.5.12   libxpm version for gd
lib-iconv               1.16     The iconv library
lib-imagick-imagemagick 7.1.1.12 The imagick-imagemagick library
lib-libxml              2.9.10   libxml library version
lib-mbstring-libmbfl    1.3.2    mbstring libmbfl version
lib-mbstring-oniguruma  6.9.5    mbstring oniguruma version
lib-openssl             1.1.1.19 OpenSSL 1.1.1s  1 Nov 2022
lib-pcre                10.35    The pcre library
lib-pcre-unicode        13.0.0   PCRE Unicode version support
lib-pdo_sqlite-sqlite   3.31.1   The pdo_sqlite-sqlite library
lib-zip-libzip          1.7.1    The zip-libzip library
lib-zlib                1.2.12   The zlib library
php                     7.4.33   The PHP interpreter
php-64bit               7.4.33   The PHP interpreter, 64bit
php-ipv6                7.4.33   The PHP interpreter, with IPv6 support
php-zts                 7.4.33   The PHP interpreter, with Zend Thread Safety

Steps to reproduce the issue.

# Insert the commands issued in the terminal if they are needed
# to reproduce the issue. Otherwise, delete this code block.
// Insert the PHP code to reproduce the issue. Please ensure that it is code that
// can be copy pasted to reproduce it.

Error message/Stack trace

No Error messages just 200 status

Additional information

No

jeromegamez commented 2 months ago

You are using an unsupported (and quite old) version 😅. In order to be able to send FCM messages, you need to upgrade to the latest 7.x release - Firebase has shut down their legacy FCM API, and version 7.x of the SDK uses the new endpoints. Unfortunately, you'll have to update your PHP version as well, at least 8.1.

WilliamGeorge1997 commented 2 months ago

Thanks for your help ❤