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

AppVeyor build is breaking #157

Closed
florianeckerstorfer opened this issue Feb 11, 2017 · 10 comments · Fixed by #193
Closed

AppVeyor build is breaking #157

florianeckerstorfer opened this issue Feb 11, 2017 · 10 comments · Fixed by #193

Comments

@florianeckerstorfer
Copy link
Member

florianeckerstorfer commented Feb 11, 2017

Has someone any experience with AppVeyor and can help me fix the build on Windows? It seems that there is a problem installing or configuring PHP on the machine breaks.

Link to latest build on AppVeyor

@wandersonwhcr
Copy link
Contributor

Installing KB3035131...
WARNING: Update KB3035131 installation failed (exit code 1058).
WARNING: More details may be found in the installation log (C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131.Install.evt) or the system CBS log (C:\windows\Logs\CBS\CBS.log).
ERROR: Update KB3035131 installation failed (exit code 1058).
The install of kb3035131 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\KB3035131\Tools\ChocolateyInstall.ps1'.
 See log for details.

Can you dump these files?

C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131.Install.evt
C:\windows\Logs\CBS\CBS.log

I'm a heavy Linux user and I have not used Windows for 10 years or more.

@wandersonwhcr
Copy link
Contributor

Chocolatey PHP Approved Package: https://chocolatey.org/packages/php

@wandersonwhcr
Copy link
Contributor

Chocolatey KB3035131 Approved Package: https://chocolatey.org/packages/KB3035131
Maintainer: jberezanski https://chocolatey.org/profiles/jberezanski https:/jberezanski

@wandersonwhcr
Copy link
Contributor

GitHub Project: https:/jberezanski/ChocolateyPackages

@wandersonwhcr
Copy link
Contributor

I dumped C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131.Install.evt, and I just found a lot of binary content. But, there's some messages:

@InstallWorker.00885: Failed to add scan package service
@InstallWorker.01328: Exit with error code 0X80070422 (The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.)
@RebootIfRequested.01487: Reboot is not scheduled. IsRunWizardStarted: 0, IsRebootRequired: 0, RestartMode: 1
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it."C:\windows\System32\wusa.exe" "C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131\1.0.1\Windows8.1-KB3035131-x64.msu" /quiet /norestart /log:"C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131.Install.evt"
@wWinMain.02009: Failed to install update ; Error: 0X80070422, The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.. Command line: "C:\windows\System32\wusa.exe" "C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131\1.0.1\Windows8.1-KB3035131-x64.msu" /quiet /norestart /log:"C:\Users\appveyor\AppData\Local\Temp\1\chocolatey\KB3035131.Install.evt"
wWinMain.02040: Exit with error code 0X80070422 (The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.)

@wandersonwhcr
Copy link
Contributor

Damn! I found a solution!

KB3035131 0X80070422
https:/phpmd/phpmd/blob/master/appveyor.yml#L12-L13

@wandersonwhcr
Copy link
Contributor

I'll create a PR soon.

@wandersonwhcr
Copy link
Contributor

Gotcha!

diff --git a/.appveyor.yml b/.appveyor.yml
index 3321914..471e9af 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -7,7 +7,7 @@ cache:
   - '%LOCALAPPDATA%\Composer\files'
 
 init:
-  - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
+  - SET PATH=C:\Program Files\OpenSSL;c:\tools\php71;%PATH%
 
 environment:
   matrix:
@@ -15,8 +15,10 @@ environment:
 
 install:
   - cinst -y OpenSSL.Light
+  - sc config wuauserv start= auto
+  - net start wuauserv
   - cinst -y php
-  - cd c:\tools\php
+  - cd c:\tools\php71
   - copy php.ini-production php.ini /Y
   - echo date.timezone="UTC" >> php.ini
   - echo extension_dir=ext >> php.ini

@florianeckerstorfer
Copy link
Member Author

Aweseome. I also used Windows for the last time over 10 years ago. Thanks a lot.

@wandersonwhcr
Copy link
Contributor

I am creating a PR right now.

florianeckerstorfer pushed a commit that referenced this issue Oct 13, 2017
* Fix AppVeyor build

This commit fixes an unexpected behavior with Windows Update from
AppVeyor. Installing PHP with chocolatey, some dependencies are
downloaded. KB3035131 is a PHP indirect dependency and causes an error
when installed, because Windows Update Service must be restarted.

After some Google digging, PHPMD uses these commands to config and
restart Windows Update Service.

Fix #157
See https:/phpmd/phpmd/blob/0a69edf/appveyor.yml#L12-L13

* Update AppVeyor PHP 7.1 install path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants