Comments (8)
thank you, i don't know how i missed this change! the error doesn't show up now!
from dart_packages.
No worries, we had the same issue. For us also the plugins got registered twice, which sometimes does create some issues
from dart_packages.
Hey @Dreamersoul,
Thanks for reporting. You could please post the output of flutter doctor -v
and also the adb logcat
output here?
from dart_packages.
hey thank you for the response
flutter doctor -v
output:
[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.14.6 18G4032, locale en-KW)
• Flutter version 1.17.1 at /Users/Hamad/Development/flutter
• Framework revision f7a6a7906b (2 weeks ago), 2020-05-12 18:39:00 -0700
• Engine revision 6bc433c6b6
• Dart version 2.8.2
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/Hamad/Library/Android/sdk
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.1
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.45.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.10.2
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
adb logcat
2020-05-26 17:34:59.876 8471-8588/com.example.app I/flutter: Transition { currentState: LoadingAnnouncements, event: Instance of 'LoadAnnouncements', nextState: LoadedAnnouncements }
2020-05-26 17:35:02.554 8471-8564/com.example.app V/FA: Inactivity, disconnecting from the service
2020-05-26 17:35:56.744 8471-8588/com.example.app E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(MISSING_ACTIVITY, Plugin is not attached to an activity, {url: https://appleid.apple.com/auth/authorize?client_id=com.example.app&redirect_uri=https%3A%2F%2Fexample.herokuapp.com%2Fuser%2Fauth%2Fapple%2Fcallback&scope=email+name&response_type=code+id_token&response_mode=form_post})
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
<asynchronous suspension>
#2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
#3 SignInWithApple._signInWithAppleAndroid (package:sign_in_with_apple/src/sign_in_with_apple.dart:231:34)
#4 SignInWithApple.getAppleIDCredential (package:sign_in_with_apple/src/sign_in_with_apple.dart:107:14)
#5 _RegisterWidgetState.buildRegisterButtons.<anonymous closure> (package:example/widgets/profile/register/register_widget.dart:219:56)
#6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:779:19)
#7 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:862:36)
#8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#9 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:504:11)
#10 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:282:5)
#11 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:254:7)
#12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
#13 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
#14 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
#15 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
#16 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
#17 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
#18 _rootRunUnary (dart:async/zone.dart:1196:13)
#19 _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
#21 _invoke1 (dart:ui/hooks.dart:275:10)
#22 _dispatchPointerDataPacket (dart:ui/hooks.dart:184:5)
here is my main activity which registers your plugin when i checked:
package com.phinests.clientapp
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}
after more debuging onAttachedToActivity
isn't called on https://github.com/aboutyou/dart_packages/blob/master/packages/sign_in_with_apple/android/src/main/kotlin/com/aboutyou/dart_packages/sign_in_with_apple/SignInWithApplePlugin.kt#L100
from dart_packages.
Potentially two things:
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
this part of the code is not needed anymore. Manual plugin registration shouldn't be done anymore: flutter/flutter#50004 (comment)
https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
from dart_packages.
@HenriBeck I have the same problem, and it is exactly because I'm using Android Embedding v1 (AEv1).
The issue is that we cannot change now to Android Embedding v2 (AEv2) at this moment.
I see that in the current master (0c1c4b8) you still support AEv1 with registerWith
but then this will always fail as AEv1 does not notify ActivityAware
interface methods.
So then binding?.activity
will always return null
Will this be likely be amended?
from dart_packages.
@jaggernod I guess we can add support for it, would you be able to look into it? We might not get to this before next week.
Usually, nothing should prevent you from upgrading as it is backward compatible, so plugins that don't support it (yet hopefully) still work.
from dart_packages.
Sure, I can find some time to create a PR soon
from dart_packages.
Related Issues (20)
- Sign in fails if no Apple account in device HOT 1
- no email in decoded jwt( identityToken ) HOT 4
- [SIGN_IN_WITH_APPLE]"Cannot Complete Request" Error after Clicking "Continue", Flutter Web HOT 1
- <data> tag failed HOT 3
- SSO with Apple in Flutter web not working
- SSO Apple sing in with firebase show Error Continue button not working , Flutter Web
- Apple delete account HOT 1
- sign_in_with_apple ^5.0.0 is forbidden HOT 1
- sign_in_with_apple: Migrate to `package:web` to support WASM HOT 6
- sign_in_with_apple: getCredentialState always returns authorized HOT 3
- Fix deprecation warnings
- Update dependencies (js) in sign_in_with_apple_web HOT 1
- iOS - Apple login not getting correct email and after successful login nothing happens HOT 2
- sign_in_with_apple web: TypeError when the sign in flow completes in version 6.0.0, works in 5.0.0 HOT 6
- I hope to add an option to remove Android dependencies, as Apple login is generally not needed on Android devices. HOT 4
- Add iOS privacy manifests HOT 4
- [sign_in_with_apple] Add privacy manifest file for iOS HOT 1
- Cannot find symbol ... sign_in_with_apple.SignInWithApplePlugin() HOT 5
- Facing issue in getting name in apple signin. HOT 4
- The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart_packages.