Windows Azure Storage Emulator failed to install
Below is the message received using the WebPI.
Storage Emulator Background (optional reading)
Configuration
At Assemblysoft we specialise in Custom Software Development tailored to your requirements. We have experience creating Booking solutions, as we did for HappyCamperVan Hire. You can read more here.
We can onboard and add value to your business rapidly. We are an experienced Full-stack development team able to provide specific technical expertise or manage your project requirements end to end. We specialise in the Microsoft cloud and .NET Solutions and Services. Our developers are Microsoft Certified. We have real-world experience developing .NET applications and Azure Services for a large array of business domains. If you would like some assistance with Azure | Azure DevOps Services | Blazor Development or in need of custom software development, from an experienced development team in the United Kingdom, then please get in touch, we would love to add immediate value to your business.
Assemblysoft - Your Safe Pair of Hands
Database
SQL Server Express 'LocalDB' Background (optional reading)
Diagnosis
- === Logging started: 06-Apr-14 0:02:16 ===
- Action start 0:02:16: INSTALL.
- Action start 0:02:16: AppSearch.
- Action ended 0:02:16: AppSearch. Return value 1.
- ...
- Action start 0:02:16: InstallFinalize.
- CAQuietExec: Windows Azure Storage Emulator 3.0.0.0 command line tool
- CAQuietExec: Error: No available SQL Instance was found.
- CAQuietExec: Error 0xfffffff6: Command line returned an error.
- CAQuietExec: Error 0xfffffff6: CAQuietExec Failed
- CustomAction RunInitialize returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
- Action ended 0:02:16: InstallFinalize. Return value 3.
- Action ended 0:02:17: INSTALL. Return value 3.
- Property(S): UpgradeCode = {CF5CD495-AEDE-42DA-B7CF-A70D398D4E6A}
- Property(S): RunInitialize = "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator\WAStorageEmulator.exe" init -forcecreate -autodetect
- Property(S): DOTNET4FULL = 4.5.51641
- Property(S): LOCALDBINSTALLED = C:\Program Files (x86)\Microsoft SQL Server\110\LocalDB\Binn\SqlUserInstance.dll
- Property(S): SQLEXPRESSVERSION = 11.0.2100.60
- Property(S): TARGETDIR = J:\
- Property(S): StorageEmulatorMenuFolder = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Azure\Storage Emulator\
- Property(S): STORAGEEMUDIR = C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator\
- Property(S): WixUIRMOption = UseRM
- Property(S): ALLUSERS = 1
- Property(S): ARPNOMODIFY = 1
- Property(S): REINSTALLMODE = amus
- Property(S): WindowsAzureMenuFolder = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Azure\
- Property(S): ProgramMenuFolder = C:\ProgramData\Microsoft\Windows\Start Menu\Programs\
- Property(S): WINDOWSAZUREDIR = C:\Program Files (x86)\Microsoft SDKs\Windows Azure\
- Property(S): MICROSOFTSDKSDIR = C:\Program Files (x86)\Microsoft SDKs\
- Property(S): ProgramFilesFolder = C:\Program Files (x86)\
- ...
- Property(S): ProductToBeRegistered = 1
- MSI (s) (6C:2C) [00:02:17:017]: Product: Windows Azure Storage Emulator - v3.0 -- Installation failed.
- MSI (s) (6C:2C) [00:02:17:017]: Windows Installer installed the product. Product Name: Windows Azure Storage Emulator - v3.0. Product Version: 3.0.6848.39. Product Language: 1033. Manufacturer: Microsoft Corporation. Installation success or error status: 1603.
- === Logging stopped: 06-Apr-14 0:02:17 ===
Looking back at the error log may have left you confused as you may well have verified that a LocalDB instance does indeed exist.
Taking a look at the 'application' event log however reveals more detail.
Log Name: Application
Source: SQLLocalDB 11.0
Date:
Event ID: 267
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
LocalDB instance is corrupted. See the Windows Application event log for error details.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="SQLLocalDB 11.0" />
<EventID Qualifiers="35269">267</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-05-05T16:44:32.000000000Z" />
<EventRecordID>74923</EventRecordID>
<Channel>Application</Channel>
<Computer></Computer>
<Security />
</System>
<EventData>
</EventData>
</Event>
Log Name: Application
Source: SQLLocalDB 11.0
Date: AM
Event ID: 261
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer:
Description:
Cannot access LocalDB instance folder: %%LOCALAPPDATA%%\Microsoft\Microsoft SQL Server Local DB\Instances\<instance name>.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="SQLLocalDB 11.0" />
<EventID Qualifiers="35269">261</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-05-05T16:44:32.000000000Z" />
<EventRecordID>74922</EventRecordID>
<Channel>Application</Channel>
<Computer></Computer>
<Security />
</System>
<EventData>
</EventData>
</Event>
Here we see a more granular level of explanation, informing that the LocalDB instance is corrupt.
When we upgrade versions of the Storage Emulator it is most likely that the database has undergone some new enhancements, as a result we need to ensure the database gets updated regardless of it's prior existence.
As our error is at the instance level, the storage emulator command line tool using the -forcreate option won't buy us anything. However if our error message was related to the actual database it would certainly come into play.
In this case we can go direct to the database instance, stop it, delete it and re-create it, including the removal of any storage emulator databases that may have been partially created along the way.
Firstly stop the LocalDB instance from the command line by issuing the stop command as shown below:
After performing the steps outlined, we can re-run the upgrade and get the result we expected first time round.
Quick Reference
- WAStorageEmulator [/start] [/stop] [/status] [/clear] [/init] [/help]
Useful Links
Conclusion
We come to expect our upgrade experience to work almost flawlessly these days but it is always worth bearing in mind that an install is just a set of code steps written by someone like you or me using libraries with potential bugs just waiting to crop up, even with Test Driven Development (TDD), Behavior Driven Development (BDD), Integration and smarter software release cycles.