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

Firefox users seeing "not found" on Android, both login and logout #392

Open
6 tasks done
MilesAdamson opened this issue Dec 21, 2023 · 14 comments
Open
6 tasks done
Assignees
Labels

Comments

@MilesAdamson
Copy link

MilesAdamson commented Dec 21, 2023

Checklist

Description

We have done a release migrating to this plugin. After releasing we are getting a lot of reports of users seeing a webpage which says "not found" on android, for both login and logout. We saw this in development as well, but after registering everything, it never happened again.

These are the steps we did to set it up:

Add product flavors so that each flavor goes to one of our auth0 setups:

    productFlavors {
        dev {
            dimension "default"
            manifestPlaceholders['auth0Domain'] = "redacted"
            manifestPlaceholders['auth0Scheme'] = "https"
        }
        qa {
            dimension "default"
            manifestPlaceholders['auth0Domain'] = "redacted"
            manifestPlaceholders['auth0Scheme'] = "https"
        }
        prod {
            dimension "default"
            manifestPlaceholders['auth0Domain'] = "redacted"
            manifestPlaceholders['auth0Scheme'] = "https"
        }
    }

Added callback URLs in all 3 auth0 setups:
image

Added the sha256 signing key to the "key hashes" section of advanced settings. For production, I took this value directly from the google play store releases section.
image

Login:

  Future<Credentials> login({String? tenant}) async {
    final credentials = await _webAuth.login(
      audience: _applicationConstants.audience,
      useEphemeralSession: true, // Do not show iOS native dialogs
      parameters: {
        if (tenant != null) "tenant": tenant,
        "prompt": "login", // Ignore the cookie and show the login page
      },
    );

    return credentials;
  }

Before releasing, we were not seeing the "not found" issue anymore on any devices, including a smoke test on production. Now that we have released this build, we are seeing a lot of support issues come up like this one:

Hi, after the update, I could not log in yesterday. I kept getting a web page saying "not found" pop up (attached screen shot). I tried entering the wrong password and it would give me the usual wrong password error message( 2nd attached screen shot). I tried deleting the app and re installing, restarting my phone, confirming my phone was running the most up to date software, and it still would give me the not found message. After about 20 attempts to log in, it did end up working. But now iam having the same issue when logging out of the app. Same not found message and it won't let me log out. I have to delete the app just to log out of the thing, but I won't because I will run into the same problem when trying to log back in.

So far we haven't been able to reduce the issue (see comment, it's firefox)

First is that it only happens to some users. If the android app link wasn't set up properly I would think it would never work for anyone, like it did during development before we fixed it. (our issue during development seen here #321 was that the sha256 was not registered in the application)

Then the other thing, they try over and over and eventually it works on the same device. This is also super weird, again I would expect it to either redirect into the app and work always or not at all.

Reproduction

Only happens sometimes, so some users.

Additional context

No response

auth0_flutter version

1.3.1

Flutter version

3.16.3

Platform

Android

Platform version(s)

No response

@MilesAdamson
Copy link
Author

Looks like this issue happens when users have firefox as their default browser. Firefox is not opening the app link properly. If I tap the "open in app" button in the options it sends them into the app.

By default installs of firefox seem to have "open links in apps: never". But if I change this to "always" or "ask before opening", it still isn't working. Not clear if this is an issue with firefox or this plugin but if you guys could see if there's anything you could do to make it behave on firefox that would be appreciated.

@Cpruce
Copy link

Cpruce commented Jan 2, 2024

I just ran into this as well. What fixed it was changing 'https' to a custom scheme.

https://community.auth0.com/t/flutter-gives-not-found-instead-of-redirecting-to-app/98929

@Widcket
Copy link
Contributor

Widcket commented Jan 2, 2024

@poovamraj could you please take a look?

@MilesAdamson
Copy link
Author

I just ran into this as well. What fixed it was changing 'https' to a custom scheme.

https://community.auth0.com/t/flutter-gives-not-found-instead-of-redirecting-to-app/98929

In general, if android app links are not set up, you will see "not found" if using https. The app doesn't know to open the link.

In our case, it does work, except when the user has firefox as their default browser. I will update the title of the issue to be more specific now that we have more info

@MilesAdamson MilesAdamson changed the title Users sometimes seeing "not found" on Android, both login and logout. Can't reproduce internally Firefox users seeing "not found" on Android, both login and logout Jan 2, 2024
@MilesAdamson
Copy link
Author

Users are also reporting this issue on the default Samsung browser as well

@andrecarlucci
Copy link

I'm using the Kiwi browser and I'm getting the same "Not found" error too.
It works when I change the default browser of my phone to Chrome.

@MilesAdamson
Copy link
Author

@Widcket any updates?

@Widcket
Copy link
Contributor

Widcket commented Mar 19, 2024

cc @poovamraj

@jinnielazzy
Copy link

commenting for answers

@poovamraj
Copy link
Contributor

Hello, sorry on the late response, the issue can be fixed in two ways.

  • Using App links to verify your application
  • Use custom scheme instead of https

We will ensure this covered in our documentation to make this clear.

@MilesAdamson
Copy link
Author

MilesAdamson commented May 31, 2024

Hi @poovamraj, we have app links set up. In the issue I have went over what we did to set it up. It is currently working on chrome just fine. However, it is not working on firefox or the samsung default browser. It is my understand that if we set up the app links incorrectly, it would not work on any browser.

Do you have an explanation on why it would work on chrome but not some other browsers?

@MilesAdamson
Copy link
Author

MilesAdamson commented Jun 25, 2024

@poovamraj based on your response, it appears your did not even read the issue and comments here completely. And it has been another month without a new comment

@Widcket is this the level of support we should expect for this plugin? If so we will consider alternatives

@Widcket
Copy link
Contributor

Widcket commented Jun 25, 2024

Hi @MilesAdamson, please note I'm no longer the maintainer of this library.

@arthurgiani
Copy link

arthurgiani commented Oct 10, 2024

Any updates? Same problem here

It works if I set a custom scheme, but not using app-links.

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

7 participants