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

CURL error when embedding Twitter #531

Closed
Coornifex opened this issue Mar 24, 2024 · 2 comments
Closed

CURL error when embedding Twitter #531

Coornifex opened this issue Mar 24, 2024 · 2 comments

Comments

@Coornifex
Copy link

Coornifex commented Mar 24, 2024

Hi,

I use League\CommonMark Embed Extension in my Laravel project and I have this error when embedding Twitter in my website (it worked fine yesterday and I didn't changed anything in my project) :

[2024-03-24 09:55:49] production.ERROR: Maximum (10) redirects followed {"userId":1,"exception":"[object] (Embed\\Http\\NetworkException(code: 47): Maximum (10) redirects followed at /var/www/sites/occasioo/vendor/embed/embed/src/Http/CurlDispatcher.php:165)
[stacktrace]
#0 /var/www/sites/occasioo/vendor/embed/embed/src/Http/CurlDispatcher.php(126): Embed\\Http\\CurlDispatcher->error()
#1 /var/www/sites/occasioo/vendor/embed/embed/src/Http/CurlDispatcher.php(38): Embed\\Http\\CurlDispatcher->getResponse()
#2 /var/www/sites/occasioo/vendor/embed/embed/src/Http/CurlClient.php(38): Embed\\Http\\CurlDispatcher::fetch()
#3 /var/www/sites/occasioo/vendor/embed/embed/src/Http/Crawler.php(62): Embed\\Http\\CurlClient->sendRequests()
#4 /var/www/sites/occasioo/vendor/embed/embed/src/Embed.php(39): Embed\\Http\\Crawler->sendRequests()
#5 /var/www/sites/occasioo/vendor/league/commonmark/src/Extension/Embed/Bridge/OscaroteroEmbedAdapter.php(43): Embed\\Embed->getMulti()
#6 /var/www/sites/occasioo/vendor/league/commonmark/src/Extension/Embed/EmbedProcessor.php(54): League\\CommonMark\\Extension\\Embed\\Bridge\\OscaroteroEmbedAdapter->updateEmbeds()
#7 /var/www/sites/occasioo/vendor/league/commonmark/src/Environment/Environment.php(379): League\\CommonMark\\Extension\\Embed\\EmbedProcessor->__invoke()
#8 /var/www/sites/occasioo/vendor/league/commonmark/src/Environment/Environment.php(348): League\\CommonMark\\Environment\\Environment->League\\CommonMark\\Environment\\{closure}()
#9 /var/www/sites/occasioo/vendor/league/commonmark/src/Parser/MarkdownParser.php(107): League\\CommonMark\\Environment\\Environment->dispatch()
#10 /var/www/sites/occasioo/vendor/league/commonmark/src/MarkdownConverter.php(59): League\\CommonMark\\Parser\\MarkdownParser->parse()
#11 /var/www/sites/occasioo/app/Traits/TextToHtml.php(68): League\\CommonMark\\MarkdownConverter->convert()
#12 /var/www/sites/occasioo/app/Observers/NewsObserver.php(19): App\\Models\\News->markdownToHtml()
#13 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(478): App\\Observers\\NewsObserver->saving()
#14 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(286): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}()
#15 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(266): Illuminate\\Events\\Dispatcher->invokeListeners()
#16 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(232): Illuminate\\Events\\Dispatcher->dispatch()
#17 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(215): Illuminate\\Events\\Dispatcher->until()
#18 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1126): Illuminate\\Database\\Eloquent\\Model->fireModelEvent()
#19 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Controllers/ResourceUpdateController.php(55): Illuminate\\Database\\Eloquent\\Model->save()
#20 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(30): Laravel\\Nova\\Http\\Controllers\\ResourceUpdateController->Laravel\\Nova\\Http\\Controllers\\{closure}()
#21 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Controllers/ResourceUpdateController.php(37): Illuminate\\Database\\Connection->transaction()
#22 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Laravel\\Nova\\Http\\Controllers\\ResourceUpdateController->__invoke()
#23 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction()
#24 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#25 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Route.php(206): Illuminate\\Routing\\Route->runController()
#26 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\\Routing\\Route->run()
#27 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#28 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/Authorize.php(18): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#29 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\Authorize->handle()
#30 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(64): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#31 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/Authenticate.php(31): Illuminate\\Auth\\Middleware\\Authenticate->handle()
#32 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\Authenticate->handle()
#33 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/BootTools.php(20): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#34 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\BootTools->handle()
#35 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/DispatchServingNovaEvent.php(33): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#36 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\DispatchServingNovaEvent->handle()
#37 /var/www/sites/occasioo/vendor/inertiajs/inertia-laravel/src/Middleware.php(87): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#38 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/HandleInertiaRequests.php(73): Inertia\\Middleware->handle()
#39 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\HandleInertiaRequests->handle()
#40 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(88): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#42 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#44 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest()
#46 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle()
#47 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#48 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#49 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#50 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#51 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#52 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then()
#53 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack()
#54 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute()
#55 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute()
#56 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch()
#57 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#58 /var/www/sites/occasioo/vendor/proengsoft/laravel-jsvalidation/src/RemoteValidationMiddleware.php(61): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#59 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Proengsoft\\JsValidation\\RemoteValidationMiddleware->handle()
#60 /var/www/sites/occasioo/vendor/laravel/nova/src/Http/Middleware/ServeNova.php(23): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#61 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Laravel\\Nova\\Http\\Middleware\\ServeNova->handle()
#62 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#63 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#64 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle()
#65 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#66 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(50): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#67 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle()
#68 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#69 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle()
#70 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#71 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle()
#72 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#73 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle()
#74 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#75 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle()
#76 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#77 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then()
#78 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#79 /var/www/sites/occasioo/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1168): Illuminate\\Foundation\\Http\\Kernel->handle()
#80 /var/www/sites/occasioo/public/index.php(14): Illuminate\\Foundation\\Application->handleRequest()
#81 {main}
"} 
@JanMisker
Copy link
Contributor

I had the same problem but was able to fix it using the snippet from this issue: #520 (comment)

@Coornifex
Copy link
Author

Thanks, it works !

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