onesignal icon indicating copy to clipboard operation
onesignal copied to clipboard

Type Error Unsupported operand types: string * int

Open theafolayan opened this issue 10 months ago • 9 comments

Hi, we're using the onesignal v2.5 package and suddenly, we get an error for all notifications being sent using the Onesignal channel saying

Unsupported operand types: string * int

After Upgrading to v2.6 the issue still persists.

theafolayan avatar Feb 05 '25 17:02 theafolayan

+1

ryangittings avatar Feb 05 '25 19:02 ryangittings

@theafolayan did you manage to resolve? Not sure if this is linked:

https://github.com/berkayk/laravel-onesignal/pull/199

ryangittings avatar Feb 06 '25 16:02 ryangittings

@theafolayan Can you share more information, please? It's hard to replicate if we don't know how you're using or where you getting the error from.

throcha3 avatar Feb 06 '25 20:02 throcha3

So the provider doesn't seem to match the latest version of the berkayk package. See changes:

https://github.com/berkayk/laravel-onesignal/compare/v2.3...v2.4.1

I've updated my fork with the following:

https://github.com/laravel-notification-channels/onesignal/pull/159/files

Which seems to fix the issue?

ryangittings avatar Feb 06 '25 20:02 ryangittings

@ryangittings

Oh, got it! The berkayk package changed the signature for the client class in 2.3, then we changed it back to how it was in 2.4. Probably this is the issue.

throcha3 avatar Feb 06 '25 21:02 throcha3

same issue

[2025-02-07 17:21:53] local.ERROR: Unsupported operand types: string * int {"exception":"[object] (TypeError(code: 0): Unsupported operand types: string * int at /Users/ss/Documents/projects/lift20/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:506)

Image

selcuksarikoz avatar Feb 07 '25 17:02 selcuksarikoz

So the provider doesn't seem to match the latest version of the berkayk package. See changes:

berkayk/[email protected]

I've updated my fork with the following:

https://github.com/laravel-notification-channels/onesignal/pull/159/files

Which seems to fix the issue?

The Fix from @ryangittings seems to work for me. Thanks @ryangittings !

theafolayan avatar Feb 08 '25 18:02 theafolayan

Hoping for this to be merge .

KhairulAzmi21 avatar Feb 19 '25 23:02 KhairulAzmi21

Waiting for this fix also.

mattlanded avatar Feb 20 '25 11:02 mattlanded