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

Commandlet now found - needs restart #610

Closed
mariotoffia opened this issue Nov 29, 2017 · 1 comment
Closed

Commandlet now found - needs restart #610

mariotoffia opened this issue Nov 29, 2017 · 1 comment

Comments

@mariotoffia
Copy link

Hi,

We're using powershell as a azure function and it has on two occasions out of the blue failed to find commandlets. The only thing to resolve it is to restart the function app.

The strange thing is that it works when running kudu PowerShell console, even while azure function fails.

Here's a sample log:

2017-11-29T07:21:55  Welcome, you are now connected to log-streaming service.
2017-11-29T07:22:55  No new trace in the past 1 min(s).
2017-11-29T07:23:34.195 Function started (Id=8d2d069d-3cdc-4223-b5fb-d34a02674e5a)
2017-11-29T07:23:49.309 New-AzureStorageContext : The term 'New-AzureStorageContext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at New-DdwAuthContext<Process>, D:\home\site\wwwroot\modules\DuctusDigitalWorkspace\NewAuthContext.ps1: line 251
at run.ps1: line 45
+ New-AzureStorageContext
+ _______________________
    + CategoryInfo          : ObjectNotFound: (New-AzureStorageContext:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
2017-11-29T07:23:49.372 Webhook invoked from web: https://dataductus.sharepoint.com/sites/Test
2017-11-29T07:23:49.372 {"value":[{"subscriptionId":"303dbbda-4674-49a4-8fea-8ac9e81bccec","clientState":"ddw-listitem-Dokument","expirationDateTime":"2018-03-28T05:53:44.0000000Z","resource":"630d2629-bc64-4b18-a0e6-b0fe955ebc38","tenantId":"f84f6fe6-b0e4-4db1-b7d6-b7c280fb507f","siteUrl":"/sites/Test","webId":"fd9cd993-e41b-4ed2-b07f-f1b382ff2d0b"}]}
2017-11-29T07:23:50.296 Get-AzureStorageQueue : The term 'Get-AzureStorageQueue' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at Add-DdwQueueMessage<Process>, D:\home\site\wwwroot\modules\DuctusDigitalWorkspace\Storage\AddQueueMessage.ps1: line 71
at run.ps1: line 63

Cheers,
Mario

@jeffhollan
Copy link
Contributor

This likely may be a quirk with how PowerShell runs today in experimental mode as [explained here] (https://github.com/Azure/Azure-Functions/wiki/Language-support).

@tohling not sure if you have any ideas what this may be as I know you've dealt with this a bit in the past?

In meantime best issue to track the fix to this would actually be PowerShell support in v2 which is being tracked here:

#585

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