Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADFS page stuck at waiting #99

Closed
schrockmatthew opened this issue Sep 30, 2019 · 38 comments
Closed

ADFS page stuck at waiting #99

schrockmatthew opened this issue Sep 30, 2019 · 38 comments
Assignees
Labels

Comments

@schrockmatthew
Copy link

Not sure what the issue might be........When I sign in using ADFS after the newest ldapcp.wsp install....The sign in page is stuck at waiting on the adfs page before it states problem with "https://url/_trust/".........Not one error in the sharepoint logs and only see fatal communication errors in even viewer on the Windows Process Activation Service

@Yvand
Copy link
Owner

Yvand commented Oct 1, 2019

Can you capture a Fiddler trace, confirm it hangs on the POST to /_trust?
If so, then you can get its correlation ID and use it to filter SharePoint logs. It should help you understand the cause of the hang.

@Yvand Yvand self-assigned this Oct 1, 2019
@Yvand Yvand added the Issue label Oct 1, 2019
@schrockmatthew
Copy link
Author

schrockmatthew commented Oct 1, 2019 via email

@Yvand
Copy link
Owner

Yvand commented Oct 2, 2019

Did the problem disappear just after you uninstalled LDAPCP?

@khalilG
Copy link

khalilG commented Oct 2, 2019

