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

useragent not work on release mode #135

Closed
ridz0n3 opened this issue Jul 22, 2019 · 10 comments
Closed

useragent not work on release mode #135

ridz0n3 opened this issue Jul 22, 2019 · 10 comments

Comments

@ridz0n3
Copy link

ridz0n3 commented Jul 22, 2019

Hi,

im currently do the google login using my current backend,
i put the user agent like this,
"userAgent": 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Mobile Safari/537.36',
it working on debug mode, when in release mode, the browser return 403 - disallowed useragent is there any solution to this problem?

Thanks

@do4Mother
Copy link

same problem

@pichillilorenzo
Copy link
Owner

Try the latest version of the plugin. Also, this plugin changed its name to flutter_inappwebview. The current latest version now is 2.1.0+1. So, you can change your dependency influtter_inappwebview: ^2.1.0+1.

@lawliet467
Copy link

Try the latest version of the plugin. Also, this plugin changed its name to flutter_inappwebview. The current latest version now is 2.1.0+1. So, you can change your dependency influtter_inappwebview: ^2.1.0+1.

not work for me, please check it and hope your reply

@fif1973
Copy link

fif1973 commented Jan 28, 2020

Same problem for me

dependencies:
  flutter:
    sdk: flutter
...
  flutter_inappwebview:
    git:
      url: https://github.com/pichillilorenzo/flutter_inappwebview.git
      ref: master

@fif1973
Copy link

fif1973 commented Jan 28, 2020

I just test on iOS (debug and release), it works.
The problem still exists on Androïd

@ariefaprilianto
Copy link

Not worked for me too, please @pichillilorenzo give your any advice.

@ariefaprilianto
Copy link

Somehow my InAppWebViewOptions values not passed through libraries constructor, is it possible that those values are being stripped?

@ariefaprilianto
Copy link

For my workarround, I try to give default value to the source constructor.

@vavramovski
Copy link

vavramovski commented May 2, 2020

I fixed this problem by changing the default value of the userAgent in android version of the webview package.
This is the file
flutter_inappwebview-9c7ac0da8f01ceb40430da58397bdb31968ca5b1\ android \src\main\java\com\pichillilorenzo\flutter_inappwebview\InAppWebView\InAppWebViewOptions.java

public String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36";

@pichillilorenzo
Copy link
Owner

Fix available starting from the version 3.0.0.

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

No branches or pull requests

7 participants