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

Unhandled exception error after adding AppDelegate.swift code to the app #30

Open
pgyusz opened this issue Sep 13, 2023 · 4 comments
Open

Comments

@pgyusz
Copy link

pgyusz commented Sep 13, 2023

After adding the AppDelegate.swift code (4. step) the app gives me this error
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getUDID on channel flutter_udid) #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7) <asynchronous suspension> #1 FlutterUdid.udid (package:flutter_udid/flutter_udid.dart:15:25) <asynchronous suspension>

I thought that it was a package issue with flutter_udid, but after removing it I had problem with flutter_webview package and so on
Even after running pod update and pod install it still didn't fix it. I even regenerated the iOS folder, from zero, created a new flutter project but I still get the same issue.

If I leave the original AppDelegate.swift code, then the share extent stops after I select the app (my app).

@FelixGaebler
Copy link
Contributor

Try restarting your environment.

  • Cancel your current flutter run
  • Restart your emulator (if used/running)
  • Execute flutter clean and flutter pub get

this should solve your problem. Its a typical hot reloading issue.

@pgyusz
Copy link
Author

pgyusz commented Sep 19, 2023

Tried it, it does not fix anything.
Some details about my environment:

`
[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
• Flutter version 3.10.6 on channel stable at /Users/gyusz/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f468f3366c (10 weeks ago), 2023-07-12 15:19:05 -0700
• Engine revision cdbeda788a
• Dart version 3.0.6
• DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
• Android SDK at /Users/gyusz/Library/Android/sdk
• Platform android-33, build-tools 32.0.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14E300c
• CocoaPods version 1.12.1
`

@pgyusz
Copy link
Author

pgyusz commented Sep 21, 2023

After creating a new flutter project and importing only the flutter_share_intent package I get (kinda) the same exception

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getInitialSharing on channel flutter_sharing_intent)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)
<asynchronous suspension>
#1      MethodChannelFlutterSharingIntent.getInitialSharing (package:flutter_sharing_intent/flutter_sharing_intent_method_channel.dart:29:18)
<asynchronous suspension>

======== Exception caught by services library ======================================================
The following MissingPluginException was thrown while activating platform stream on channel flutter_sharing_intent/events-sharing:
MissingPluginException(No implementation found for method listen on channel flutter_sharing_intent/events-sharing)

When the exception was thrown, this was the stack: 
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308:7)
<asynchronous suspension>
#1      EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:652:9)
<asynchronous suspension>
====================================================================================================

The exception only shows up when you add the example code to the main.dart.

@akrost
Copy link

akrost commented Jan 10, 2024

I have the same issue. Were you able to fix it?

Edit:
Fixed it. The reason I saw this was because I replaced the existing application() function by the one given in the README, even though they have different signatures. So instead of replacing it, just add the second function.

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

3 participants