Closed MarkTierney1975 closed 5 months ago
Try go to Kudu Debug Console. cd D:\home\SiteExtensions\ComposerExtension
and try to run install.cmd
, is it successful? It might emit warning the #
in not valid batch command but should proceed to install the extension..
Hi
If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure: https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request
This way we can better track and assist you on this case
Thanks,
Joaquin Vano Azure App Service
Repro steps.
If I build a web app that uses php7.1 the composer extension installs but the composer command is not recognised in the console.
If I build a web app that uses php7.2 the composer extension installs and works fine, If I then downgrade to php7.1 or php7.0 composer no longer works and a new installation fails.
Unfortunately php7.2 has a bug so I need to use 7.1 or 7.0.
Project structures.
I am using the laravel 5.5 framework. The wwwroot is changed to public, mongobd php extension is installed.
The log/error given by the failure.
Example error when composer installation fails:
Failed to install web app extension Composer. {"Message":"ExitCode: -1073741819, Output: D:\home\SiteExtensions\ComposerExtension># Install Composer \r\n\r\nD:\home\SiteExtensions\ComposerExtension>cd Commands \r\n\r\nD:\home\SiteExtensions\ComposerExtension\Commands>IF EXIST composer.phar (rm -f composer.phar ) \r\n\r\nD:\home\SiteExtensions\ComposerExtension\Commands>IF NOT EXIST \"D:\local\AppData\Composer\" (mkdir \"D:\local\AppData\Composer\" ) \r\n\r\nD:\home\SiteExtensions\ComposerExtension\Commands>IF NOT EXIST \"D:\local\LocalAppData\Composer\" (mkdir \"D:\local\LocalAppData\Composer\" ) \r\n\r\nD:\home\SiteExtensions\ComposerExtension\Commands>php -r \"readfile('https://getcomposer.org/installer');\" | php, Error: '#' is not recognized as an internal or external command,\r\noperable program or batch file., Kudu.Core.Infrastructure.CommandLineException: '#' is not recognized as an internal or external command,\r\noperable program or batch file.\r\nD:\home\SiteExtensions\ComposerExtension\install.cmd \r\n at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Funcb1() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 541\r\n at Kudu.Core.Infrastructure.OperationManager.<>cDisplayClass2_0.b 0() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 17\r\n at Kudu.Core.Infrastructure.OperationManager.Attempt[T](Funcd27.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 550\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Kudu.Core.SiteExtensions.SiteExtensionManager.d 26.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\SiteExtensions\SiteExtensionManager.cs:line 335"}
2 onWriteOutput, Func
2 onWriteError, Encoding encoding, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 235\r\n at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 137\r\n at Kudu.Core.SiteExtensions.SiteExtensionManager.<>cDisplayClass27_1.1 action, Int32 retries, Int32 delayBeforeRetry, Func
2 shouldRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 42\r\n at Kudu.Core.Infrastructure.OperationManager.Attempt(Action action, Int32 retries, Int32 delayBeforeRetry) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\OperationManager.cs:line 19\r\n at Kudu.Core.SiteExtensions.SiteExtensionManager.