We have the same issue here.
The weird thing is that the first time we installed the ldapcp.wsp solution, we tested on an already opened site and it worked for a while. After closing and reopening the browser, problems showed up.
As a workaround, You can use this code to revert back without uninstalling the solution :
![image](https://user-images.githubusercontent.com/8361028/66045704-8b4a5a80-e524-11e9-8091-c822eeb1f83e.png)
Also, we'll try an older version, we'll update this post to tell if it worked or not.

@schrockmatthew
Copy link
Author

schrockmatthew commented Oct 2, 2019 via email

@Yvand
Copy link
Owner

Yvand commented Oct 2, 2019

Can you also make sure that you visit a LDAPCP administration page (hosted in central administration > security) before you try to load any site.
The reason is that visiting a LDAPCP page will create a configuration object, which may fix this issue

@khalilG
Copy link

khalilG commented Oct 2, 2019

@Yvand Yes, I visited the administration page on the central administration and, by the way, launched the configuration script available here : [https://ldapcp.com/Configure-LDAPCP.html]

@schrockmatthew
Copy link
Author

schrockmatthew commented Oct 2, 2019 via email

@khalilG
Copy link

khalilG commented Oct 3, 2019

When I try to debug on our test environment, we got this issue :
image
System.StackOverflowException
But no more explanation.

@khalilG
Copy link

khalilG commented Oct 3, 2019

I finally found a way to deploy the solution and attach breakpoints.
What is remarkable is that it keeps hitting the "Initialize" function again and again until StackOverflow exception is raised.
image
@Yvand : any idea why it's keeping initializing ?
Thanks.

@Yvand
Copy link
Owner

Yvand commented Oct 3, 2019

In Visual Studio > Debug > Options: can you unckeck "Enable just my code" and break again?
It should show the SharePoint frames in the call stack

@khalilG
Copy link

khalilG commented Oct 3, 2019

In Visual Studio > Debug > Options: can you unckeck "Enable just my code" and break again?
It should show the SharePoint frames

Will try that now !

@khalilG
Copy link

khalilG commented Oct 3, 2019

Here are some screenshots :

image

image

@khalilG
Copy link

khalilG commented Oct 3, 2019

As described in the Call Stack, the method "GetUerKeyForEntity" is keeping called again and again. After debugging it, I found that some breakpoints are never reached, as described below :
image

@Yvand
Copy link
Owner

Yvand commented Oct 3, 2019

I see, the StackOverflow is caused by the elevation of privileges done in method GetUserKeyForEntity.
As you can see in the comment, this elevation of privileges was added in v14 to fix issue #87, unfortunately, in your environment this is causing the StackOverflow, which is bad news.
Can you let me know:

  • What is your SharePoint build?
  • The configuration of your web app (zones / authentication providers enabled per zone)

@khalilG
Copy link

khalilG commented Oct 3, 2019

  • Farm Build Version : 16.0.4717.1000
  • Web App configuration :
    image
    image
    image

@Yvand
Copy link
Owner

Yvand commented Oct 3, 2019

Can you revert your customization of the default sign in page to default sign in page and confirm that you still reproduce the issue?

@khalilG
Copy link

khalilG commented Oct 3, 2019

I revert back to the default sign in page. When I open my site, I have 2 choices :
image

If I choose 'Windows Authentication', everything works fine, site is accessible and I can get AD users from the people picker :
image

But if I choose our trusted identity provider, the error occurs :
image

@Yvand
Copy link
Owner

Yvand commented Oct 3, 2019

So it is the same issue, assuming this unhandled exception is the StackOverflow caused by the elevation of privileges in GetUserKeyForEntity.

I added this elevation of privileges as part of a larger change to fix issue #87 and I never reproduced this StackOverflow during my tests, but you are 2 to reportedly reproduce it.
Considering this, I will revert the change and publish soon an update with this sole change.

Issue #87 is still mitigated by other changes also introduced in current version in v14, so it's not that bad.

Yvand added a commit that referenced this issue Oct 3, 2019
@kalervojankko
Copy link

Not sure what the issue might be........When I sign in using ADFS after the newest ldapcp.wsp install....The sign in page is stuck at waiting on the adfs page before it states problem with "https://url/_trust/".........Not one error in the sharepoint logs and only see fatal communication errors in even viewer on the Windows Process Activation Service

Had exactly the same issue right after I ran the Update-SPSolution command as I updated older LDAPCP version to this version.

After two hours of troubleshooting I found this post and then decided to remove LDAPCP with these instructions: https://ldapcp.com/Remove-LDAPCP.html and then installed version 13.0.20190621.905 and everything worked again. I already installed earlier this 13. version to our TEST farm so I knew this shouldn't have any issues.

@khalilG
Copy link

khalilG commented Oct 5, 2019

Not sure what the issue might be........When I sign in using ADFS after the newest ldapcp.wsp install....The sign in page is stuck at waiting on the adfs page before it states problem with "https://url/_trust/".........Not one error in the sharepoint logs and only see fatal communication errors in even viewer on the Windows Process Activation Service

Had exactly the same issue right after I ran the Update-SPSolution command as I updated older LDAPCP version to this version.

After two hours of troubleshooting I found this post and then decided to remove LDAPCP with these instructions: https://ldapcp.com/Remove-LDAPCP.html and then installed version 13.0.20190621.905 and everything worked again. I already installed earlier this 13. version to our TEST farm so I knew this shouldn't have any issues.

@kalervojankko : will try this Monday and let you know if it succeeded.

@khalilG
Copy link

khalilG commented Oct 7, 2019

@kalervojankko I just installed the 13.0.20190621.905 version and it seems to be perfectly working.

@Yvand
Copy link
Owner

Yvand commented Oct 7, 2019

@khalilG @kalervojankko this is clearly a regression in v14, I will publish soon v14.1 to fix it, code is ready and I'm running integration tests on it.
Thank you for reporting and updating me with your tests and findings

@Yvand Yvand pinned this issue Oct 7, 2019
@Yvand
Copy link
Owner

Yvand commented Oct 7, 2019

@khalilG, @kalervojankko, @schrockmatthew, are you willing to test v14.1 beta and confirm that it resolves the issue?
As I'm not able to repro it, it would be great to have your validation before I publish it.

@kalervojankko
Copy link

@Yvand I can test it tomorrow in our TEST farm and will let you know how it goes.

@khalilG
Copy link

khalilG commented Oct 8, 2019

@khalilG, @kalervojankko, @schrockmatthew, are you willing to test v14.1 beta and confirm that it resolves the issue?
As I'm not able to repro it, it would be great to have your validation before I publish it.

@Yvand Will do that today and let you know if it succeeded.

@kalervojankko
Copy link

@khalilG, @kalervojankko, @schrockmatthew, are you willing to test v14.1 beta and confirm that it resolves the issue?
As I'm not able to repro it, it would be great to have your validation before I publish it.

Ok, I have now installed this 14.1.20191007.981 beta version and seems to work. I didn't make any comprehensive testing, but at least it didn't break. :)

@Yvand
Copy link
Owner

Yvand commented Oct 8, 2019

@kalervojankko that's very good news, many thanks for taking the time to test it.
@khalilG I'll wait for your feedback. If it is positive, I'll make the pre-release a normal release, so it will be the version downloaded by default

@khalilG
Copy link

khalilG commented Oct 8, 2019

@kalervojankko that's very good news, many thanks for taking the time to test it.
@khalilG I'll wait for your feedback. If it is positive, I'll make the pre-release a normal release, so it will be the version downloaded by default

@Yvand I've got some issues with my SharePoint test environment, nothing related to LDAPCP, so seems like I'll not be able to give you a feedback for today, hope things will get better and try to test tomorrow. Thanks.

@Yvand
Copy link
Owner

Yvand commented Oct 8, 2019

@khalilG thanks for the update, please do let me know if you are not able to complete the test by tomorrow

@khalilG
Copy link

khalilG commented Oct 9, 2019

@Yvand Sorry but I don't think I'll be able to give you feedback today, I'm stuck with another issue. I think if it works for the others, it will be the same for me.
Thank you again for your efforts.

@AmitW02
Copy link

AmitW02 commented Oct 7, 2021

I finally found a way to deploy the solution and attach breakpoints. What is remarkable is that it keeps hitting the "Initialize" function again and again until StackOverflow exception is raised. image @Yvand : any idea why it's keeping initializing ? Thanks.

Hi @khalilG, How did you find this debugging works? I have same situation, getting overflow exception. and not getting hit on brakepoint. Could you please help me?

@khalilG
Copy link

khalilG commented Oct 8, 2021

I finally found a way to deploy the solution and attach breakpoints. What is remarkable is that it keeps hitting the "Initialize" function again and again until StackOverflow exception is raised. image @Yvand : any idea why it's keeping initializing ? Thanks.

Hi @khalilG, How did you find this debugging works? I have same situation, getting overflow exception. and not getting hit on brakepoint. Could you please help me?

@AmitW02 Sorry, it has been so long since the last time I've worked on this (almost 2 years) and I moved to another position now so I can't help you anymore.

@Yvand
Copy link
Owner

Yvand commented Oct 8, 2021

@AmitW02 this looks like another thread took the lock and does not release it.
What version of LDAPCP.dll exactly are you debugging ?

@AmitW02
Copy link

AmitW02 commented Oct 8, 2021

@Yvand
Copy link
Owner

Yvand commented Nov 23, 2021

@AmitW02 is this issue still present?

@schrockmatthew
Copy link
Author

schrockmatthew commented Nov 23, 2021 via email

@AmitW02
Copy link

AmitW02 commented Nov 23, 2021

I am good now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants