Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: method_exists() #50

Open
blackcatt opened this issue Apr 7, 2023 · 1 comment
Open

TypeError: method_exists() #50

blackcatt opened this issue Apr 7, 2023 · 1 comment

Comments

@blackcatt
Copy link

When working with binance futures sometime I have trouble in workerman.log like this:

TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in .../vendor/linwj/
Stack trace:
#0 /var/www/.../vendor/linwj/binance/src/Request.php(144): method_exists()
#1 /var/www/.../vendor/linwj/binance/src/Api/Futures/Trade.php(52): Lin\Binance\Request->exec()
#2 /var/www/....php(770): Lin\Binance\Api\Futures\Trade->postOrder()
...
#4 /var/www/....php(385): account_update()
#5 /var/www/.../vendor/workerman/workerman/Connection/TcpConnection.php(646): {closure}()
#6 /var/www/.../vendor/workerman/workerman/Events/Select.php(311): Workerman\Connection\TcpConnection->baseRead()
#7 /var/www/.../vendor/workerman/workerman/Worker.php(1629): Workerman\Events\Select->loop()
#8 /var/www/.../vendor/workerman/workerman/Worker.php(1423): Workerman\Worker::forkOneWorkerForLinux()
#9 /var/www/.../vendor/workerman/workerman/Worker.php(1397): Workerman\Worker::forkWorkersForLinux()
#10 /var/www/.../vendor/workerman/workerman/Worker.php(560): Workerman\Worker::forkWorkers()
#11 /var/www/....php(1305): Workerman\Worker::runAll()
#12 {main}
exit with status 64000

So, the Worker restarted, and this is not good and incomprehensible.
My postOrder() code is wrapped to try/catch but anyway error happened (very rare, but it exists)
Also I saw this problem when calling methods putListenKey() deleteOrder() deleteBatchOrders() getTickerPrice()
Even if problem in network connection there should be a solution to catch this error

Please help to solve this issue.

@zhouaini528
Copy link
Owner

I have already solved it, you can try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants