flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

pod install error related to quill_native_bridge

Open CherishMvp opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

Flutter Quill version

No response

Steps to reproduce

image 一运行就会立马闪退,随后报错。“-[FlutterEngine registrarForPlugin:], FlutterEngine.mm:1338 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate plugin key: QuillNativeBridgePlugin'” 插件版本: flutter_quill: ^10.7.0 flutter_quill_extensions: ^10.7.0 不使用这些插件我是运行正常的项目。

Xcode build done. 95.6s (lldb) 2024-10-15 08:04:11.958526+0800 Runner[1217:367695] *** Assertion failure in -[FlutterEngine registrarForPlugin:], FlutterEngine.mm:1338 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Duplicate plugin key: QuillNativeBridgePlugin' *** First throw call stack: (0x18a994cb4 0x183a343d0 0x18512a54c 0x10897df9c 0x1025f4634 0x1025f48f4 0x1025f4be4 0x18cd4f054 0x18cd4e78c 0x18cd4d768 0x18cd4d3b4 0x18ca95664 0x18cdd3850 0x18cc85c5c 0x18cc85a84 0x18cc85634 0x18cc85500 0x18d372a68 0x18d411074 0x18cb32c70 0x18cfa41ac 0x18cc03c60 0x18cc03ad0 0x18cc03028 0x18cc02db4 0x1a0a102e4 0x1a0a50068 0x1a0a14120 0x1a0a4fcc0 0x191e5beac 0x191e5f91c 0x1a0a1e24c 0x1a0a1dde8 0x1a0a20694 0x18aa5e128 0x18aa6a7b4 0x18a9ef5e8 0x18aa050d4 0x18aa0a3ec 0x1c5f2035c 0x18cd96f58 0x18cd96bbc 0x1934240b0 0x1025f4d88 0x1025f4d00 0x1025f4e04 0x1a9f3cdec) libc++abi: terminating due to uncaught exception of type NSException

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00000001c9951578 libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib: -> 0x1c9951578 <+8>: b.lo 0x1c9951598 ; <+40> 0x1c995157c <+12>: pacibsp 0x1c9951580 <+16>: stp x29, x30, [sp, #-0x10]! 0x1c9951584 <+20>: mov x29, sp Target 0: (Runner) stopped.

Expected results

正常运行调试

Actual results

闪退崩溃

Additional Context

Screenshots / Video demonstration

[Upload media here]

Logs
[Paste your logs here]

CherishMvp avatar Oct 15 '24 00:10 CherishMvp

when i use the default latest version: flutter_quill_extensions: ^10.8.2 flutter_quill: ^10.7.6 occurre: ❯ pod install Analyzing dependencies [!] No podspec found for quill_native_bridge_platform_interface in .symlinks/plugins/quill_native_bridge_platform_interface/ios such as flutter clean && flutter pub get xxxxx not useful

CherishMvp avatar Oct 15 '24 00:10 CherishMvp

the xcode shows image

CherishMvp avatar Oct 15 '24 00:10 CherishMvp

Related #2230 but not merged yet, I have updated the pubspec.yaml to avoid using newer versions of thequill_native_bridge plugin.

Can you tell me which version you're able to reproduce the issue and which version didn't have the issue? Have you encountered it recently? Steps to reproduce, and can you encounter this issue in the example app of Flutter Quill?

Also, can you try:

dependency_overrides:
  flutter_quill:
    git:
      url: https://github.com/singerdmx/flutter-quill.git
      ref: feat/default-clipboard-native-impl

EchoEllet avatar Oct 15 '24 12:10 EchoEllet

There was no problem with flutter on android. I found that my mac version of Flutter was 3.24.0 while windows was 3.24.3. When I upgraded to the latest version 3.24.3, I found that the issue was no longer there and it worked fine on ios devices. So regardless of flutter_quill version 10.x, the issue of needing to upgrade flutter under mac will not exist

CherishMvp avatar Oct 16 '24 02:10 CherishMvp

As for your minimal instance demo, using flutter version 3.24.0, you can install flutter_quill_extensions and flutter_quill directly using flutter pub get, and this will happen under ios

CherishMvp avatar Oct 16 '24 02:10 CherishMvp

There was no problem with flutter on android. I found that my mac version of Flutter was 3.24.0 while windows was 3.24.3

This issue is related to iOS and specific to Xcode/Apple ecosystem, which is unsupported on Windows, so it's likely irrelevant.

If it's a bug with quill_native_bridge, then it's most likely a platform-specific configuration issue with the iOS plugin.

the issue of needing to upgrade flutter under mac will not exist

The issue is with the plugin quill_native_bridge. Since version 10.6.2 is used in the latest version of flutter_quill, we have changes in #2230 that are unpublished yet.

Can you try with this branch and see if the issue encountered:

dependency_overrides:
  flutter_quill:
    git:
      url: https://github.com/singerdmx/flutter-quill.git
      ref: feat/default-clipboard-native-impl

you can install flutter_quill_extensions

AFAIK, the extensions package should not cause this build failure since the issue is with quill_native_bridge, which is a dependency of flutter_quill. Does removing the flutter_quill_extensions fix the encountered issue?

EchoEllet avatar Oct 16 '24 12:10 EchoEllet

I'll try it later

CherishMvp avatar Oct 17 '24 01:10 CherishMvp

I was able to encounter the issue of an outdated app with #2230

The issue is that Podfile is outdated with newer versions of Flutter, specifically this line caused the issue in the Podfile:

platform :ios, '12.0'

To fix the issue:

flutter clean && flutter pub get && flutter pub upgrade
cd ios
rm Podfile && rm Podfile.lock
pod install --repo-update

The part that fixes the issue is to remove both Podfile and Podfile.lock (from your ios directory) and then once you run the app, Flutter CLI will generate those files once again, double-check if you have a custom configuration in Podfile since they will be undone.

The issue flutter_keyboard_visibility #52 is very similar (thanks to them, was able to identify the issue faster), it doesn't appear to be a bug from quill_native_bridge_ios, it's likely Podfile configuration issue, The error can sometimes be irrelevant or not quite specific.

EchoEllet avatar Oct 17 '24 03:10 EchoEllet

I encountered the issue again in the example app and once again on that outdated app, it appears quill_native_bridge_platform_interface implemented the iOS plugin which is probably a regression and wasn't an issue before the split and moved each platform implementation into its package, the platform interface doesn't implement any platform itself, this part was causing the issue.

Run flutter pub upgrade and the issue should be fixed.

EchoEllet avatar Oct 17 '24 04:10 EchoEllet

I'll try it later

Can you confirm if the issue is fixed (after running flutter pub upgrade and updating your Podfile if it was outdated)?

EchoEllet avatar Oct 17 '24 04:10 EchoEllet

I think the issue should be on dead flutter version thanks。 by the way. how to preview quill json format content in a widget

CherishMvp avatar Oct 17 '24 08:10 CherishMvp

how to preview quill json format content in a widget

I'm not quite sure. Do you mean parsing the JSON and loading it as a document or a widget that provides a visual preview? For JSON, there are many packages, though specifically for JSON Delta. I don't think there is a flutter package.

EchoEllet avatar Oct 17 '24 14:10 EchoEllet