Skip to content

[Android] Fix NullReferenceException on WebAuthenticatorIntermediateActivity#15052

Closed
Px7-941 wants to merge 1 commit intodotnet:mainfrom
Px7-941:main
Closed

[Android] Fix NullReferenceException on WebAuthenticatorIntermediateActivity#15052
Px7-941 wants to merge 1 commit intodotnet:mainfrom
Px7-941:main

Conversation

@Px7-941
Copy link
Copy Markdown

@Px7-941 Px7-941 commented May 12, 2023

Description of Change

This pull request fixes a NullReferenceException in WebAuthenticatorIntermediateActivity.
Complements this merged pull request #12347.

Issues Fixed

Fixes #13302, #13798, #12347

Browser tests

The following browsers have been configured as the default app in the Android operating system.

Browser CustomTab Fallback Login Logout Comment Fix
Chrome true false ok ok - -
Samsung true true ok ok - -
Firefox true false ok ok - -
Brave true false ok ok - -
Edge true false ok ok - -
Vivaldi true false ok ok - -
Opera false true ok ok - -
Tor true false nok nok - -
Mi Browser false true ok ok main activity remains hidden LaunchMode.SingleTask
Duckduckgo false true ok ok main activity remains hidden LaunchMode.SingleTask

For some browsers a correction of the user implementation is necessary. LaunchMode = LaunchMode.SingleTask.
https://github.com/dotnet/docs-maui/blob/main/docs/platform-integration/snippets/shared_1/Platforms/Android/WebAuthActivity.cs#L6

@ghost ghost added the community ✨ Community Contribution label May 12, 2023
@ghost
Copy link
Copy Markdown

ghost commented May 12, 2023

Hey there @Px7-941! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Px7-941
Copy link
Copy Markdown
Author

Px7-941 commented May 12, 2023

@microsoft-github-policy-service agree

@Eilon Eilon added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label May 12, 2023
@Px7-941 Px7-941 changed the title Fix NullReferenceException on WebAuthenticatorIntermediateActivity [Android] Fix NullReferenceException on WebAuthenticatorIntermediateActivity May 13, 2023
@rmarinho rmarinho requested a review from mattleibow May 18, 2023 15:05
@rmarinho
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@Redth
Copy link
Copy Markdown
Member

Redth commented May 19, 2023

I don't believe this is the correct or necessary fix. The reason this is getting into a state where that value is null is due to the start of the flow being from a system browser which is not supposed to call back into the intermediate activity.

#15187 Should fix this.

If you want to use custom tabs, you are likely missing some values in your manifest required in newer android versions. See the doc

@Redth Redth closed this May 19, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebAuthenticator crash with some browsers

5 participants