kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
1.07k stars 172 forks source link

Error: Operation is not implemented, or supported, or enabled. #231

Closed rakibhasansabbir closed 1 month ago

rakibhasansabbir commented 1 month ago

Describe the bug

Getting below exception

-error: Kreait\Firebase\Exception\Messaging\MessagingError {#2996
      #message: "Operation is not implemented, or supported, or enabled."
      #code: 501
      #file: "/var/www/doctime/core/vendor/kreait/firebase-php/src/Firebase/Exception/Messaging/MessagingError.php"
      #line: 22
      #errors: array:1 [
        "error" => array:3 [
          "code" => 501
          "message" => "Operation is not implemented, or supported, or enabled."
          "status" => "UNIMPLEMENTED"
        ]
      ]

### Installed packages

```json
"kreait/laravel-firebase": "^4.1"

PHP version and extensions

8.1

Usages:

$message = CloudMessage::new()
                ->withAndroidConfig($androidConfig)
                ->withApnsConfig($apnsConfig)
                ->withWebPushConfig($webPushConfig);

$cloudMessaging = app('firebase.messaging');
$cloudMessaging->sendMulticast($message, $tokens);

Additional information

No response

beratallahverdi commented 1 month ago

update your laravel-firebase version to 5.9.1

jeromegamez commented 1 month ago

What @beratallahverdi said - version 4.x isn't supported anymore. 5.x uses a newer version of the SDK which uses the currently supported FCM API endpoints.

giangnh13579 commented 1 month ago

update your laravel-firebase version to 5.9.1

Just for more information. Can you tell the specific version which fixes this issue of https://github.com/kreait/laravel-firebase and https://github.com/kreait/firebase-php or the root cause of this error 😄 . Thanks

jeromegamez commented 1 month ago

Any 5.x version of the Laravel Package should do, but upgrading to the latest version is recommended.

Same for the SDK, the use of the new API endpoints has been introduced in 7.5, I think, but here it's also recommended to use the latest version.

If you add ^5.9.1 as the version constraint for the Laravel package and do a composer update --with-all-dependencies, you should get the latest versions; no need to add kreait/firebase-php explicitly.