3
votes

I'm using the Windows Azure SDK for Node.js and run into an extremely odd roadblock.

I can test Azure Node.js apps locally using the Windows Azure Emulator fine, until I install Socket.io. Then the emulator refuses to start, spitting out:

Creating local package...
Starting Emulator...
Start-AzureEmulator : An unexpected failure occurred.  Details:
The compute emulator had a error: Can't locate service model..
At line:1 char:20
+ Start-AzureEmulator <<<<  -Launch
    + CategoryInfo          : CloseError: (:) [Start-AzureEmulator], InvalidOperationException
    + FullyQualifiedErrorId : AzureDeploymentCmdlets.Cmdlet.StartAzureEmulatorCommand

Odd thing is, I can deploy the same code/project to Azure, and it runs fine. Only the emulator refuses to work.

What is also odd is that I can't replicate this on a different computer. It seems to only be an issue on my main work box. I've tried npm cache clear to get a fresh install of Socket.io. I've uninstalled and re-installed the Azure SDK, Azure Emulators, and Azure Node.js tools. Nothing has fixed the issue.

Any ideas? It is getting mighty frustrating to only be able to test after a 10-15 minute deploy to the cloud.

UPDATE:
I should clarify that this scenario is happening with only a worker role (no web roles).

5

5 Answers

3
votes

On a hunch (because I think I may have had a similar error elsewhere in the past), I shortened the name of my project directory which resolved the issue.

I've a feeling it may be to do with the length of the path to the project files in the filesystem. I know TFS has similar issues. I usually try to keep all my projects in C:\Dev and not have too many nested directories or long project names.

There may be other reasons for seeing this error, but this resolved the issue in my case.

1
votes

Are you using the Express framework in a web role? I ran into a permissions problem (which this may well be another symptom of) with the basic sample of using the Express framework with node.js in a web role in the emulator.

This is caused by a packaging bug. The workaround is to delete the server.js.logs directory from the web role. You can then turn off IISNode logging using the loggingEnabled parameter.

0
votes

We have a fix on the way for this in our next SDK update which will be shortly.

0
votes

This issue appears to have been fixed with the release of the Windows Azure SDK for Node.js - August 2012 (Version: 0.6.2). This can be installed via Web Platform Installer 4.0.

-2
votes

"Would there happen to be any workarounds right now?"

I realise I have minimal reputation on StackOverflow but my earlier post did contain the phrase "The workaround." (And thanks to Glenn and his team for getting me there, on another forum.)