question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work on Samsung Galaxy Note 4 (and probably Note 3)

See original GitHub issue

Hi!

It seems that the Samsung browser (“com.sec.android.app.sbrowser”) on the Galaxy Note 4 and probably also the Galaxy Note 3 does not return to the app after the user has clicked the “Allow” button in the Google login web page. Instead it just loads “www.google.com”, which is the fallback if the app cannot be started as far as I know. So the app does not get any login information and cannot proceed with the authentication.

A workaround is to ignore that browser so that Google Chrome is used instead. E.g. this code has fixed the issue for me:

new AuthorizationService(this, 
    new AppAuthConfiguration.Builder()
        .setBrowserMatcher(new BrowserMatcher() {
          @Override
          public boolean matches(@NonNull BrowserDescriptor descriptor) {
            if (descriptor.useCustomTab 
                && StringUtils.equals(
                    descriptor.packageName, 
                    "com.sec.android.app.sbrowser")) {
              return false;
            }
            return true;
          }
        }).build())

However it would be good if it would work “out of the box”, i.e. if the AppAuth library could handle (blacklist?) this by itself. I have found functions to blacklist certain versions of a browser in AppAuth but it seems that it doesn’t blacklist any browsers by itself.

What do you think? Should AppAuth blacklist this automatically? Samsung probably won’t fix these old devices any more.

Kind regards

Dominique

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dg76commented, Sep 13, 2017

@camhart The function above does not completely blacklist the Samsung browser. It will still use it if no other browser is available.

The reason is the descriptor.useCustomTab flag. The library will first try to find a browser that supports custom tabs. Only if no such browser is found it will use browsers without custom tabs. And my function above only blacklists the Samsung browser in the search for custom tab browsers. So when searching browsers without support for custom tabs the Samsung browser will still be taken into account (but will probably nevertheless fail to work correctly).

0reactions
camhartcommented, Sep 13, 2017

Any updates here? I’ve seen it occasionally on the Samsung Galaxy S6.

@dg76 Do you know if android devices are guaranteed to have a browser other than the samsung one? I’m concerned blacklisting it will result in no browser being available.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Phone wont charge or turn on. - Samsung Galaxy Note 4 - iFixit
Take the battery out and hold the power button down for 1 minute with the battery out. Put the battery back in and...
Read more >
8 Common Galaxy Note 3 Problems & How to Fix Them
First, make sure you're using the charger that came with the Galaxy Note 3. If it still doesn't work, try using a charger...
Read more >
8 problems with the Samsung Galaxy Note 4 and fixes
Problem #2 – Issues connecting to Wi-Fi · Turn the Galaxy Note 4 and the router off for at least ten seconds, then...
Read more >
Samsung Galaxy Note 4 - Page 2
NOTHING IS CHANGING WITH THESE S*** UPDATES. YOU HAVE TO (YOU HAVE TO) GIVE ANDROID NOUGAT TO NOTE 4 AND REPAIR YOUR FAULT....
Read more >
How to Fix Common Problems with Samsung Galaxy Note 3
Samsung Galaxy Note 3 Touch Screen Digitizer Plus LCD Display: This controls both your touch function and your main image display. If your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found