V17 not working

This is so consistant.  I had installed and configured AzureCP V16 on a Dev SharePoint 2016 server farm, and all worked fine.  When applying to production version was V17.  Installed correctly, but would not connect to the tenant.  In the ULS logs found this error:
Application error when access /_admin/azurecp/AzureCPSettings.aspx, Error=Could not load file or assembly 'System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies
All 2016 farms running V16 connect; All 2016 farms running V17 will not connect.
Have not recreated the AzureCP Enterprise app registration on the Azure side (don't have complete privileges to do that at this time), but that should work with either V16 or 17, correct?  I am trying to use the secret value when connecting.

AzureCP uses 17 NuGet package Microsoft.IdentityModel.Clients.ActiveDirectory 5.2.6, which requires System.Net.Http (>= 4.3.4).
I think it's the cause of the issue, even though logs show that it tries to load System.Net.Http.dll V4.2.
Can you try the following script:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

Yvan,
When running:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
I get:
"Could not load file or assembly 'System.Net.Http, Version=<IP_ADDRESS>,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file
specified."
However, when running:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
It finds and loads the proper assembly.  This is a SharePoint 2016 farm running on Windows 2016.  This is consistent across SharePoint 2016 farms.
Thank you,
John Harbach
Alion Science and Technology
301-693-9692 (mobile)
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Monday, October 19, 2020 11:15 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
AzureCP uses 17 NuGet package Microsoft.IdentityModel.Clients.ActiveDirectory 5.2.6https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory/5.2.6, which requires System.Net.Http (>= 4.3.4).
I think it's the cause of the issue, even though logs show that it tries to load System.Net.Http.dll V4.2.
Can you try the following script:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Yvand/AzureCP/issues/104#issuecomment-712235850, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP42BNT4RIJK7UH7DYNB7ZDSLRJWLANCNFSM4ST26E5A.

What is the version of .NET framework installed on the SharePoint servers?

Based on RegEdit and MS Docs, my production farms appear to be running 4.7.  I have a lower level 2016 environment also not working that is running 4.6.2.

This is my most recent reply (I went to the site to provide comment):
Based on RegEdit and MS Docs, my production farms appear to be running 4.7. I have a lower level 2016 environment also not working that is running 4.6.2.
My farms should be pretty much standard, so I guess the question now is whether I can install a .Net update to get the proper assemblies, or whether I should wait for a new installation to be released, or simply revert to V16?
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Tuesday, October 20, 2020 2:53 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
What is the version of .NET framework installed on the SharePoint servers?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Yvand/AzureCP/issues/104#issuecomment-712635094, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP42BNVTMGVZMRCIC6SDVN3SLUXUVANCNFSM4ST26E5A.

@jharbach I just added System.Net.Http.dll to release https://github.com/Yvand/AzureCP/releases/tag/17.0.20200618.1133
Can you try to add it manually to the GAC and confirm if it resolves the issue?

Yvan,
I had uninstalled v17 from my test environment and reinstalled and configured V16 to document the process, just in case we went that direction with production.  So to do your test, I updated to V17 and verified I could not connect to AzureAD.  (I did not remove and recreate the Get-SPTrustedIdentityTokenIssuer at this time.)
I used the script at https://yvand.github.io/AzureCP/Install-AzureCP.html to install the new System.Net.Http.dll to the GAC, which looked successful with this response:
GAC    Version        Location
True   v4.0.30319     C:\WINDOWS\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.EnterpriseServices.dll
Adding assembly System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a to the GAC
Assembly System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a sucessfully added to the GAC
However, when I run:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
it still errors, and when I run this:
[System.Reflection.Assembly]::Load("System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
It returns:
GAC    Version        Location
True   v4.0.30319     C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Net.Http\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\Syst...
When I drill down into C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Net.Http\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a, it contains the older DLL, so where did it install the new one?
I’ll keep looking, but I’m pretty confused.  Obviously, I’m not a .Net developer.
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Wednesday, October 21, 2020 11:55 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
@jharbachhttps://github.com/jharbach I just added System.Net.Http.dll to release https://github.com/Yvand/AzureCP/releases/tag/17.0.20200618.1133
Can you try to add it manually to the GAC and confirm if it resolves the issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Yvand/AzureCP/issues/104#issuecomment-713677198, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP42BNVUZS6DTYUQIRWNFLLSL373VANCNFSM4ST26E5A.

@jharbach thank you for the test.
NuGet package System.Net.Http has a dependency on System.Security.Cryptography.X509Certificates (>= 4.3.0), so might be that, but it's an old dependency so I don't buy it.
On the SharePoint server, can you try to load System.Net.Http.dll in ILSpy and check if you can resolve all the references?

Yvan,
This is probably getting beyond me—I’m not a developer, I’m a system administrator.  I’m using the installable version of your tool because Microsoft recommended it (although made it clear they did not support it).  Version 16 clearly works on my SharePoint 2016 farms (without Visual Studio installed) and Version 17 doesn’t.  I am prepared to move forward with V16, as I have no other choice.  This is so consistent, there must be hundreds (if not thousands) of admins who have seen this issue.
That being said, thank you very much for developing this application to fill a void and diligently maintaining it.
Thank you,
John Harbach
Alion Science and Technology
301-693-9692 (mobile)
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Thursday, October 22, 2020 10:05 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
@jharbachhttps://github.com/jharbach thank you for the test.
NuGet package System.Net.Httphttps://www.nuget.org/packages/System.Net.Http/ has a dependency on System.Security.Cryptography.X509Certificates (>= 4.3.0)https://www.nuget.org/packages/System.Security.Cryptography.X509Certificates/, so might be that, but it's an old dependency so I don't buy it.
On the SharePoint server, can you try to load System.Net.Http.dll in ILSpyhttps://github.com/icsharpcode/ILSpy and check if you can resolve all the references?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Yvand/AzureCP/issues/104#issuecomment-714517637, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP42BNQI7X325EKDET5WDJTSMA3ZBANCNFSM4ST26E5A.

@jharbach I understand. I was never able to reproduce this issue despite I run automated tests for SharePoint 2013 (Windows Server 2012 R2), SharePoint 2016 (Windows Server 2019) and SharePoint 2019 (Windows Server 2019).
So it's difficult for me to identify what DLL is missing, and I really want to avoid adding the so many assemblies (about 30)...

Yvan,
Thank you for the reply.
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Monday, October 26, 2020 10:16 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
@jharbachhttps://github.com/jharbach I understand. I was never able to reproduce this issue despite I run automated tests for SharePoint 2013 (Windows Server 2012 R2), SharePoint 2016 (Windows Server 2019) and SharePoint 2019 (Windows Server 2019).
So it's difficult for me to identify what DLL is missing, and I really want to avoid adding the so many assemblies (about 30)...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Yvand/AzureCP/issues/104#issuecomment-716574991, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP42BNQIAZBVEUMAXGIM2W3SMWADBANCNFSM4ST26E5A.

My bad, I typed too fast, SharePoint 2016 runs in Windows Server 2016... And I never reproduced the issue, sadly...
(I'll update my comment above)

@jharbach for your information, I'm updating the build pipeline for next version to include a separate package with all dependent assemblies.
Then I'll provide a script to manually install all missing assemblies in the GAC of SharePoint servers.
The reason why I don't include all dependent assemblies in the WSP package is that there are way too many (111!), and I expect that they are already present most of the time. Only a few (I don't know which because I never reproduced this issue) are missing, and the script will take care of identifying and installing them.
In fact, if you agree, I'll be curious if you could test it and let me know what assemblies are actually missing.

I’d love to help resolve this, but, unfortunately, my lower-level environment I was using for testing is no longer available, and it will be at least a few days before I can restore or rebuild it. As stated earlier, I’m not a developer, so I’m really only testing the installation process.  When I can get my environment working, is there a specific installation distribution you want me to test?
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Tuesday, November 3, 2020 4:11 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
@jharbachhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjharbach&data=04|01|jharbach%40alionscience.com|8f798ab1ed76489307f008d87fd869ff|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637399914775614781|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=Hg6UwJJaKW%2F2BCFdPXDm284x9FXrDYkDLC2wzeULt98%3D&reserved=0 for your information, I'm updating the build pipeline for next version to include a separate package with all dependent assemblies.
Then I'll provide a script to manually install all missing assemblies in the GAC of SharePoint servers.
The reason why I don't include all dependent assemblies in the WSP package is that there are way too many (111!), and I expect that they are already present most of the time. Only a few (I don't know which because I never reproduced this issue) are missing, and the script will take care of identifying and installing them.
In fact, if you agree, I'll be curious if you could test it and let me know what assemblies are actually missing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Fissues%2F104%23issuecomment-720993503&data=04|01|jharbach%40alionscience.com|8f798ab1ed76489307f008d87fd869ff|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637399914775619778|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=2bq7ON%2BEbnYIy95NwMMuch2mMBh7IgSzfmlKViSjJfs%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP42BNXZMWYN6UZSTNMOVULSN7CLDANCNFSM4ST26E5A&data=04|01|jharbach%40alionscience.com|8f798ab1ed76489307f008d87fd869ff|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637399914775624773|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=HTUUZBmuZc6XbVv3Xjplqez79bGEoQdMBoomn%2Blr%2Bow%3D&reserved=0.

I published a pre-release of v18: https://github.com/Yvand/AzureCP/releases/tag/18.0.20201103.1194
You will likely have the same issue as v17, but I added archive "AzureCP-18.0.20201103.1194-dependencies.zip", which contains all the DLLs needed by AzureCP.
I'm working on a script that will use this archive to test each DLL and determine which one is missing (and add it).
I'll let you know when the script is ready.
Thanks!

@jharbach I worked on this and I suspect that assembly System.Numerics.Vectors.dll might be the cause.
To verify it, can you please run the script below on a SharePoint server (no need to install anything before)?
[System.Reflection.Assembly]::Load("System.Numerics.Vectors, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")

When I run it as provided, the system cannot find the file specified.
When I run the same thing using Version=<IP_ADDRESS>, it finds and returns the assembly.
Thank you,
John Harbach
Alion Science and Technology
301-693-9692 (Cell)
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Tuesday, November 10, 2020 9:01 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
@jharbachhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjharbach&data=04|01|jharbach%40alionscience.com|a1d245f6dcb34b4b460808d8858119cf|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406136814981270|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=qbYRjSGduYiaLQ0tap8OGqXj511jyi9CM%2FQX3a5JyII%3D&reserved=0 I worked on this and I suspect that assembly System.Numerics.Vectors.dll might be the cause.
To verify it, can you please run the script below on a SharePoint server (no need to install anything before)?
[System.Reflection.Assembly]::Load("System.Numerics.Vectors, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Fissues%2F104%23issuecomment-724720247&data=04|01|jharbach%40alionscience.com|a1d245f6dcb34b4b460808d8858119cf|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406136814981270|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=jtKIwd0pOGHVUweBTpCYaWgvBgfcjDE3T%2BUcpxYr%2Buk%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP42BNWHHUU3T7JUSX6WGSLSPFBS7ANCNFSM4ST26E5A&data=04|01|jharbach%40alionscience.com|a1d245f6dcb34b4b460808d8858119cf|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406136814991260|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=VVJ7XagID%2FEhGpH%2FZDQ72tW42Oo7i8Y4lMwwjB%2BgZjc%3D&reserved=0.

Great, thank you for the test, I'm pretty sure it's the cause of the issue:
NuGet package System.Memory has a dependency on it on .NET 4.6.1 but not on .NET 4.5, which I think can explain the randomness.
I'll add it to AzureCP package for v18, hopefully it will completely fix the problem.

Good news—that sounds encouraging!
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Tuesday, November 10, 2020 11:10 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
Great, thank you for the test, I'm pretty sure it's the cause of the issue:
NuGet package System.Memoryhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FSystem.Memory%2F&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268319347|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=%2FV4G9BndWWgBBLuUc3nPHo3jJOwnjkcMYD0SF5vqkio%3D&reserved=0 has a dependency on it on .NET 4.6.1 but not on .NET 4.5, which I think can explain the randomness.
I'll add it to AzureCP package for v18, hopefully it will completely fix the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Fissues%2F104%23issuecomment-724802581&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268319347|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=QyQStO29YF2K2TBCu3klwsmmYaRUcyyko1nmCzqkMKo%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP42BNVDGOWPPTOGDCG2CSTSPFQXBANCNFSM4ST26E5A&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268329334|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=riV3IP24IJmuUgfmR5atOUHQuugA%2BRF5EAS8JS9ucvo%3D&reserved=0.

Yvan, is there going to be a release of the V18 .wsp soon?  (Or a simple fix to V17, which is in place, but not working?)  I’m getting pressure to complete migration, and rolling back to a previous version or using a new beta version are not options that are easy to sell to management.
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Tuesday, November 10, 2020 11:10 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
Great, thank you for the test, I'm pretty sure it's the cause of the issue:
NuGet package System.Memoryhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.nuget.org%2Fpackages%2FSystem.Memory%2F&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268319347|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=%2FV4G9BndWWgBBLuUc3nPHo3jJOwnjkcMYD0SF5vqkio%3D&reserved=0 has a dependency on it on .NET 4.6.1 but not on .NET 4.5, which I think can explain the randomness.
I'll add it to AzureCP package for v18, hopefully it will completely fix the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Fissues%2F104%23issuecomment-724802581&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268319347|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=QyQStO29YF2K2TBCu3klwsmmYaRUcyyko1nmCzqkMKo%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP42BNVDGOWPPTOGDCG2CSTSPFQXBANCNFSM4ST26E5A&data=04|01|jharbach%40alionscience.com|6511577feee14259128608d885932210|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637406214268329334|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=riV3IP24IJmuUgfmR5atOUHQuugA%2BRF5EAS8JS9ucvo%3D&reserved=0.

Yes, v18 is coming, either today or tomorrow unless I spot a last minute problem in integration tests.
It is currently a pre-release: https://github.com/Yvand/AzureCP/releases/tag/18.0.20201112.1214
If all tests pass successfully, it will become the final v18 version

Yvan, sorry to bother you again, but I need to put together a migration timeline that includes the final v18 version.  I’ll test with the pre-release, but when can we expect the final v18 release?
From: Yvan Duhamel<EMAIL_ADDRESS>Sent: Thursday, November 12, 2020 10:14 AM
To: Yvand/AzureCP<EMAIL_ADDRESS>Cc: Harbach, John W<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [External]_Re: [Yvand/AzureCP] V17 not working (#104)
Yes, v18 is coming, either today or tomorrow unless I spot a last minute problem in integration tests.
It is currently a pre-release: https://github.com/Yvand/AzureCP/releases/tag/18.0.20201112.1214https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Freleases%2Ftag%2F18.0.20201112.1214&data=04|01|jharbach%40alionscience.com|b157478ce88544bf30e608d8871da118|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637407908612817367|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=T6mipiB9DL02uhBnFF7mp6cwBOgIeUPvNXRNLKdWXsU%3D&reserved=0
If all tests pass successfully, it will become the final v18 version
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FYvand%2FAzureCP%2Fissues%2F104%23issuecomment-726139954&data=04|01|jharbach%40alionscience.com|b157478ce88544bf30e608d8871da118|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637407908612817367|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=H4YzV%2BPrIn9ZT0o%2FkNeyaOt6Gp84kq6ae%2ByRu7A8wdM%3D&reserved=0, or unsubscribehttps://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP42BNTLBHU6ULXSRPHQIGDSPP3UXANCNFSM4ST26E5A&data=04|01|jharbach%40alionscience.com|b157478ce88544bf30e608d8871da118|b467f7f8a94a4b7a8d979a9b05951bd8|0|0|637407908612827366|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=rup2njzRXSrHvPMWKNAwftOLMRpKQSLuCm8ybwcPfeU%3D&reserved=0.

@Yvand , I tried to use the pre-release but I get the same error : Could not load file or assembly 'System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I am running SharePoint 2016 on Windows Server 2012 R2 DC.
.NET Version
PSChildName                      Version

v2.0.50727                       2.0.50727.4927
v3.0                             3.0.30729.4926
Windows Communication Foundation 3.0.4506.4926
Windows Presentation Foundation  3.0.6920.4902
v3.5                             3.5.30729.4926
Client                           4.7.02558
Full                             4.7.02558
Client                           <IP_ADDRESS>
.NET Dll Version : 4.7.3620.0 built by: NET472REL1LAST_B

@NaveenKanukuntla in https://github.com/Yvand/AzureCP/releases/tag/18.0.20201112.1214, can you download AzureCP-18.0.20201112.1214-dependencies.zip and unzip it in a directory on your SharePoint server.
Then, can you run the following script to find which assemblies are missing:
$assemblies = Get-ChildItem -Path "C:\Data\AzureCP-dependencies\*.dll"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
foreach ($assembly in $assemblies)
{
    $filePath = $assembly.FullName
    $assemblyFullName = [System.Reflection.AssemblyName]::GetAssemblyName($filePath).FullName
    try
    {
        # Try to load the assembly from the GAC. It will throw an exception if it fails
        $assemblyInGAC = [System.Reflection.Assembly]::Load($assemblyFullName)
        # Write-Host "Assembly $assemblyFullName is already present in the GAC" -ForegroundColor Green
    }
    catch [System.IO.FileNotFoundException]
    {
        # Assembly.Load throws a FileNotFoundException if assembly is not found in the GAC: https://docs.microsoft.com/en-us/dotnet/api/system.io.filenotfoundexception?view=netframework-4.8
        Write-Host "FileNotFoundException on assembly $assemblyFullName : $($_.Exception.Message)"
    }
    catch [System.Exception]
    {
        Write-Host "Exception on assembly $assemblyFullName : $($_.Exception.Message)"
    }
}

@Yvand : Here is the outcome
GAC    Version        Location
---    -------        --------
True   v4.0.30319     C:\Windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.EnterpriseServices.dll
FileNotFoundException on assembly Microsoft.Threading.Tasks, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'Microsoft.Threading.Tasks, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly Microsoft.Threading.Tasks.Extensions.Desktop, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'Microsoft.Threading.Tasks.Extensions.Desktop, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly Microsoft.Threading.Tasks.Extensions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'Microsoft.Threading.Tasks.Extensions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Data.Common, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Data.Common, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Diagnostics.StackTrace, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Diagnostics.StackTrace, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Diagnostics.Tracing, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Diagnostics.Tracing, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Globalization.Extensions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Globalization.Extensions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.IO.Compression, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089 : Could not load file or assembly 'System.IO.Compression, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Net.Sockets, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Net.Sockets, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Runtime.Serialization.Primitives, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Runtime.Serialization.Primitives, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Security.Cryptography.Algorithms, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Security.SecureString, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Security.SecureString, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Threading.Overlapped, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Threading.Overlapped, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException on assembly System.Xml.XPath.XDocument, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a : Could not load file or assembly 'System.Xml.XPath.XDocument, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

@Yvand : I Installed the missing assemblies using PowerShell, but now, I get this error :
Method 'AuthenticateRequestAsync' in type 'azurecp.AADAppOnlyAuthenticationProvider' from assembly 'AzureCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636' does not have an implementation.
What else am I missing ?

Too bad, I just build a new release with System.Net.Http.dll included directly in AzureCP.wsp, and I wanted to ask you to update and test if it fixes the issue.
About this new error, can you try to just do an iisreset?

@Yvand : Yes, after installing the dlls , I did perform an IISRESET.
Do you want me to try the new release ?

@NaveenKanukuntla just before you do that, can you go to the properties > Details of "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\AzureCP\v4.0_<IP_ADDRESS>__65dc6b5903b51636\AzureCP.dll" to double check that you are using the expected version?
The error message doesn't make sense tbh...

@Yvand : Here is the screenshot of the dll

Ok, it's definitely the expected one. Please test to update with the new package, but I have no explanation about the error you encounter...

@Yvand : I get the same error with the new release as well. Could I be missing some other dll ?

Can you please load AzureCP.dll from the GAC using ILSpy, and check if all its references show as "Success - Found in Assembly List":

Also, really just for the sake of a double check, can you browse to azurecp.AADAppOnlyAuthenticationProvider.AuthenticateRequestAsync and validate that you do see an implementation:

I could not open ILSpy on the Server since it required .net 4.7.2.
So, Instead I coped it to my local desktop and the AuthenticateRequestAsync method body does not match with what you show:

Probably because I am missing several assemblies on my desktop ?
// Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
	// Assembly reference loading information:
	// There were some problems during assembly reference load, see below for more information!
	// Error: Could not find reference: Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae

// Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c
	// Assembly reference loading information:
	// Info: Success - Found in Assembly List with different TFM or version: C:\Users\T6566NK\Desktop\DSAPI\Microsoft.SharePoint.dll

// mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089 (unresolved)
// Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7
	// Assembly reference loading information:
	// There were some problems during assembly reference load, see below for more information!
	// Error: Could not find reference: Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7

// System, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089 (unresolved)
// System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089 (unresolved)
// System.Data, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\WINDOWS\Microsoft.NET\assembly\GAC_32\System.Data\v4.0_<IP_ADDRESS>__b77a5c561934e089\System.Data.dll

// System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Assembly reference loading information:
	// There were some problems during assembly reference load, see below for more information!
	// Error: Could not find reference: System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

// System.Web, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\WINDOWS\Microsoft.NET\assembly\GAC_32\System.Web\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Web.dll

// Assembly load log including transitive references:
// Microsoft.Graph.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Error: Could not find reference: Microsoft.Graph.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35

// Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
	// Error: Could not find reference: Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae

// Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7
	// Error: Could not find reference: Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7

// System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Error: Could not find reference: System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

// Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c
	// Info: Success - Found in Assembly List with different TFM or version: C:\Users\T6566NK\Desktop\DSAPI\Microsoft.SharePoint.dll

// Microsoft.Graph, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Error: Could not find reference: Microsoft.Graph, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35

// System.Web, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Info: Success - Loading from: C:\WINDOWS\Microsoft.NET\assembly\GAC_32\System.Web\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Web.dll

// System.Data, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Info: Success - Loading from: C:\WINDOWS\Microsoft.NET\assembly\GAC_32\System.Data\v4.0_<IP_ADDRESS>__b77a5c561934e089\System.Data.dll

// System.Web.ApplicationServices, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Info: Success - Loading from: C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_<IP_ADDRESS>__31bf3856ad364e35\System.Web.ApplicationServices.dll

Can you try using this older version on your SharePoint machine?
It's really important to test it on the machine that fails.
Also, just in case, can you try this command:
Add-Type -AssemblyName "Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7" -PassThru | Select-Object -ExpandProperty Assembly | Select-Object -ExpandProperty FullName -Unique

@Yvand : Here is the screenshot from an older ILSPy version on my SharePoint Server

Here is the output from assembly log analyzer
// Detected Target-Framework-Id: .NETFramework,Version=v4.6.1

// Referenced assemblies (in metadata order):
// Microsoft.Graph, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Graph\v4.0_<IP_ADDRESS>__31bf3856ad364e35\Microsoft.Graph.dll

// Microsoft.Graph.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Graph.Core\v4.0_<IP_ADDRESS>__31bf3856ad364e35\Microsoft.Graph.Core.dll

// Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Identity.Client\v4.0_<IP_ADDRESS>__0a613f4dd989e8ae\Microsoft.Identity.Client.dll

// Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c
	// Assembly reference loading information:
	// There were some problems during assembly reference load, see below for more information!
	// Error: Could not find reference: Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c

// mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Assembly reference loading information:
	// Info: Success - Found in Assembly List

// Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Nito.AsyncEx\v4.0_<IP_ADDRESS>__09d695329ca273b7\Nito.AsyncEx.dll

// System, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Assembly reference loading information:
	// Info: Success - Found in Assembly List

// System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Assembly reference loading information:
	// Info: Success - Found in Assembly List

// System.Data, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_32\System.Data\v4.0_<IP_ADDRESS>__b77a5c561934e089\System.Data.dll

// System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Net.Http\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Net.Http.dll

// System.Web, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Assembly reference loading information:
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_32\System.Web\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Web.dll

// Assembly load log including transitive references:
// mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Info: Success - Found in Assembly List

// System, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Info: Success - Found in Assembly List

// System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Info: Success - Found in Assembly List

// Microsoft.Graph.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Graph.Core\v4.0_<IP_ADDRESS>__31bf3856ad364e35\Microsoft.Graph.Core.dll

// Microsoft.Identity.Client, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Identity.Client\v4.0_<IP_ADDRESS>__0a613f4dd989e8ae\Microsoft.Identity.Client.dll

// Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Nito.AsyncEx\v4.0_<IP_ADDRESS>__09d695329ca273b7\Nito.AsyncEx.dll

// System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Net.Http\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Net.Http.dll

// Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c
	// Error: Could not find reference: Microsoft.SharePoint, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=71e9bce111e9429c

// Microsoft.Graph, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Graph\v4.0_<IP_ADDRESS>__31bf3856ad364e35\Microsoft.Graph.dll

// System.Web, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_32\System.Web\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Web.dll

// System.Data, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_32\System.Data\v4.0_<IP_ADDRESS>__b77a5c561934e089\System.Data.dll

// System.Web.ApplicationServices, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35
	// Info: Success - Loading from: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_<IP_ADDRESS>__31bf3856ad364e35\System.Web.ApplicationServices.dll

Looks like Microsoft.SharePoint dll version <IP_ADDRESS> is causing it. I am running SharePoint 2016.

I just checked and yes, I do not have ver <IP_ADDRESS>

```powershell
Add-Type -AssemblyName "Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7" -PassThru | Select-Object -ExpandProperty Assembly | Select-Object -ExpandProperty FullName -Unique

Here is the output for Nito.AyncEx
Nito.AsyncEx, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=09d695329ca273b7

I recompiled your source code with SharePoint 2016  as Target project. Generated a new wsp. I still get the same error :
Method 'AuthenticateRequestAsync' in type 'azurecp.AADAppOnlyAuthenticationProvider' from assembly 'AzureCP, Version=18.0.16024.1214, Culture=neutral, PublicKeyToken=12338a6b598a921d' does not have an implementation.

I just tested (again) the new version on a SharePoint 2016 farm and it works just fine.
The server seems to be missing something but I have no idea what this is. Also, the decompiled code of method azurecp.AADAppOnlyAuthenticationProvider.AuthenticateRequestAsync() is very different from my environments. In fact yours looks very much better, but I wonder if it can explain the issue. In this method, I use Nito.AsyncEx.AsyncLock to wrap the function into a helper to handle locking correctly in async.
I wonder if the machine could be missing some async .NET assemblies to handle that.

@Yvand : I have a feeling it could be requiring .NET 4.7.2 or higher

@NaveenKanukuntla I think I know why.
I use Nito.AsyncEx.StrongNamed instead of Nito.AsyncEx because it is strong named. I thought they were aligned, but they are not: Nito.AsyncEx.StrongNamed seems not maintained and has dependencies on Microsoft.Bcl* that I think you are missing, it would explain the issue.
In the short term, let me build a new package of AzureCP with those 3 Microsoft.Bcl* dlls, so you can test it and let me know if it works

@Yvand : Yes, I was just looking at the same thing, dependencies for Nito.AyncEx. I was checking my GAC for Microsoft.Bcl dlls. Do not see them anywhere.
I will wait for your new build. I have a demo tomorrow , So I am trying to get it to work.

Well, really sorry but for some reason, I cannot get the Microsoft.Bcl* DLLs, even after adding all NuGet packages.
Maybe you can try to add them manually on your server for your demo (I really think it's the issue).
On my side, I'll work on replacing Nito.AsyncEx.StrongNamed with Nito.AsyncEx.
Overall it's a positive change, but I need to update the build pipeline to strongly sign the package, I saw a post about that here.

@NaveenKanukuntla can you please give a try to https://github.com/Yvand/AzureCP/releases/tag/18.0.20201119.1228 ?

@Yvand I have tested it and I still get the same error :
Method 'AuthenticateRequestAsync' in type 'azurecp.AADAppOnlyAuthenticationProvider' from assembly 'AzureCP, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=65dc6b5903b51636' does not have an implementation.
For now, I am using V16. As the demo is in another 4 hours today.

It's so weird, I updated AzureCP to use the latest Nito.AsyncEx, which has very different dependencies compared to the outdated Nito.AsyncEx.StrongNamed, and yet you continue to get the issue.
I have it working like a charm on my automated CI test: a fresh new SharePoint 2016 / Windows Server 2016 DC with .NET framework 4.7.3620 (version of "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll")

I believe , there is a dependency on .NET 4.7.2 or above
I will try to see if my Windows team can update the .net version and let you know what happens.
Anyways, thank you very much for diligently trying to solve the issue.

No worries, I want this to work and get rid of this kind of ridiculous setup issues.
Based on your previous comment https://github.com/Yvand/AzureCP/issues/104#issuecomment-729252011 you are already running with version 4.7.3620 (same as me)
I have a theory:
Both Nito.AsyncEx (through a dependency on System.Collections.Immutable) and Microsoft.Graph.Core (through a dependency on System.Diagnostics.DiagnosticSource) have a dependency on System.Memory, but the subtlety is that I think one has it through .NET Standard 2.1 and the other through .NET Framework 4.6.1.
When restoring packages NuGet makes a choice, and it may be that (bad?) choice that is causing the issue.
I get this suspicion after reading this article, especially the little "2" note, as AzureCP currently targets .NET Framework 4.6.1...

Well, I just tested to switch the TargetFrameworkVersion of AzureCP from v4.6.1 to v4.7.2, and the result is pretty spectacular:
It reduced the number of dependencies from 115 (!!) to 18, so I'm very seriously thinking about changing that for good.
The downside is that SharePoint 2013+ require only 4.5, so some would need to update specifically for using AzureCP, but 4.5 is no longer supported and 4.7.2 was released in 2018, so it shouldn't be so problematic

Thank you Yvan. If you have the new solution ready, which is targeting 4.7.2. I will give it a shot and test it for you.

Here it is (I'll run CI tests only tomorrow): https://github.com/Yvand/AzureCP/releases/tag/18.0.20201119.1236

@NaveenKanukuntla were you able to test latest release? FYI on Friday I published a new one: https://github.com/Yvand/AzureCP/releases/tag/18.0.20201120.1245

@Yvand : Sorry, was busy in configuring and demoing the V16 version. Sure, let me test it today and I will let you know how it goes.

@Yvand : I Installed and now I get the previous error
File not Found :  System.IO.FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I think it could be due to some .net framework dependencies, it does work on windows server 2016 though, but my current environment is win 2012 R2

It's so weird because:

Since I switched TargetFrameworkVersion to v4.7.2, System.Net.Http.dll is not longer referenced at all in the project, and it's no longer added to the bin folder during compilation
My dev box is a Win 2012 R2 with .NET 4.8 and the only System.Net.Http.dll present in the GAC is Version=<IP_ADDRESS>
I truly don't understand what keep trying to load this assembly in your environment...

@Yvand : Thanks for looking into this, it might as well be an issue with the box I have. Anyways, I did install the latest version on my other dev SharePoint 2016 / Win 2016 box and upgraded it to the latest version you have.
Works just fine. No issues there.

Perfect! FYI I made version 18.0.20201120.1245 the final public release for v18.
I'll close this issue, can you please open a new one for the "Return security-enabled groups only" ?


MarkedLinksPlugin fails to resolve symbol reference when copying documentation

Search terms
MarkedLinksPlugin, comment, function, copy
Expected Behavior
When referencing the method of an interface, the documentation of the method is copied without errors.
Actual Behavior
> npx typedoc
Warning:
[MarkedLinksPlugin]: Found invalid symbol reference(s) in JSDocs, they will not render as links in the generated documentation.
  In example - v1.0.0: {@link stableOut}

Steps to reproduce the bug
index.ts
/**
 * Some documentation for FAIterator.
 */
export interface FAIterator<S> {
	/**
	 * A link to {@link stableOut}.
	 */
	readonly getOut: (state: S) => Iterable<S>;
	/**
	 * Some documentation for stableOut.
	 */
	readonly stableOut?: boolean;
}

/**
 * Some docs for foo.
 */
export function foo<S>(
	getOut: FAIterator<S>["getOut"],
	stableOut = false
): void {
	throw new Error("Not implemented")
}

The problem is that I use FAIterator<S>["getOut"]. This will copy over its documentation along with a JSDoc reference to FAIterator#stableOut. However, it seems that the MarkedLinksPlugin tries to resolve the JSDoc reference after the doc has been copied and then resolves {@link stableOut} as the parameter stableOut for which it cannot create a link to. The parameter stableOut is necessary for this bug to occur.

Here is a small example project.
Environment

Typedoc version: 0.22.6
TypeScript version: 4.4.4
Node.js version: v16.11.1
OS: Win10 64 bit

I think this is going to be a wontfix. Dealing with inherited methods and wanting them to properly link to the current class seems more likely to me than inheriting a comment that then fails to resolve. There's a workaround if you want to link to the interface itself - just specify a more fully qualified link, e.g. FAIterator.stableOut


Save and load a dataframe (for testing purposes)

Its very important to have an easy access save/load functionality for the dataframe.
This should be also implmeneted for multiple file formats (parquet,hdf5,...)

The most important formats to start with are hdf5 and .tiff
for HDF5 we need to discuss a standard structure and namings, but having some simple starting point soon is better than a perfect system later.
.tiff stacks are important for the first user case we will deploy to, which require .tiff stacks to perform their analysis.

Regarding h5 files, I would be as general as possible.
Ideally, I'd like to be able to open h5 files with the European XFEL library (https://github.com/European-XFEL/EXtra-data) and continue the analysis from there.

Excellent starting point @rettigl, we might think of a better group structure, but that is not super-urgent.
I am not familiar with the EXtra-data format, but would agree we must provide output for that one too.
@daviddoji, would you be willing to write the converter function for that format?

Excellent starting point @rettigl, we might think of a better group structure, but that is not super-urgent. I am not familiar with the EXtra-data format, but would agree we must provide output for that one too. @daviddoji, would you be willing to write the converter function for that format?

I guess that we agree on that the logic for the computation has to be independent from the logic of reading h5 files.
No matter how you read the files, the output of this reading process has to be identical for whatever format/facility, so we can fed the results directly to the computation logic.
I would need to know a couple of things before writing the "converter" function:

how and what the EuXFEL DAQ saves into files?
which data is needed for the computation?

First question is still under discussion, as we don't still have a detector in place at EuXFEL. For the second question, I asked you for a quick chat ;)


delay in a per-rule basis, not per-field basis

Versions:

VueJs: #.#.#
Vee-Validate: #.#.#

Description:
In a rule like "required|email|isUnique" where isUnique is a custom async rule, using a data-vv-delay is a very good choice (to avoid a lot of requests sent to the server as user writes)
BUT in such cases required will ALSO be delayed.
I think data-vv-delay should be passed to the rule as an rule option instead a field attribute.
Steps To Reproduce:

Closing since it can be done from your rule implementation, like batching requests and/or basic debouncing.


Adding some useful additional fields that the GoogleGeo Api provides

Maybe some other fields like "street number" or "county" might be useful...

I've added this to a different repo that will be used for the new plugin location. http://github.com/brandrco/grav-plugin-events


Change the colour of loading

Changing the colour of loading as it is really similar to background and we can't know of it's there of not.
I am a Contributor for GSSoC 2024. Please assign this issue to me!

I want to work on this project. please assign it to me

Hey @Rakshit-gen and @Nehakumari1208, there is an issue regarding UI changes #20
Please work on other issues for now. Good luck.


Queueing a build fails with poor error message

I tried queue a build and received this error:
root : 'NoneType' object has no attribute 'message'

That wasn't very helpful, so I added --debug and got something a bit more helpful:
msrest.http_logger : b'{"ClassName":"Microsoft.TeamFoundation.Build.WebApi.BuildRequestValidationFailedException","Messa
ge":"Could not queue the build because there were validation errors or warnings.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-
2146232832,"Source":null,"WatsonBuckets":null,"m_logException":false,"m_reportException":false,"m_errorCode":0,"m_logLevel":"warning","m_eventId":3000,"ValidationResults":[{"result":"error","message":"An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: ."}]}'

Here's the important part I think:
An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: .

I don't think there is anything wrong with the YAML - builds from the UI work just fine.

@lzybkr looks like there are at least two issues here.  The first is that this api isn't sending the exception back in the standard way that the service typically does.  We will need to update our code to account for that.  The second is that the service is returning an exception message that is not very helpful.  When you ran your command did you specify a source branch?  If not give that a try, ans see if the error goes away.

That did help - our default branch is not master, nor do we have such a branch, but specifying the branch worked. Thanks.

partial fix for error message issue in Microsoft/vsts-python-api#27

@lzybkr My recently merged PR here will help you in the future.

Filed two bugs last week on the build team for the service.  We will be able to provide a more detailed message, once these bugs are addressed.


KAAE is moving! Introducing SENTINL

Dear Users,
First of all: Thank YOU for testing, using and supporting KAAE during the last months! Your interest and input were fundamental to drive the motivation required to forge and lift the project out of his "experimental" status into a fully working concept with good potential for the community - still a long way ahead!
This is why QXIP and SIREN Solutions decided to partner up and join efforts to develop and expand the project into a mature stable tool ready to become a solid part of a larger ecosystem - not limited to Elastic!
Say Hello to SENTINL!

Over the next days and weeks, we'll migrate the project to its new identity and start pushing new features - watch out for our official announcement, and stay ready to upgrade our favorite Watch-Maker!
PS: Nothing will change from a licensing perspective, so all you'll have to do is migrate to the new plugins - all indices will remain shared and valid during the migration.
Feel free to post your comments and notes here until it's all done and tested!
Thanks again for being part of our wonderful community and for supporting KAAE!

Rebranding to SENTINL has been completed and latest changes merged.
With very few cosmetic exceptions, the transition should be smooth for existing users. If you are experiencing any issue after upgrading, please post here or open a dedicated issue - thanks in advance!

For users migrating across, please make sure you copy over the new sentinl.json config to your system's /etc folder and update your settings accordingly.


Shop App Setup

I'm submitting a ...

[x] feature request

Setting up the shopping app.

Resolved in https://github.com/RommelTJ/rn-shop-app/pull/4


Change enum casing to camelCase

With this pr I added the ReCase function to change enum casing to camelcase.
I did this because camelcase is the standard casing format for enums in dart.
This fixes #122

I did not change the CHANGELOG file because I wasn't sure about which version to put in.

I tested it with my pretty huge project and everything is working now.
Can anyone review this please?

We are working on naming issues in #141 #142

@vasilich6107 I don't really understand why you would reference pr #141 in this pr as this pr is #141 🤔

Mistyped))) I mean #140

Hey @lazylazyllama,could you rebase this PR?

Sure :)

I think I won't be able to fix the tests/linter right now, but if you do it, I can merge right away!

I would love to do that, but right now I have no idea how the test works and which test is failing:
https://github.com/comigor/artemis/pull/141/checks?check_run_id=692958221
I don't see any errors there ... It just looks like the test just stops and says it failed .. for no reason 🤔

This could definitely be clearer. The linter is acusing something on the lib/generator.dart file:
lib/generator.dart```

I'll try to make actions clearer (and post the errors on the PR in the future)

Done :)

Thanks! I've just changed it to bump a minor, just to keep little tracking on breaking changes.


services/horizon/expingest: False positive from StateVerifier

What version are you using?
Horizon 0.23.1, 0.24.0 RC
What did you do?
After processing pubnet checkpoint ledger 27207615 state verification failed after a couple seconds with the following error:
addAccountsToStateVerifier failed: Entry does not match the fetched entry. Expected: AZ8nvwAAAAAAAAAADq+QhtWseqhtnwRIFyZRdLMOVtIqzkujfzUQ22rwZuEAAAEcJOKW6QDjhboAAH7VAAAAAAAAAAEAAAAAnaQ/bEto5UuPoNHBfWYzIDSa5tidi+7SDw52gOrFe4UAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== (pretransform = AZ8nvwAAAAAAAAAADq+QhtWseqhtnwRIFyZRdLMOVtIqzkujfzUQ22rwZuEAAAEcJOKW6QDjhboAAH7VAAAAAAAAAAEAAAAAnaQ/bEto5UuPoNHBfWYzIDSa5tidi+7SDw52gOrFe4UAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==), actual: AZ8nvwAAAAAAAAAADq+QhtWseqhtnwRIFyZRdLMOVtIqzkujfzUQ22rwZuEAAAEcEWT3KQDjhboAAH7VAAAAAAAAAAEAAAAAnaQ/bEto5UuPoNHBfWYzIDSa5tidi+7SDw52gOrFe4UAAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

XDR view: expected, actual.
This occurred in multiple Horizon servers after processing the ledger above.
The difference seems to be due to transaction ea1e9...30f6a. The difference in account balance is 32.7 XLM. After checking the database state manually the balance of the account above was correct. After marking the state as valid manually (exp_state_invalid=false in key_value_store) the consecutive state verifications did not find any differences between DB state and state in history archive.

I don't think it's a false positive. I was able to reproduce this error consistently.
In ledger 27207615, there were two transactions which affected the balance of account GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A.
the first transaction was https://horizon.stellar.org/transactions/ea1e96dd4aa8a16e357842b0fcdb66c1ab03fade7dcd3a99f88ed28ea8c30f6a
this transaction was applied correctly to the database.
the second transaction in ledger 27207615 which affected GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A was:
https://horizon.stellar.org/transactions/b7ce88831f0e79aa0cfe3665cd360ca41ce5e24c77e254852184a143589ee29c
the LedgerEntry included in this transaction can be viewed here:
https://www.stellar.org/laboratory/#xdr-viewer?input=AZ8nvwAAAAAAAAAADq%2BQhtWseqhtnwRIFyZRdLMOVtIqzkujfzUQ22rwZuEAAAEcEWT3KQDjhboAAH7VAAAAAAAAAAEAAAAAnaQ%2FbEto5UuPoNHBfWYzIDSa5tidi%2B7SDw52gOrFe4UAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAA%3D&type=LedgerEntry&network=public
the balance applied to the account matches the value which appeared in the state verification error.
Interestingly, transaction b7ce88831f0e79aa0cfe3665cd360ca41ce5e24c77e254852184a143589ee29c is actually a failed transaction.
We used to ignore failed transactions in the database ledger processor but we removed that check in this PR:
https://github.com/stellar/go/pull/1906/files#diff-df00ac69b2afa913cd5937949c83c929L127
I think we need clarification on how ingestion should handle failed transactions because it seems like, if we did not update the database with the change from this failed transaction then, our database would have been consistent with the history archive snapshot and we wouldn't have triggered the state verification error.

@tamirms great catch! I found a data race in the pipeline (https://github.com/stellar/go/issues/2046) and I was about to confirm if it's really a root cause today but it seems you are right.
It looks the root cause is that we are processing fee meta, then tx meta for each transaction but we should process ALL fee metas (of all txs) first and then ALL tx metas (of all txs). In other words we process:
TX1_FEE_META, TX1_TX_META, TX2_FEE_META, TX2_TX_META, ...

but we should:
TX1_FEE_META, TX2_FEE_META, TX1_TX_META, TX2_TX_META, ...

It's incredible that we haven't seen this before but at the same time it's great that StateVerifier helped again and that we still serve /accounts/{id} data from stellar-core db.
I'm going to prepare a fix soon.

Fixed in https://github.com/stellar/go/pull/2050.


Exponential increase of computation time with growing number of modules

The Analyzer takes exponentially longer with increasing number of modules in a project.

I did a full analysis of the coderadar project with all 7 gradle modules added as modules via the REST API. I did not observe an overly long analyzing duration. Also, the /deltaTree endpoint returned metrics in acceptable time (a couple seconds, which is not longer than without modules).
@pschild: could you elaborate on the performance problems you observed, so I can try to reproduce?

Assumption: the time for analyzing a project is not affected by the number of modules, but the time for querying the /deltaTree endpoint.

The issue seems not to have sth. to do with any modules. I could observe an increasing of the time between single "associating"-jobs and at this point of time, no modules were saved at all.
I did a test with the JUnit repo: https://github.com/junit-team/junit4
You can have a look at the timestamps to see how the time increased.
At the beginning, the jobs ran through very quickly:
2017-02-01 19:45:26.387...starting associating files of commit...
2017-02-01 19:45:26.539...starting associating files of commit...
2017-02-01 19:45:26.604...starting associating files of commit...
2017-02-01 19:45:26.675...starting associating files of commit...
...
After one hour:
2017-02-01 20:45:19.306...starting associating files of commit...
2017-02-01 20:45:35.686...starting associating files of commit...
2017-02-01 20:45:53.483...starting associating files of commit...
2017-02-01 20:46:12.810...starting associating files of commit...
...
The last ones before cancelling:
2017-02-01 21:26:30.677...starting associating files of commit...
2017-02-01 21:26:59.593...starting associating files of commit...
2017-02-01 21:27:34.463...starting associating files of commit...
2017-02-01 21:28:04.770...starting associating files of commit...
...
When I cancelled, there were 1.189 of 2.159 commits merged (merged = 1), and 970 were still to be done (merged = 0).
For the deltaTree endpoint I will do another test ;-)

Moving discussion of slow file association to issue #156 .

Hi,
regarding the performance of querying the deltaTree endpoint, I did some tests with my visualization tool (in the browser) for the project Coderadar itself:
Without any module the querying time is around 2,8s.
After adding the module "coderadar-server", querying time is around 9,3s.
After adding the module "coderadar-plugins", querying time is around 9,9s.
After adding the module "coderadar-plugin-api", querying time is around 10,1s.
After adding the 4 plugin modules, querying time is around 10,1s.
So the time increased by adding modules and there should be done some optimization in order to handle bigger projects as well :)

Try again with the current version, please. The database is now created with liquibase instead of Hibernate and contains indices. My tests show that /deltaTree is now much faster (1 sec instead of a minute in my test)

This should be fixed with the switch to Neo4j. Evaluate again after the switch.

No longer an issue after the refactoring.


Maybe add some more graphics quality settings to speed rendering on low end machines

OpenGL ES 2.0 fixed this


Improve typing of jax.jit

Fix for #23719

Thanks for the contribution! See #14688 for a past attempt at this, the things that went wrong, and some discussion of the considerations around a change like this.

Thanks @jakevdp  for the prompt response.
After this change, the MyPy type checker in the pre-commit hook now becomes aware of typing issues that were already present in the codebase. Would it normally be expected for this PR to also include fixes for these typing issues as well? Or should that be done in a separate PR?

Yeah, newly discovered issues need to be fixed or silenced, because otherwise merging the PR will break our CI.
Could you given an example of the issue you discovered, please?

I just rebased the PR to only improve the typing of jax.jit. I'll make another PR to add type hints to jax.eval_shapes, JitWrapped.eval_shapes JitWrapped.trace.
Here are the typing issues that the MyPy pre-commit hook now sees within the codebase, now that the signature of the callable isn't dropped by jax.jit:
jax/_src/numpy/ufunc_api.py:177: error: Argument 1 to "__call__" of "Wrapped" has incompatible type "*tuple[Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex, ...]"; expected "ufunc"  [arg-type]
jax/_src/numpy/array_methods.py:171: error: Argument "axis" to "__call__" of "Wrapped" has incompatible type "int | Sequence[int] | None"; expected "int | None"  [arg-type]
jax/_src/numpy/array_methods.py:179: error: Argument "axis" to "__call__" of "Wrapped" has incompatible type "int | Sequence[int] | None"; expected "int | None"  [arg-type]
jax/_src/lax/linalg.py:1665: error: Argument 1 to "__call__" of "Wrapped" has incompatible type "Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex"; expected "Array"  [arg-type]
jax/_src/lax/linalg.py:1665: error: Argument 2 to "__call__" of "Wrapped" has incompatible type "Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex"; expected "Array"  [arg-type]
jax/_src/lax/linalg.py:1665: error: Argument 3 to "__call__" of "Wrapped" has incompatible type "Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex"; expected "Array"  [arg-type]
jax/_src/numpy/lax_numpy.py:1127: error: Argument 2 to "__call__" of "Wrapped" has incompatible type "int | Sequence[int] | None"; expected "int | tuple[int, ...] | None"  [arg-type]
jax/_src/numpy/lax_numpy.py:1985: error: Argument 2 to "__call__" of "Wrapped" has incompatible type "tuple[int, ...] | None"; expected "tuple[int, ...]"  [arg-type]
jax/_src/numpy/lax_numpy.py:7228: error: Unused "type: ignore[arg-type, operator]" comment  [unused-ignore]
jax/_src/third_party/scipy/special.py:275: error: Incompatible types in assignment (expression has type "Array", variable has type "float")  [assignment]
jax/_src/third_party/scipy/special.py:276: error: Incompatible types in assignment (expression has type "Array", variable has type "float")  [assignment]
jax/_src/scipy/linalg.py:222: error: Overloaded function implementation does not accept all possible arguments of signature 1  [misc]
jax/_src/scipy/linalg.py:222: error: Overloaded function implementation does not accept all possible arguments of signature 2  [misc]
jax/_src/scipy/linalg.py:222: error: Overloaded function implementation does not accept all possible arguments of signature 3  [misc]
jax/_src/scipy/linalg.py:548: error: Argument 1 to "__call__" of "Wrapped" has incompatible type "Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex"; expected "Array"  [arg-type]
jax/_src/scipy/cluster/vq.py:73: error: No overload variant of "getitem" matches argument types "Array", "Array"  [call-overload]
jax/_src/scipy/cluster/vq.py:73: note: Possible overload variants:
jax/_src/scipy/cluster/vq.py:73: note:     def [_T] getitem(Sequence[_T], slice, /) -> Sequence[_T]
jax/_src/scipy/cluster/vq.py:73: note:     def [_K, _V] getitem(SupportsGetItem[_K, _V], _K, /) -> _V
jax/_src/scipy/special.py:1808: error: Argument 5 to "__call__" of "Wrapped" has incompatible type "int | None"; expected "int"  [arg-type]
Found 17 errors in 8 files (checked 511 source files)

What is the typical way that such typing errors are silenced in this project? Do you prefer # type: ignore comments or typing.cast ?

I am pretty sure this will break a lot of other targets internally too making this change very difficult to land.

Yeah, #14688 was eventually blocked by the fact that pytype doesn't properly suppot ParamSpec. I'm not sure whether that's changed in the meantime.

Some of the errors reflect that the jit annotation in this PR is not correct. For example this one:
jax/_src/lax/linalg.py:1665: error: Argument 1 to "__call__" of "Wrapped" has incompatible type "Array | ndarray[Any, Any] | bool_ | number[Any] | bool | int | float | complex"; expected "Array"  [arg-type]

It basically comes down to something like this:
@jit
def _lu_solve(x: Array):
  ...

def lu_solve(x: ArrayLike):
  return _lu_solve(x)  # <- type error, because ArrayLike is not Array

However, when you wrap a function with jit, all ArrayLike inputs are implicitly converted to Array before being passed to the wrapped function. So in some senses this annotation is correct, and the mypy error is a false-positive due to the new jit annotation.
What do you think?

re: @superbobry -  I silenced the new typing errors that mypy raised in the pre-commit hook.
re @jakevdp :

However, when you wrap a function with jit, all ArrayLike inputs are implicitly converted to Array before being passed to the wrapped function. So in some senses this annotation is correct, and the mypy error is a false-positive due to the new jit annotation being stricter than it needs to be.

I agree. In my view, this only encourages internal jax source to be more explicit, by not depending on this (somewhat implicit) conversion from ArrayLike to Array.

re: @yashk2810

I am pretty sure this will break a lot of other targets internally too making this change very difficult to land.

Are you saying that this tiny little PR would also improve other downstream projects at Google? :star_struck: :stuck_out_tongue:

Haha, I wouldn't say improve but it will break a lot of stuff and I don't think we have the bandwidth to fix all those projects. Hence landing this is very hard IRL.

I think, setting caveats about how hard this is to land aside, this is generally a change we want, and one we've been hoping to add for a long time. Initially we were blocked by the lack of ParamSpec in the type system, then we were blocked by the lack of support for ParamSpec in the mypy implementation, and then in the pytype implementation. If the pytype blocker is now fixed, we can do the work to land this (basically adding # ignore statements in any place that it breaks). But I think pytype may still be a blocker, as it was for #14688 six months ago.
The relevant issue is https://github.com/google/pytype/issues/1471, which is still open.

re: @yashk2810
I guess it's a matter of perspective. In my view, revealing typing errors / encouraging code to be more explicit is an improvement.
re: @yashk2810 @jakevdp
I'd be very happy to help and put in the time required in order to fix (or at the very least silence) any such typing errors that are revealed as a result of this PR in other projects. Do you by chance have a kind of list of these public-facing, jax-based projects that could potentially have their CI fail as a result of this change? If not, I can also try to gather such a list myself.

For what it's worth, the pytype blocker is not about revealing existing errors, it's about the fact that pytype fails loudly and completely when it sees covariant=True. If that hasn't changed, then I'm afraid we can't do much else here.

With respect to https://github.com/google/pytype/issues/1471, would this change be possible to merge if I didn't mark the output TypeVar as covariant?  :thinking:

Yes, if this didn't use covariant typevars, it would be easier to merge. But my understanding from #14688 was that covariant typevars are required in order to correctly annotate jit.

@jakevdp pytype treats all type variables as covariant IIRC, so maybe we can just suppress the warning for that particular type var?

Re @superbobry @jakevdp :
I added some #pytype: disable=not-supported-yet over the typevar definitions. If my understanding of pytype is correct, it will now simply drop the covariant arg, and treat those as regular typevars.

@lebrice :  I'd be very happy to help and put in the time required in order to fix (or at the very least silence) any such typing errors that are revealed as a result of this PR in other projects. Do you by chance have a kind of list of these public-facing, jax-based projects that could potentially have their CI fail as a result of this change? If not, I can also try to gather such a list myself.

I'll start with Flax, since that seems like the most obvious downstream project from my perspective.
I'm able to get their Pytype-related CI step to run without error, at least locally.

Pulling in to run internal pytype tests

I'm curious: If this ends up getting merged, will the Google-ML-Automation bot include my github username in the final commit? Or would someone on the inside need to add a Co-authored-by: Fabrice Normandin<EMAIL_ADDRESS>in the commit message?

I'm curious: If this ends up getting merged, will the Google-ML-Automation bot include my github username in the final commit? Or would someone on the inside need to add a Co-authored-by: Fabrice Normandin<EMAIL_ADDRESS>in the commit message?

If this is merged, your actual unmodified commit would be added to the JAX source tree.

HI @superbobry , would it help if I rebased this off of the most recent version of master?
There might be new places where # type: ignore comments should be added. What do you think?

Apologies for the silence. We can try, but it looks like pytype might need some fixing to accept the declarations in this PR.

Thanks @lebrice! The relevant issue is google/pytype#1471, as Jake pointed out above. I think it is possible to fix, but it will be a massive change, since internal Google code definitely relies on this pytype behavior (even though it is obviously wrong).


Resurrect and modernize C++Builder configuration

Revive the Borland configuration that was removed in 2fe7303 / 8e56a42 during the migration to the unified build scheme, and modernize it for the Clang-based bcc32c.exe compiler in C++Builder. The configuration is derived from BASE_Windows, so move MSVC-specific build options into VC-common. Also generalize windows-makefile.tmpl to work with the make.exe included with C++Builder, when operating in its NMake-compatibility mode (-N option).
I managed to download a file over HTTPS with this built as 32-bit (both static and shared) with the free Community Edition:
perl Configure BC-32 --prefix=%CD%
make -N

and using it from Boost.Asio.
Current limitations:

Tests are failing in C++Builder.
No support for DLL builds.
No support for 64-bit builds.

I have ensured that there are no problems introduced in the MSVC builds.
Fixes #1544

Checklist

[x] documentation is added or updated
[ ] tests are added or updated

NOTE: I have emailed my signed ICLA to<EMAIL_ADDRESS>on 19th November 2020. Haven't received any acknowledgement yet.

I have emailed my signed ICLA to<EMAIL_ADDRESS>on 19th November 2020. Haven't received any acknowledgement yet.

Hmm. I checked my inbox for that date and I don't see any trace of your ICLA. Also checked my spam and I can't see it there either. It looks like it hasn't arrived which is why you've had no acknowledgement. Can you resend?

@mattcaswell Just resent now.

Just resent now.

Thanks. Got it now. It went into my spam folder. I actually found your original one also in my spam - not sure how I missed it when I looked previously.
Close/reopen to kick CLA bot

The documentation should probably get updated, probably NOTES-Windows.txt

Apart from one final reques (https://github.com/openssl/openssl/pull/13540#discussion_r543095102), I think this looks good

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

Could this be rebased on a fresher master?  I believe that the CIs will fare better then

Could this be rebased on a fresher master?  I believe that the CIs will fare better then

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

Ping @tanzislam

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

This PR is in a state where it requires action by @openssl/committers but the last update was 61 days ago

@openssl, a second approval would be a good thing

24 hours has passed since 'approval: done' was set, but this PR has failing CI tests.  Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.

Merged. Many thanks!


slack-client depcrecated

When I install the package, it says: npm WARN deprecated<EMAIL_ADDRESS>Use @slack/client instead, this package is no longer maintained

I have a similar issue.  Trying to get hubot-slack to work behind a proxy.  I can see hubot-slack is passing proxyUrl to slack-client, but only the new client actually has support for this.
https://github.com/slackhq/hubot-slack/blob/master/src/slack.coffee#L25-L33
Not sure how to move forward until hubot-slack starts using the new client.

It looks like the change to use @slack/client is included as part of https://github.com/slackhq/hubot-slack/pull/309

I'm seeing this also

@natdempk has it right: We are actively working on this in #309. Closing for now.


Add dropWhile

This change adds a dropWhile combinator that I found myself re-implementing a few times since it does not exist already in the library.

@ixmatus: Thanks!  I can upload this to Hackage if you don't have any other pending changes

@Gabriel439 I don't have any other pending changes!


DiskGiB customization not honored during vSphere Bottlerocket cluster creation

What happened:
Created vSphere Bottlerocket cluster and specified the DiskGiB size of 500GB via the VSphereMachineConfig object in cluster configuration yaml file. When the cluster VMs got created, they had a disk size of 25GB.
What you expected to happen:
Cluster VMs would have 500 GiB disk size.
How to reproduce it (as minimally and precisely as possible):
Specify a custom disk size other than the default of 25 GiB in the cluster config yaml. Create vSphere Bottlerocket cluster.
Anything else we need to know?:
EKS Anywhere auto-imports the Bottlerocket template and snapshots it by default. When a template with snapshots is used, CAPV uses the LinkedClone mode to create the vSphere VMs. While LinkedClone mode is much faster than FullClone mode for VM creation and ultimately for speeding up cluster creation process, it does not allow resizing of disks and falls back to the default disk size of 25 GB.
In order to overcome this, a user would have to convert the auto-imported OVA template back to a VM, remove all the snapshots, re-convert it to template. Then use the template to create cluster. The un-snapshotted OVA would allow for custom disk size.
Ideally, EKS Anywhere should detect that the disk size is being customized and avoid auto-snapshotting the imported OVA template in such a case.
Environment:

EKS Anywhere Release:
0.12

EKS Distro Release:

The ticket is a duplicate of #3467 which is fixed in PR #4634
These changes will be available in v0.15 release


Rewrite lexer

Currently implemented lexer is setup in a strange pseudo-oop way as I was directly translating from the crafting interpreters lexing tutorial with a few differences. Should be changed to a simple function with private functions that get passed args directly.

Started and has been rewritten up to original point speedily already, closing.


ENH - Add Sphinx-based documentation

This PR adds the following:

Configuration needed to set up a Sphinx doc (narrative and autoAPI)
Updates to documentation files (move to doc/ and edits as needed)
Add a Read the Docs configuration file
Add a GH workflow to automatically link to a PR preview in Pull Requests
Add requirements and contribution guidelines

For @iindyk, when reviewing:
📌 You will need to complete the following:

Create an account on Read the Docs
Add a new documentation project in Read the Docs
Ensure the docs are built on PRs

📓  Some notes to consider during the review:

I added some content in the docs README to the site index. I did not copy all of it, but this needed some text/intro. Do we want to move all of the content of the README?
I put both the "Behind the Scenes" and "PyGrain Data Sources" under "Getting Started." We can move sections around if this seems like something other than what is listed.
Also, I created a "Data Loader" section,n but this can be changed/customised if needed.
I moved the tutorial notebook to a "Tutorials" section and mirrored the process we follow in jax-stack to keep laptops and markdown in sync (documented in the contribution guidelines); note that I also added a pre-commit hook to help with this.
I added the autogenerated API docs under "References/API Reference," so fa,r it includes everything under grain/src but we can tweak what should be or should not be included and how.

Note that when building, some syntax warnings on the API reference will need fixing. But I did not want to spend too much time on this until we aligned on the content.
I am adding a partial screenshot for reference

I did not manage to build locally with the following warnings:

@melissawm I accidentally pushed some changes I should have not, but I reverted this to the previous version and all should work now.

thanks! porting this PR in https://github.com/google/grain/pull/647

Since this has been ported and merge I will go ahead and close the PR


[BUG] CellAssign process getting killed with OutOfMemoryError

Describe the bug
A clear and concise description of what the bug is.
If you have an error message or report that you can include, please do!
In running SCPCP000016 through scpca-nf with cell typing, I'm consistently getting the same error stating that the task was killed due to being out of memory. This project does use the all pediatric cancer reference, which is not used by any other projects that have been processed, so I do wonder if that's part of it.
I've tried bumping up the memory to 256 and get the same error everytime. I will note that one library did complete successfully but it has ~500 cells, whereas the other libraries have > 7,000 cells.
To reproduce
If possible, please provide example code to reproduce the problem, including any information about the dataset where the problem occurred, if possible.
The following command but specifying the prod outdir and the project:
nextflow run AlexsLemonade/scpca-nf -r v0.7.2 -profile ccdl,batch --perform_celltyping
Additional context
Add any other context about the problem here.
This is the main message that Nextflow has for the error:
The exit status of the task that caused the workflow execution to fail was: 137

Error executing process > 'annotate_celltypes:classify_cellassign (SCPCL000835)'

Caused by:
  Essential container in task exited - OutOfMemoryError: Container killed due to memory usage

Then here's the output error message from running CellAssign:
Command error:
  Warning message:
  replacing previous import ‘S4Arrays::makeNindexFromArrayViewport’ by ‘DelayedArray::makeNindexFromArrayViewport’ when loading ‘SummarizedExperiment’
  Registered S3 methods overwritten by 'zellkonverter':
    method                                             from
    py_to_r.numpy.ndarray                              reticulate
    py_to_r.pandas.core.arrays.categorical.Categorical reticulate
  miQC_model cannot be converted between SCE and AnnData.
  /usr/local/lib/python3.10/dist-packages/scvi/_settings.py:63: UserWarning: Since v1.0.0, scvi-tools no longer uses a random seed by default. Run `scvi.settings.seed = 0` to reproduce results from previous versions.
    self.seed = seed
  /usr/local/lib/python3.10/dist-packages/scvi/_settings.py:70: UserWarning: Setting `dl_pin_memory_gpu_training` is deprecated in v1.0 and will be removed in v1.1. Please pass in `pin_memory` to the data loaders instead.
    self.dl_pin_memory_gpu_training = (
  Global seed set to 2021
  No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
  /usr/local/lib/python3.10/dist-packages/scvi/data/fields/_base_field.py:64: UserWarning: adata.X does not contain unnormalized count data. Are you sure this is what you want?
    self.validate_field(adata)
  GPU available: False, used: False
  TPU available: False, using: 0 TPU cores
  IPU available: False, using: 0 IPUs
  HPU available: False, using: 0 HPUs
  /usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py:281: PossibleUserWarning: The number of training batches (5) is smaller than the logging interval Trainer(log_every_n_steps=10). Set a lower value for log_every_n_steps if you want to see logs for the training epoch.
    rank_zero_warn(

  Training:   0%|          | 0/400 [00:00<?, ?it/s]
  Epoch 1/400:   0%|          | 0/400 [00:00<?, ?it/s].command.sh: line 9:  1141 Killed                  predict_cellassign.py --input_hdf5_file "processed.hdf5" --output_predictions "SCPCL000835_cellassign/cellassign_predictions.tsv" --reference "pediatric-cancers_PanglaoDB_2020-03-27.tsv" --seed 2021 --threads 12

Definitely looks like a memory issue. I think with the current setup we have, we can use up to 488GB memory, but I could reconfigure the compute modules to use different instance types with greater memory. In particular, we are currently using C4, M4, and R4 instances, but if we added in R5 or R5a we could go to 768 or R6a to go to 1536.
I suspect this is a change we should make anyway, as the 5 and 6 series instances may be more efficient at this point, and apparently are interrupted less, if something I read online is to be believed.

Definitely looks like a memory issue. I think with the current setup we have, we can use up to 488GB memory, but I could reconfigure the compute modules to use different instance types with greater memory. In particular, we are currently using C4, M4, and R4 instances, but if we added in R5 or R5a we could go to 768 or R6a to go to 1536.
I suspect this is a change we should make anyway, as the 5 and 6 series instances may be more efficient at this point, and apparently are interrupted less, if something I read online is to be believed.

Okay, good to know about the max being 488. I went ahead and submitted a run with that to see if that's enough. Hopefully!

I added new instance types, so we should be able to go to ~1.5TB memory. But hopefully it doesn't take that. Make sure you update both the memory request for the process and the max_memory param

Alright, so I bumped up the max_memory param and am using mem_488 in the process for classifying CellAssign, but when I run the workflow tower is showing me that max_memory is still set to 256.
The changes I'm trying to run are on allyhawkins/cell-assign-mem-bump and I've made sure to re-pull that branch and check that the workflow that is cached has max_memory=488. I feel like there might be some other limitation on the queue that we are using?

For some additional context, it looks like the process is using c6a.48xlarge which has a max memory of 384 GiB.

See #711 for a suggestion: it looks like you changed one max_memory, but  not the one in use for the ccdl profile.

For some additional context, it looks like the process is using c6a.48xlarge which has a max memory of 384 GiB.

This is good news as it means the AWS changes I made did get applied properly!

I just wanted to note that I'm testing a sample using the mem_512 label, and it's on its third attempt and has been for a little over a day. I'm hoping that it completes by tomorrow, and if it does, we should identify how we want to handle requesting this much memory for these samples. I'm assuming that we don't want to just increase the initial memory request to 512 for all libraries...
Also this library is currently attempting to use 1 TB, so we probably want the capability to increase memory to that much. One thought I had was to create a separate label only used for the CellAssign process that starts at the initial 96 GB, but increases to maybe 500 on the second attempt and then 1 TB by the third retry? This would mean requesting more memory for samples that probably don't need that much on a third retry.
Another option would be to only increase the memory to 500 and 1 TB, if the exit status was a memory error. @jashapiro do you have any other ideas or preference on what we do here?

One option is to have a mem_max label that just goes right to params.max_memory, but keep the max_memory in the param file something sane. Then when calling the workflow you could add --max_memory "1.TB" or similar when running those samples.

One option is to have a mem_max label that just goes right to params.max_memory, but keep the max_memory in the param file something sane. Then when calling the workflow you could add --max_memory "1.TB" or similar when running those samples.

I like this idea. You mean to replace the current mem_96 label with a mem_max label that goes to the max memory on the first retry?

You mean to replace the current mem_96 label with a mem_max label that goes to the max memory on the first retry?

I actually meant right from the start! But giving one shot at something large but not necessarily the max would be fine.


Wip/extensibility

This pull request adds functionality to extend sitemap elements either by blocking theire creation or by extending them.
closes #5

Can you explain how these events can be used to make a full multi-lang sitemap? You need to be able to inject at a much earlier stage and you'll need to generate the page url for each locale.

Can you explain how these events can be used to make a full multi-lang sitemap? You need to be able to inject at a much earlier stage and you'll need to generate the page url for each locale.

For my use case it worked as i only needed to add xhtml:link nodes and attach a query string to each url, but one might actually need to pass additional data to the item to e.g. reference the original resource it was generated from. I will further investiage and adjust this PR.

@mjauvin I've removed the unessecary arguments and will be trying to extend the translate plugin to allow for localized page urls in the sitemap.

@mjauvin @LukeTowers I've experimented with the translate plugin to add localized links to the sitemap and came up with this code:
// add localized links to static pages in sitemap
Event::listen('winter.sitemap.makeUrlElement', function($definition, $xml, $pageUrl, $lastModified, $item, $url) {
    $baseUrl = rtrim(url('/'), '/');

    if ($item->type === 'all-static-pages' || $item->type === 'static-page') {
        $locales = array_keys(Locale::listAvailable());

        foreach($locales as $locale) {
            $localeUrl = $baseUrl . '/' . $locale . str_replace($baseUrl, '', $pageUrl);
            $linkElement = $xml->createElement('xhtml:link');
            $linkElement->setAttribute('rel', 'alternate');
            $linkElement->setAttribute('hreflang', $locale);
            $linkElement->setAttribute('href', $localeUrl);
            $url->appendChild($linkElement);
        }
    }
});

you can't build the url like this, it won't work in all scenarios. please check how I did it in my plugin.

What about cms pages with a translatable slug?
ref. https://github.com/mjauvin/wn-mlsitemap-plugin/blob/master/classes/Definition.php#L69

@mjauvin @LukeTowers I've experimented with the translate plugin to add localized links to the sitemap and came up with this code:
// add localized links to static pages in sitemap
Event::listen('winter.sitemap.makeUrlElement', function($definition, $xml, $pageUrl, $lastModified, $item, $url) {
    $baseUrl = rtrim(url('/'), '/');

    if ($item->type === 'all-static-pages' || $item->type === 'static-page') {
        $locales = array_keys(Locale::listAvailable());

        foreach($locales as $locale) {
            $localeUrl = $baseUrl . '/' . $locale . str_replace($baseUrl, '', $pageUrl);
            $linkElement = $xml->createElement('xhtml:link');
            $linkElement->setAttribute('rel', 'alternate');
            $linkElement->setAttribute('hreflang', $locale);
            $linkElement->setAttribute('href', $localeUrl);
            $url->appendChild($linkElement);
        }
    }
});

where is the $url parameter to the event handler coming from? it doesn't match the event signature

never mind, I was looking at the beforeMakeUrlElement event...

Another problem I see is that the URLs needs to be generated for all locales (not just have xhtml:link for each locale)

I'm not sure what is the best practise approach here. My quick research told me that using a canonical URL + the alternate URLs for the locales seems to be what google recommends nowdays.

you can't build the url like this, it won't work in all scenarios. please check how I did it in my plugin.

Just checked it, you basically pass localized URLs to the menu item. That could be a way. I would like to also pass a reference (like an ID or code) of the menu item down to the sitemap item, so one has a canonical reference to the original item when handling the events. Maybe merging both could be the way to go. This gives us localized URLs without the need of handling events but while creating menu items and it gives us a reference to the original item when handling the sitemap events.

Another problem I see is that the URLs needs to be generated for all locales (not just have xhtml:link for each locale)

I'm not sure what is the best practise approach here. My quick research told me that using a canonical URL + the alternate URLs for the locales seems to be what google recommends nowdays.

According to this document, it is a bit more complex than what you describe:
https://developers.google.com/search/docs/advanced/crawling/localized-versions#sitemap

@mjauvin I'm now passing the item reference to the events, this way the origin of the item can be retrieved within the event handler. I was also able to add localized urls in a sane way in the translate plugin:
$self = $this;

// add localized links to static pages in sitemap
Event::listen('winter.sitemap.makeUrlElement', function($definition, $xml, $pageUrl, $lastModified, $item, $itemReference, $urlElement) use ($self) {
            if ($item->type === 'all-static-pages' || $item->type === 'static-page') {
                if (!$itemReference) {
                    return;
                }

                $locales = array_keys(Locale::listAvailable());

                foreach($locales as $locale) {
                    $linkElement = $xml->createElement('xhtml:link');
                    $linkElement->setAttribute('rel', 'alternate');
                    $linkElement->setAttribute('hreflang', $locale);
                    $linkElement->setAttribute('href', $self->localeUrl($pageUrl, $locale));
                    $urlElement->appendChild($linkElement);
                }
            }
        });

@der-On if your PR allows creating the equivalent code linked below in the translate plugin, I'll approve and merge it:
https://github.com/mjauvin/wn-mlsitemap-plugin/blob/master/classes/Definition.php#L69-L97

See #10 for other plugins implementing Multilang functionality.

Replaced by #11