flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

Constraint error when clicking textbox inside webview

Open osorito opened this issue 6 years ago • 7 comments

final FlutterWebviewPlugin _webView = new FlutterWebviewPlugin();

If I call "_webView.launch(" it opens my company's login page, but if I click on the email textbox it displays this message on the terminal. The app works fine, it just has that behavior every time you try to access a textbox.

For a more detailed help message, press "h". To detach, press "d"; to quit, press "q". Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x60000099f9d0 h=-&- v=-&- _UIToolbarContentView:0x7fa98ed1a360.width == UIToolbar:0x7fa98ed16570.width (active)>", "<NSLayoutConstraint:0x60000099a490 H:|-(0)-[_UIButtonBarStackView:0x7fa98ed2fda0] (active, names: '|':_UIToolbarContentView:0x7fa98ed1a360 )>", "<NSLayoutConstraint:0x60000099a4e0 _UIButtonBarStackView:0x7fa98ed2fda0.trailing == _UIToolbarContentView:0x7fa98ed1a360.trailing (active)>", "<NSLayoutConstraint:0x6000009836b0 H:|-(0)-[_UIModernBarButton:0x7fa98ed50520] (active, names: '|':_UIButtonBarButton:0x7fa98ed4fc80 )>", "<NSLayoutConstraint:0x6000009831b0 H:[_UIModernBarButton:0x7fa98ed50520]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed4fc80 )>", "<NSLayoutConstraint:0x600000984aa0 H:|-(>=5)-[_UIModernBarButton:0x7fa98ed52c20] (active, names: '|':_UIButtonBarButton:0x7fa98ed525b0 )>", "<NSLayoutConstraint:0x600000984af0 H:[_UIModernBarButton:0x7fa98ed52c20]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed525b0 )>", "<NSLayoutConstraint:0x600000987840 H:|-(8)-[_UIModernBarButton:0x7fa98ed535c0'Done'] (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x6000009878e0 H:[_UIModernBarButton:0x7fa98ed535c0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x600000999db0 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fa98ed4fc80.leading (active)>", "<NSLayoutConstraint:0x600000999810 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fa98ed53140.trailing (active)>", "<NSLayoutConstraint:0x600000999770 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed4fc80]-(0)-[UIView:0x7fa98ed523d0] (active)>", "<NSLayoutConstraint:0x6000009983c0 'UISV-spacing' H:[UIView:0x7fa98ed523d0]-(0)-[_UIButtonBarButton:0x7fa98ed525b0] (active)>", "<NSLayoutConstraint:0x600000998690 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed525b0]-(0)-[UIView:0x7fa98ed52f60] (active)>", "<NSLayoutConstraint:0x6000009985f0 'UISV-spacing' H:[UIView:0x7fa98ed52f60]-(0)-[_UIButtonBarButton:0x7fa98ed53140] (active)>", "<NSLayoutConstraint:0x60000099f5c0 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fa98ed16570.width == 0 (active)>", "<NSLayoutConstraint:0x6000009999a0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>", "<NSLayoutConstraint:0x600000999860 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000009831b0 H:[_UIModernBarButton:0x7fa98ed50520]-(>=8)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed4fc80 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x60000099f9d0 h=-&- v=-&- _UIToolbarContentView:0x7fa98ed1a360.width == UIToolbar:0x7fa98ed16570.width (active)>", "<NSLayoutConstraint:0x60000099a490 H:|-(0)-[_UIButtonBarStackView:0x7fa98ed2fda0] (active, names: '|':_UIToolbarContentView:0x7fa98ed1a360 )>", "<NSLayoutConstraint:0x60000099a4e0 _UIButtonBarStackView:0x7fa98ed2fda0.trailing == _UIToolbarContentView:0x7fa98ed1a360.trailing (active)>", "<NSLayoutConstraint:0x600000984aa0 H:|-(>=5)-[_UIModernBarButton:0x7fa98ed52c20] (active, names: '|':_UIButtonBarButton:0x7fa98ed525b0 )>", "<NSLayoutConstraint:0x600000984af0 H:[_UIModernBarButton:0x7fa98ed52c20]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed525b0 )>", "<NSLayoutConstraint:0x600000987840 H:|-(8)-[_UIModernBarButton:0x7fa98ed535c0'Done'] (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x6000009878e0 H:[_UIModernBarButton:0x7fa98ed535c0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x600000999db0 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fa98ed4fc80.leading (active)>", "<NSLayoutConstraint:0x600000999810 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fa98ed53140.trailing (active)>", "<NSLayoutConstraint:0x600000999770 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed4fc80]-(0)-[UIView:0x7fa98ed523d0] (active)>", "<NSLayoutConstraint:0x6000009983c0 'UISV-spacing' H:[UIView:0x7fa98ed523d0]-(0)-[_UIButtonBarButton:0x7fa98ed525b0] (active)>", "<NSLayoutConstraint:0x600000998690 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed525b0]-(0)-[UIView:0x7fa98ed52f60] (active)>", "<NSLayoutConstraint:0x6000009985f0 'UISV-spacing' H:[UIView:0x7fa98ed52f60]-(0)-[_UIButtonBarButton:0x7fa98ed53140] (active)>", "<NSLayoutConstraint:0x60000099f5c0 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fa98ed16570.width == 0 (active)>", "<NSLayoutConstraint:0x6000009999a0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>", "<NSLayoutConstraint:0x600000999860 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x600000984af0 H:[_UIModernBarButton:0x7fa98ed52c20]-(>=5)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed525b0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "<NSAutoresizingMaskLayoutConstraint:0x60000099f9d0 h=-&- v=-&- _UIToolbarContentView:0x7fa98ed1a360.width == UIToolbar:0x7fa98ed16570.width (active)>", "<NSLayoutConstraint:0x60000099a490 H:|-(0)-[_UIButtonBarStackView:0x7fa98ed2fda0] (active, names: '|':_UIToolbarContentView:0x7fa98ed1a360 )>", "<NSLayoutConstraint:0x60000099a4e0 _UIButtonBarStackView:0x7fa98ed2fda0.trailing == _UIToolbarContentView:0x7fa98ed1a360.trailing (active)>", "<NSLayoutConstraint:0x600000987840 H:|-(8)-[_UIModernBarButton:0x7fa98ed535c0'Done'] (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x6000009878e0 H:[_UIModernBarButton:0x7fa98ed535c0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>", "<NSLayoutConstraint:0x600000999db0 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.leading == _UIButtonBarButton:0x7fa98ed4fc80.leading (active)>", "<NSLayoutConstraint:0x600000999810 'UISV-canvas-connection' UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide'.trailing == _UIButtonBarButton:0x7fa98ed53140.trailing (active)>", "<NSLayoutConstraint:0x600000999770 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed4fc80]-(0)-[UIView:0x7fa98ed523d0] (active)>", "<NSLayoutConstraint:0x6000009983c0 'UISV-spacing' H:[UIView:0x7fa98ed523d0]-(0)-[_UIButtonBarButton:0x7fa98ed525b0] (active)>", "<NSLayoutConstraint:0x600000998690 'UISV-spacing' H:[_UIButtonBarButton:0x7fa98ed525b0]-(0)-[UIView:0x7fa98ed52f60] (active)>", "<NSLayoutConstraint:0x6000009985f0 'UISV-spacing' H:[UIView:0x7fa98ed52f60]-(0)-[_UIButtonBarButton:0x7fa98ed53140] (active)>", "<NSLayoutConstraint:0x60000099f5c0 'UIView-Encapsulated-Layout-Width' UIToolbar:0x7fa98ed16570.width == 0 (active)>", "<NSLayoutConstraint:0x6000009999a0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide' (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>", "<NSLayoutConstraint:0x600000999860 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x6000013b63e0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':_UIButtonBarStackView:0x7fa98ed2fda0 )>" )

