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

Twitter auth is no longer working #2

Closed
kentcb opened this issue Dec 15, 2018 · 4 comments
Closed

Twitter auth is no longer working #2

kentcb opened this issue Dec 15, 2018 · 4 comments

Comments

@kentcb
Copy link

kentcb commented Dec 15, 2018

Hi,

Are you aware that flutter_auth_with_twitter is broken, even using the latest version of flutter_twitter_login? The error I get is:

E/MethodChannel#com.roughike/flutter_twitter_login(12694): Failed to handle method call
E/MethodChannel#com.roughike/flutter_twitter_login(12694): java.lang.IllegalStateException: Must initialize Twitter before using getInstance()
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.twitter.sdk.android.core.Twitter.checkInitialized(Twitter.java:143)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.twitter.sdk.android.core.Twitter.getInstance(Twitter.java:151)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.twitter.sdk.android.core.TwitterCore.getInstance(TwitterCore.java:88)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.twitter.sdk.android.core.identity.TwitterAuthClient.<init>(TwitterAuthClient.java:72)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.roughike.fluttertwitterlogin.fluttertwitterlogin.TwitterLoginPlugin.getTwitterAuthClient(TwitterLoginPlugin.java:103)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.roughike.fluttertwitterlogin.fluttertwitterlogin.TwitterLoginPlugin.authorize(TwitterLoginPlugin.java:94)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at com.roughike.fluttertwitterlogin.fluttertwitterlogin.TwitterLoginPlugin.onMethodCall(TwitterLoginPlugin.java:59)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#com.roughike/flutter_twitter_login(12694): 	at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
<snip>

Just wondering if it's something you're aware of/know how to fix.

@Gogetter
Copy link
Owner

Hi @kentcb, it looks like an issue with flutter_twitter_login plugin. Issue is referenced here. Will keep an eye on it

@Gogetter
Copy link
Owner

[UPDATE]
You can resolve the error by adding two additional urls as callbacks in your Twitter app.
For Android: twittersdk://
For iOS: twitterkit-CONSUMERKEY://

android_emulator_-_pixel_2_xl_api_28_5554_and_iphone_xr_-_12_1

@kentcb
Copy link
Author

kentcb commented Dec 20, 2018

I already have those callback URLs added to my config:

image

And this seems to be happening before that is even a factor. Like, as soon as my app interacts with the TwitterLogin class, it goes 💥. This is Android, btw. Different problems with iOS, but they're build problems at this point and I figured I'd start with Android.

I'm starting to suspect tooling versioning at this point. I'm on Windows using Flutter 1.0.0. You?

@Gogetter
Copy link
Owner

Gogetter commented Dec 20, 2018

Hmmmm... That's interesting. I'm using MacOS. Are you able to load the initial activity (before clicking the login button)?

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

2 participants