Comments (6)
and sometimes like this
from madelineproto.
If the error occurs, i can no longer use the upload function
local_bot | TypeError: danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(): Return value must be of type string, null returned in /app/vendor/danog/madelineproto/src/MTProtoTools/FilesLogic.php:421
local_bot | Stack trace:
local_bot | #0 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(294): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(524288, 524288, NULL)
local_bot | #1 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(323): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(1)
local_bot | #2 /app/vendor/amphp/amp/src/functions.php(34): danog\MadelineProto\MTProto->danog\MadelineProto\MTProtoTools\{closure}()
local_bot | #3 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}(NULL, NULL, Array)
local_bot | #4 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #5 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #6 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(64): Fiber->resume(NULL)
local_bot | #7 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
local_bot | #8 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #10 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(498): Fiber->start()
local_bot | #11 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
local_bot | #12 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #13 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(94): Fiber->resume()
local_bot | #14 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(117): Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #15 /app/vendor/amphp/amp/src/Future.php(251): Revolt\EventLoop\Internal\DriverSuspension->suspend()
local_bot | #16 /app/vendor/danog/madelineproto/src/Wrappers/Loop.php(107): Amp\Future->await()
local_bot | #17 /app/vendor/danog/madelineproto/src/AbstractAPI.php(84): danog\MadelineProto\MTProto->loop()
local_bot | #18 /app/vendor/danog/madelineproto/src/AbstractAPI.php(65): danog\MadelineProto\AbstractAPI->startAndLoopLogic('App\\Core\\SendOp...', true)
local_bot | #19 /app/vendor/danog/madelineproto/src/EventHandler.php(98): danog\MadelineProto\AbstractAPI->startAndLoopInternal('App\\Core\\SendOp...')
local_bot | #20 /app/send.php(53): danog\MadelineProto\EventHandler::startAndLoopBot('local_bot.madel...', '6425359497:AAHK...', Object(danog\MadelineProto\Settings))
local_bot | #21 {main}TypeError: danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(): Return value must be of type string, null returned in /app/vendor/danog/madelineproto/src/MTProtoTools/FilesLogic.php:421
local_bot | Stack trace:
local_bot | #0 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(294): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(1048576, 524288, NULL)
local_bot | #1 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(323): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(2)
local_bot | #2 /app/vendor/amphp/amp/src/functions.php(34): danog\MadelineProto\MTProto->danog\MadelineProto\MTProtoTools\{closure}()
local_bot | #3 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}(NULL, NULL, Array)
local_bot | #4 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #5 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #6 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(64): Fiber->resume(NULL)
local_bot | #7 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
local_bot | #8 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #10 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
local_bot | #11 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
local_bot | #12 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #13 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(94): Fiber->resume()
local_bot | #14 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(117): Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #15 /app/vendor/amphp/amp/src/Future.php(251): Revolt\EventLoop\Internal\DriverSuspension->suspend()
local_bot | #16 /app/vendor/danog/madelineproto/src/Wrappers/Loop.php(107): Amp\Future->await()
local_bot | #17 /app/vendor/danog/madelineproto/src/AbstractAPI.php(84): danog\MadelineProto\MTProto->loop()
local_bot | #18 /app/vendor/danog/madelineproto/src/AbstractAPI.php(65): danog\MadelineProto\AbstractAPI->startAndLoopLogic('App\\Core\\SendOp...', true)
local_bot | #19 /app/vendor/danog/madelineproto/src/EventHandler.php(98): danog\MadelineProto\AbstractAPI->startAndLoopInternal('App\\Core\\SendOp...')
local_bot | #20 /app/send.php(53): danog\MadelineProto\EventHandler::startAndLoopBot('local_bot.madel...', '6425359497:AAHK...', Object(danog\MadelineProto\Settings))
local_bot | #21 {main}
local_bot | [2024-03-07 10:39:29] main.error: [2024-03-07 10:39:29] main.ERROR: try again [] [] [] []
local_bot | TypeError: danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(): Return value must be of type string, null returned in /app/vendor/danog/madelineproto/src/MTProtoTools/FilesLogic.php:421
local_bot | Stack trace:
local_bot | #0 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(294): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(524288, 524288, NULL)
local_bot | #1 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(323): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(1)
local_bot | #2 /app/vendor/amphp/amp/src/functions.php(34): danog\MadelineProto\MTProto->danog\MadelineProto\MTProtoTools\{closure}()
local_bot | #3 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}(NULL, NULL, Array)
local_bot | #4 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #5 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #6 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(64): Fiber->resume(NULL)
local_bot | #7 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
local_bot | #8 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #10 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
local_bot | #11 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
local_bot | #12 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #13 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(94): Fiber->resume()
local_bot | #14 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(117): Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #15 /app/vendor/amphp/amp/src/Future.php(251): Revolt\EventLoop\Internal\DriverSuspension->suspend()
local_bot | #16 /app/vendor/danog/madelineproto/src/Wrappers/Loop.php(107): Amp\Future->await()
local_bot | #17 /app/vendor/danog/madelineproto/src/AbstractAPI.php(84): danog\MadelineProto\MTProto->loop()
local_bot | #18 /app/vendor/danog/madelineproto/src/AbstractAPI.php(65): danog\MadelineProto\AbstractAPI->startAndLoopLogic('App\\Core\\SendOp...', true)
local_bot | #19 /app/vendor/danog/madelineproto/src/EventHandler.php(98): danog\MadelineProto\AbstractAPI->startAndLoopInternal('App\\Core\\SendOp...')
local_bot | #20 /app/send.php(53): danog\MadelineProto\EventHandler::startAndLoopBot('local_bot.madel...', '6425359497:AAHK...', Object(danog\MadelineProto\Settings))
local_bot | #21 {main}
local_bot | TypeError: danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(): Return value must be of type string, null returned in /app/vendor/danog/madelineproto/src/MTProtoTools/FilesLogic.php:421
local_bot | Stack trace:
local_bot | #0 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(294): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(1048576, 524288, NULL)
local_bot | #1 /app/vendor/danog/madelineproto/src/MTProtoTools/Files.php(323): danog\MadelineProto\MTProto::danog\MadelineProto\MTProtoTools\{closure}(2)
local_bot | #2 /app/vendor/amphp/amp/src/functions.php(34): danog\MadelineProto\MTProto->danog\MadelineProto\MTProtoTools\{closure}()
local_bot | #3 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}(NULL, NULL, Array)
local_bot | #4 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #5 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #6 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(64): Fiber->resume(NULL)
local_bot | #7 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
local_bot | #8 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
local_bot | #9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #10 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
local_bot | #11 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
local_bot | #12 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #13 /app/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(94): Fiber->resume()
local_bot | #14 /app/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(117): Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
local_bot | #15 /app/vendor/amphp/amp/src/Future.php(251): Revolt\EventLoop\Internal\DriverSuspension->suspend()
local_bot | #16 /app/vendor/danog/madelineproto/src/Wrappers/Loop.php(107): Amp\Future->await()
local_bot | #17 /app/vendor/danog/madelineproto/src/AbstractAPI.php(84): danog\MadelineProto\MTProto->loop()
local_bot | #18 /app/vendor/danog/madelineproto/src/AbstractAPI.php(65): danog\MadelineProto\AbstractAPI->startAndLoopLogic('App\\Core\\SendOp...', true)
local_bot | #19 /app/vendor/danog/madelineproto/src/EventHandler.php(98): danog\MadelineProto\AbstractAPI->startAndLoopInternal('App\\Core\\SendOp...')
local_bot | #20 /app/send.php(53): danog\MadelineProto\EventHandler::startAndLoopBot('local_bot.madel...', '6425359497:AAHK...', Object(danog\MadelineProto\Settings))
local_bot | #21 {main}
from madelineproto.
After the error occurs, my program tries to upload the same file again and continues to report the error, but if I change the name of the file and upload it again it works!
\Amp\async(function ()use($jsonData, $file){
\Amp\delay(0.3);
try {
$this->tgHandler->messages->sendMedia(
peer: $_ENV['env_config']['tg']['group_id'],
media: [
'_' => 'inputMediaUploadedDocument',
'file' => $file,
'attributes' => [
['_' => 'documentAttributeAnimated']
]
],
);
}catch (\Throwable $exception){
Logger::getInstance()->error('上传文件出错',['$jsonData'=>$jsonData,'$file'=>$file,'$exception'=>$exception]);
\Amp\File\move($file,$_ENV['app_config']['sender']['mp4_path'].'/'.$_ENV['app_config']['sender']['stream_path'].'/'.$jsonData['round_no'].'back.mp4');
$this->tgHandler->messages->sendMedia(
peer: $_ENV['env_config']['tg']['group_id'],
media: [
'_' => 'inputMediaUploadedDocument',
'file' => $_ENV['app_config']['sender']['mp4_path'].'/'.$_ENV['app_config']['sender']['stream_path'].'/'.$jsonData['round_no'].'back.mp4',
'attributes' => [
['_' => 'documentAttributeAnimated']
]
],
);
}
});
from madelineproto.
Using the latest official docker image
from madelineproto.
and sometimes like this
If the upload completes and the track is unknown, no exception is thrown.
from madelineproto.
Related Issues (20)
- Make the session portable and independent of paths, code, classes and php version HOT 3
- Sometimes have auth error HOT 3
- Graceful Shutdown of MadelineProto Event Handler via Symfony Command HOT 1
- Memory leaks in handling updates loop HOT 5
- Sending a message to the chat topic does not work HOT 1
- $message->read() return type issue HOT 1
- missing feature sendMediaGroup it’s very important but not available HOT 1
- Class Naming Mismatch in `danog\MadelineProto\EventHandler\Pinned` HOT 1
- inputMediaUploadedVideo is not available for sendMultiMedia HOT 1
- getHistory generate exception MSG_ID_INVALID HOT 1
- messages.gethistory and messages.search return no messages HOT 1
- Return Type In Read Method From Mesage Object HOT 1
- I've this error when i try to use InviteToChannel function HOT 2
- Not working with stable amphp v2 version HOT 2
- getFullInfo() error HOT 2
- How to avoid "This peer is not present in the internal peer database" HOT 1
- This block breaks integration with Symfony HOT 2
- How filter incoming messages: all messages without Scheduled HOT 2
- /** Whether the user has left the group */ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from madelineproto.