Will attempt to recover by breaking constraint <NSLayoutConstraint:0x6000009878e0 H:[_UIModernBarButton:0x7fa98ed535c0'Done']-(0)-| (active, names: '|':_UIButtonBarButton:0x7fa98ed53140 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

osorito avatar Apr 23 '19 16:04 osorito

Having the exact same issue ...

gem85247 avatar May 01 '19 11:05 gem85247

+1

devashish-patel avatar May 18 '19 18:05 devashish-patel

might be duplicate of https://github.com/fluttercommunity/flutter_webview_plugin/issues/85

charafau avatar Jun 11 '19 11:06 charafau

anyone found any solution ! I am facing it !

shajedulislam avatar Oct 06 '19 10:10 shajedulislam

The same happens for me. Only in the simulator, though! I don't think this is an issue with flutter as this happens to me with a native SwiftUI application (XCode 11.3).

Schnodderbalken avatar Jan 10 '20 13:01 Schnodderbalken

I am using XCode 11.4, the iPhone 11 Pro Max device (Simulator), Flutter 1.12.13+hotfix.9 and can reproduce this easily with code as simple as:

import 'package:flutter/material.dart';
import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'WebView Form Bug',
      home: WebviewScaffold(
        appBar: AppBar(title: Text('WebView Form Bug')),
        url: 'https://www.facebook.com',
      ),
    );
  }
}

It seems that clicking on any form input will trigger this layout issue. The url can be almost any page with a form field -- even https://flutter.dev/ (click on the Search field).

awhitford avatar Apr 08 '20 23:04 awhitford

any solution on this?

oplengs001 avatar May 25 '22 14:05 oplengs001