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

Flutter run crashing at +[GeneratedPluginRegistrant registerWithRegistry:] #44668

Closed
praveen-francium opened this issue Nov 12, 2019 · 10 comments
Labels
waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@praveen-francium
Copy link

*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23b98bde __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff503b5b20 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff23b98958 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
	4   Flutter                             0x0000000104a93cc9 -[FlutterEngine registrarForPlugin:] + 282
	5   Runner                              0x0000000104472ba4 +[GeneratedPluginRegistrant registerWithRegistry:] + 580
	6   Runner                              0x00000001044732ce $s6Runner11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 1230
	7   Runner    <…>
Error connecting to the service protocol: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:51252/ktV8at-Bflo=/ws```

Flutter doctor output
```Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale en-GB)
 
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.4)
[✓] IntelliJ IDEA Community Edition (version 2019.2.4)
[✓] VS Code (version 1.33.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.```

@praveen-francium
Copy link
Author

Could anyone help me with this issue in IOS?

@iapicca
Copy link
Contributor

iapicca commented Nov 12, 2019

Hi @praveen-francium
it looks like there was some problem with the connection

Error connecting to the service protocol: HttpException: 
Connection closed before full header was received, uri = http://127.0.0.1:51252/ktV8at-Bflo=/ws

if the issue persist after retrying making sure the connection is stable,
could you please provide your complete flutter run --verbose or flutter build --verbose ?
Also, to better address the issue, would be helpful
if you could post a minimal code sample to reproduce the problem
Thank you

@iapicca iapicca added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 12, 2019
@praveen-francium
Copy link
Author

Output of the flutter run --verbose

[  +49 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 68587a0916366e9512a78df22c44163d041dd5f3
[        ] executing: [/Users/praveenramalingam/development/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +87 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.9.1+hotfix.6-0-g68587a091
[   +9 ms] executing: [/Users/praveenramalingam/development/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +16 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/praveenramalingam/development/flutter/] git ls-remote --get-url origin
[  +10 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +65 ms] executing: [/Users/praveenramalingam/development/flutter/] git rev-parse --abbrev-ref HEAD
[  +14 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[+1102 ms] executing: /Users/praveenramalingam/Library/Android/sdk/platform-tools/adb devices -l
[  +11 ms] Exit code 0 from: /Users/praveenramalingam/Library/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
[  +10 ms] executing: /Users/praveenramalingam/development/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[  +51 ms] /usr/bin/xcrun simctl list --json devices
[ +146 ms] No supported devices connected.
[   +9 ms] "flutter run" took 1,346ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:281:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:465:11)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:407:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#5      _rootRun (dart:async/zone.dart:1124:13)
#6      _CustomZone.run (dart:async/zone.dart:1021:19)
#7      _runZoned (dart:async/zone.dart:1516:10)
#8      runZoned (dart:async/zone.dart:1463:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:397:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:402:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1124:13)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _runZoned (dart:async/zone.dart:1516:10)
#17     runZoned (dart:async/zone.dart:1463:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#25     _rootRun (dart:async/zone.dart:1124:13)
#26     _CustomZone.run (dart:async/zone.dart:1021:19)
#27     _runZoned (dart:async/zone.dart:1516:10)
#28     runZoned (dart:async/zone.dart:1500:12)
#29     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#31     _rootRun (dart:async/zone.dart:1124:13)
#32     _CustomZone.run (dart:async/zone.dart:1021:19)
#33     _runZoned (dart:async/zone.dart:1516:10)
#34     runZoned (dart:async/zone.dart:1463:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#36     runInContext (package:flutter_tools/src/context_runner.dart:59:24)
<asynchronous suspension>
#37     run (package:flutter_tools/runner.dart:50:10)
#38     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#39     main (file:///Users/praveenramalingam/development/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)```

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 12, 2019
@jmagman
Copy link
Member

jmagman commented Nov 13, 2019

Looks like the app crashed. That log isn't very good, but it might be here:
https://github.com/flutter/engine/blob/v1.9.1-hotfixes/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm#L580

NSAssert(self.pluginPublications[pluginKey] == nil, @"Duplicate plugin key: %@", pluginKey);
  1. Can we get the crash log? Reproduce the crash, and find the right crash log through the date and time at:
    Xcode > Window > Devices and Simulators > your device > View Device Logs
  2. Is it possible you've called +[GeneratedPluginRegistrant registerWithRegistry:] in your app twice?
  3. Please paste the contents of ios/Runner/GeneratedPluginRegistrant.m

@jmagman jmagman changed the title Flutter run throwing error in Mac Catalina OS Flutter run crashing at +[GeneratedPluginRegistrant registerWithRegistry:] Nov 13, 2019
@praveen-francium
Copy link
Author

praveen-francium commented Nov 13, 2019

@jmagman

//  Generated file. Do not edit.
//

#import "GeneratedPluginRegistrant.h"
#import <connectivity/ConnectivityPlugin.h>
#import <firebase_messaging/FirebaseMessagingPlugin.h>
#import <flutter_keyboard_visibility/KeyboardVisibilityPlugin.h>
#import <flutter_webview_plugin/FlutterWebviewPlugin.h>
#import <intercom_flutter/IntercomFlutterPlugin.h>
#import <keyboard_visibility/KeyboardVisibilityPlugin.h>
#import <shared_preferences/SharedPreferencesPlugin.h>
#import <url_launcher/UrlLauncherPlugin.h>

@implementation GeneratedPluginRegistrant

+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  [FLTConnectivityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTConnectivityPlugin"]];
  [FLTFirebaseMessagingPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTFirebaseMessagingPlugin"]];
  [FLTKeyboardVisibilityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTKeyboardVisibilityPlugin"]];
  [FlutterWebviewPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterWebviewPlugin"]];
  [IntercomFlutterPlugin registerWithRegistrar:[registry registrarForPlugin:@"IntercomFlutterPlugin"]];
  [FLTKeyboardVisibilityPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTKeyboardVisibilityPlugin"]];
  [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]];
  [FLTUrlLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTUrlLauncherPlugin"]];
}

@end

@jmagman
Copy link
Member

jmagman commented Nov 13, 2019

@praveen-francium Thanks for the GeneratedPluginRegistrant.

  1. Can we get the crash log? Reproduce the crash, and find the right crash log through the date and time at:
    Xcode > Window > Devices and Simulators > your device > View Device Logs
  2. Is it possible you've called +[GeneratedPluginRegistrant registerWithRegistry:] in your app twice?

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 13, 2019
@sh0umik
Copy link

sh0umik commented Dec 1, 2019

Same problem here ..

@jmagman
Copy link
Member

jmagman commented Dec 2, 2019

@sh0umik are you able to get these then?

  1. Can we get the crash log? Reproduce the crash, and find the right crash log through the date and time at:
    Xcode > Window > Devices and Simulators > your device > View Device Logs
  2. Is it possible you've called +[GeneratedPluginRegistrant registerWithRegistry:] in your app twice?

@no-response
Copy link

no-response bot commented Dec 4, 2019

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

4 participants