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

WebviewScaffold crash on iOS 11.4 device with release build #134

Closed
va-andrew opened this issue Jul 22, 2018 · 1 comment
Closed

WebviewScaffold crash on iOS 11.4 device with release build #134

va-andrew opened this issue Jul 22, 2018 · 1 comment

Comments

@va-andrew
Copy link

This app opens properly the first time after running with --release. After closing the app and opening again, it usually (but not always) crashes immediately.

Minimal example:

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return WebviewScaffold(
      url: 'https://www.google.com',
      appBar: AppBar(
        leading: IconButton(
          icon: Icon(Icons.account_balance),
          onPressed: () {},
        ),
        title: Text('WebView test')
      ),
    );
  }
}

Device: iPhone 6, iOS 11.4.1
Plugin version: 0.1.6
Flutter doctor:

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.6 17G65, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
[✓] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.25.1)
[✓] Connected devices (1 available)
@va-andrew
Copy link
Author

Enforcing a non-negative webview height seems to solve this -- #135

lejard-h added a commit that referenced this issue Jul 26, 2018
Fix for #134 - WebviewScaffold crash on iOS
@lejard-h lejard-h closed this as completed Aug 1, 2018
charafau pushed a commit that referenced this issue Apr 7, 2020
Fix for #134 - WebviewScaffold crash on iOS
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

2 participants