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

Better error message when displaying a FlutterEngine that hasn't been run #94498

Open
gaaclarke opened this issue Dec 1, 2021 · 1 comment
Open
Labels
engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team

Comments

@gaaclarke
Copy link
Member

gaaclarke commented Dec 1, 2021

The current behavior is Flutter crashing on an assertion.

-(void)viewDidAppear:(BOOL)animated {
  FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"" project:nil];
  // When the following `run` call is missing erroneously, Flutter just crashes in an assert.
  // We should provide better feedback.
  // [engine run];
  FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:engine nibName:nil bundle:nil];
  [self presentViewController:viewController animated:NO completion:nil];
  [super viewDidAppear:animated];
}
@gaaclarke gaaclarke added platform-ios iOS applications specifically engine flutter/engine repository. See also e: labels. labels Dec 1, 2021
@chinmaygarde chinmaygarde added P2 Important issues not at the top of the work list easy fix labels Dec 6, 2021
@buntypn
Copy link

buntypn commented Jul 26, 2022

@chinmaygarde I guess throwing NSException with proper message, will work. I am new here, if you guide me, I can take this up.

@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@Hixie Hixie removed the easy fix label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-ios iOS applications specifically team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

5 participants