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

Blazor SSR with NTLM Authentication no longer works on iOS 18 or iPadOs 18 #57918

Closed
1 task done
joemitchard opened this issue Sep 17, 2024 · 7 comments
Closed
1 task done
Assignees
Labels
area-blazor Includes: Blazor, Razor Components External This is an issue in a component not contained in this repository. It is open for tracking purposes.
Milestone

Comments

@joemitchard
Copy link

joemitchard commented Sep 17, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We've got a fairly simple Blazor Server app that's been working absolutely fine on a number of iOS devices across the company, it's an internal app that's authenticated with NTLM.

None of our stream rendered content is loading since the devices have been updated iOS/iPadOS 18.

We've checked a few devices pre-upgrade and everything was working fine, but ceased working as soon as the iOS upgrade was completed.

No errors are logged or thrown server side, but after around 2s the UI becomes unresponsive and eventually pops up the stock "Something has gone wrong, reload" message.

Other browsers on iOS 18 (such as Chrome) are still working fine, this is just related to Safari.

Expected Behavior

The app to work as it did on iOS 17.

Steps To Reproduce

https://github.com/joemitchard/blazor-safari-test

I've replicated the issue in a minimal repo, adding features one by one until I replicated our issue I've found that this is NTLM authentication, not streaming or rendering.

Apologies for the confusion.

This application worked fine on Safari until I added:

SafariTest.csproj

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="8.0.6" />
        <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.6" />
        --snip--
    </ItemGroup>

Program.cs

using Microsoft.AspNetCore.Authentication.Negotiate;
--snip--

// auth
builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme).AddNegotiate();
builder.Services.AddAuthorization(opts => opts.FallbackPolicy = opts.DefaultPolicy);

App.razor

@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]

<!DOCTYPE html>
<html lang="en">

--snip--

Once these lines were added the application becomes unresponsive on load, however, no errors are logged.

Exceptions (if any)

No response

.NET Version

8.0.6

Anything else?

.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\

Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e

.NET SDKs installed:
5.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
arm64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Sep 17, 2024
@MackinnonBuck MackinnonBuck added this to the 9.0.0 milestone Sep 17, 2024
@MackinnonBuck MackinnonBuck self-assigned this Sep 17, 2024
@MackinnonBuck
Copy link
Member

Thanks for reaching out, @joemitchard.

Would you please provide us with a minimal repro project so that we can investigate this further? The weather page in the project template uses streaming, and that appears to work fine on iOS 18 Safari.

@MackinnonBuck MackinnonBuck added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Sep 17, 2024
@dotnet-policy-service dotnet-policy-service bot added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 17, 2024
@MackinnonBuck MackinnonBuck removed investigate Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Sep 17, 2024
@joemitchard
Copy link
Author

@MackinnonBuck I'm working on building a simple application to reproduce this, I'll add a link once it's ready.

I think we can rule out streaming, I've managed to get that working. I'll provide an update when I figure out exactly what it causing this behaviour.

Cheers,

Joe

@joemitchard
Copy link
Author

Steps to reproduce have been added - the issue is with Authentication, not Stream Rendering. Apologies for the confusion.

This app has been deployed to one of our on premises servers, and our authentication is provided using SSO (GlobalProtect) and AzureAd so I cannot provide a link to the application itself.

This worked previously, so I suspect it's a breaking change in way Safari handles NTLM authentication using Microsoft.AspNetCore.Authentication.Negotiate

@joemitchard joemitchard changed the title Blazor SSR Stream Rendering no longer works on iOS 18 or iPadOs 18 Blazor SSR with NTLM Authentication no longer works on iOS 18 or iPadOs 18 Sep 18, 2024
@joemitchard
Copy link
Author

joemitchard commented Sep 19, 2024

@MackinnonBuck do you need anything more from my side in order to investigate this?

FWIW I've also tested this issue on v8.0.8 of the highlighted packages and there was no change in behaviour.

@MackinnonBuck MackinnonBuck added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue labels Sep 19, 2024
@MackinnonBuck
Copy link
Member

@joemitchard, this should be enough info for us to investigate this further. Thank you!

@mkArtakMSFT
Copy link
Member

After some further discussion we believe this is due to some issue on the browser side, so we recommend you file this issue with Apple.

@mkArtakMSFT mkArtakMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@mkArtakMSFT mkArtakMSFT added External This is an issue in a component not contained in this repository. It is open for tracking purposes. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Sep 30, 2024
@joemitchard
Copy link
Author

joemitchard commented Sep 30, 2024

I'm sorry, but @mkArtakMSFT what exactly am I supposed to raise to Apple?
I can't exactly go to them and say that there is "some issue" with a change to their browser updates.

Given that you guys maintain this library, I would have thought you can at least provide some guidance here especially as I have created a reproduction that shows the issue.

"Won't fix" is a poor response to a real problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components External This is an issue in a component not contained in this repository. It is open for tracking purposes.
Projects
None yet
Development

No branches or pull requests

3 participants