-
Notifications
You must be signed in to change notification settings - Fork 344
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
[BUG] - Azure Durable Function - PowerShell 7.2 Issue #2823
Comments
This is a known issue in the combination of PnP.PowerShell and Azure Functions version 4. A fix for Azure functions is currenlty rolling out. You can find more information in issue #2136 including possible workarounds. |
@reusto I think this maybe different. I have Azure runtime updated to 4.15.XX and can run an http trigger function with no issues on same app service. Its only if called from a durable function where I have the issues with PNP |
Oh okay, interesting and good to know would have wanted to use it in a similar setup soon as well. :/ |
@desmay @reusto I also had/have this issue (with Durable Functions) but in my scenario, I was able to resolve it (I hope!) Environment:
In my case, I was getting the above error but for Turns out PnP.PowerShell bundles version 6 of the above DLL and Az.Resources has 2. As with previous fixes, I tried setting I tried 32-bit vs 64-bit this didn't help. I tried to order my modules that were listed in resources.psd1, but it turns out that hash table is processed by the underlying .net code randomly. Next, I turned off Turns out, PnP.PowerShell doesn't load any dependencies until a command is run. So, in try { Connect-PnPOnline -ValidateConnection -Url https://localhost -CurrentCredentials } catch {} This enabled PnP.PowerShell to work without issues. But (there's always a but), the In the end, I didn't need to modify anything except:
If you don't have AzStorage you've probably got a similar scenario that you may be able to troubleshoot using the steps above. Greg |
@oobegreg Thanks for detailed steps. I will give this a try later this week. |
Closing for now. Can you please update to the latest release PS5 support has been dropped in the new release. Feel free to reopen if the issue persists. Thanks. |
Not sure how this was resolved. I have the same issue using PS 7.3 with PnP 2.1.1 running locally. (Azure functions online is ok). I believe the issue is that it is not loading .Net6 for some reason. Anyone else? |
@ChrisNotABot that's annoying to hear. I haven't had the chance to update to 2.* yet due to other commitments. @veronicageek could you please re-open? |
@oobegreg - We have bumped a lot of our underlying dependencies in the 2.1.1 update as things either get deprecated or not worked on anymore by Microsoft. PnP PowerShell But unfortunately, we have no control over other modules, and nothing we can really do if PnP PowerShell is working on its own. In case it helps: https://pnp.github.io/powershell/articles/azurefunctions.html |
Reporting an Issue or Missing Feature
Error when attempting to connect via certificate.
Connect-PnPOnline -Url "https://$tenant-admin.sharepoint.com" -Thumbprint $certThumbprint -ClientId $clientId -Tenant $tenantId
Expected behavior
Establish connection to tenant
Actual behavior
Connection fails
Result: ERROR: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (0x80131621)
Steps to reproduce behavior
Create a basic durable function and in the activity function create connection to PNPOnline and invoke with script below
Invoke-DurableActivity -FunctionName 'getGroups'
What is the version of the Cmdlet module you are running?
2.013.
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: