Coder Social home page Coder Social logo

jorgefspereira / plaid_flutter Goto Github PK

View Code? Open in Web Editor NEW
69.0 10.0 49.0 1.03 MB

Plaid Link for Flutter. Integrates the native iOS, Android and Web SDKs.

Home Page: https://pub.dev/packages/plaid_flutter

License: MIT License

Java 10.00% Ruby 0.70% Objective-C 39.52% Dart 48.20% HTML 1.58%
plaid-link flutter plaid ios android

plaid_flutter's Introduction

Plaid Link for Flutter

pub points popularity likes donate

A Flutter plugin for Plaid Link.

This plugin integrates the native SDKs:

Feel free to leave any feedback here.

Requirements

In order to initialize Plaid Link, you will need to create a link_token at /link/token/create. After generating a link_token, you'll need to pass it into your app and use it to launch Link:

...

LinkConfiguration configuration = LinkTokenConfiguration(
    token: "<GENERATED_LINK_TOKEN>",
);

PlaidLink.open(configuration: configuration)

...

A link_token can be configured for different Link flows depending on the fields provided during token creation. It is the preferred way of initializing Link going forward. You will need to pass in most of your Link configurations server-side in the /link/token/create endpoint rather than client-side where they previously existed.

If your integration is still using a public_key to initialize Plaid Link, the LinkConfiguration class has support for it. Check the migration guide to upgrade your app to the link_token flow.

Installation

Add plaid_flutter as a dependency in your pubspec.yaml file.

iOS

Requirements

  • iOS version >= 14.0
  • Xcode 14 or greater

(Identity Verification only) - Enable camera support

When using the Identity Verification product, the Link SDK may use the camera if a user needs to take a picture of identity documentation. To support this workflow, add a NSCameraUsageDescription entry to your ios/Runner/Info.plist with an informative string.

OAuth configuration

If your integration uses only Identity Verification or Monitor, this steps can be skipped; they are mandatory otherwise.

Registering your redirect URI:

  • Sign in to the Plaid Dashboard and go to the Team Settings -> API page.
  • Next to Allowed redirect URIs click Configure then Add New URI.
  • Enter your redirect URI, which you must also set up as a Universal Link for your application, for example: https://app.example.com/plaid/.
  • Click Save Changes

These redirect URIs must be set up as Universal Links in your application.

More info at https://plaid.com/docs/link/ios.

Android

Requirements

Gradle Configuration

Go to the project level android/app/build.gradle and make sure you are using a minSdk >= 21

(Identity Verification only) - Enable camera support

If your app uses Identity Verification, a user may need to take a picture of identity documentation or a selfie during the Link flow. To support this workflow, the CAMERA, WRITE_EXTERNAL_STORAGE, RECORD_AUDIO, and MODIFY_AUDIO_SETTINGS permissions need to be added to your application's AndroidManifest.xml.

Register your App ID

  • Sign in to the Plaid Dashboard and go to the Team Settings -> API page.
  • Next to Allowed Android Package Names click Configure then Add New Android Package Name.
  • Enter your package name, for example com.plaid.example.
  • Click Save Changes.

More info at https://plaid.com/docs/link/android.

Web

Requirements

Include the Plaid Link initialize script on your main HTML page.

<script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>

More info at https://plaid.com/docs/link/web.

plaid_flutter's People

Contributors

davidmigloz avatar dtroupe-plaid avatar fonkamloic avatar fryette avatar jaredanderton avatar jeroenmols avatar jhionan avatar jorgefspereira avatar joshuadeguzman avatar maurimiguez avatar michaelgoodmoney avatar mikemilla avatar ndahlquist avatar pavanpucha avatar rs-follow avatar slauzinho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plaid_flutter's Issues

Crash when opening the app

I get this exception when I open the app

FATAL EXCEPTION: pool-4-thread-1
E/AndroidRuntime(11023): Process: com.myapp.app, PID: 11023
E/AndroidRuntime(11023): java.lang.IllegalArgumentException: com.myapp.app: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/AndroidRuntime(11023): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
E/AndroidRuntime(11023):        at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
E/AndroidRuntime(11023):        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
E/AndroidRuntime(11023):        at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
E/AndroidRuntime(11023):        at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:196)
E/AndroidRuntime(11023):        at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:128)
E/AndroidRuntime(11023):        at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:93)
E/AndroidRuntime(11023):        at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
E/AndroidRuntime(11023):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(11023):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(11023):        at java.lang.Thread.run(Thread.java:920)

'Close' method not implemented

Hey @jorgefspereira,

I'm listening to the events from Plaid, and in some scenarios I need to close the Plaid window and return to my app.
In iOS this works great by calling PlaidLink.close();
However, in Android it doesn't work and I noticed the close method has no implementation.
Is there a reason for that? How can I add the close logic?

Thanks,
Avi

Release 2.0.9 soon?

Do you have any plans to release 2.0.9?
Or maybe you can provide steps how to migrate from 1.x to 2.x package?
I tried to fetch from GitHub, but unfortunately get an exception about linking.
Steps:
Create new project, add reference to flutter_plaid and try to build
Actual error:

ios/Pods/Plaid/LinkKit.xcframework/ios-arm64/LinkKit.framework/LinkKit, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64
    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_PLKAccountSubtypeUnknown", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o
      "_OBJC_CLASS_$_PLKAccountSubtypeInvestment", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o
      "_OBJC_CLASS_$_PLKAccountSubtypeCredit", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o
      "_OBJC_CLASS_$_PLKAccountSubtypeOther", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o
      "_OBJC_CLASS_$_PLKOAuthNonceConfiguration", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o
      "_OBJC_CLASS_$_PLKLinkPublicKeyConfigurationToken", referenced from:
          objc-class-ref in PlaidFlutterPlugin.o


Warning Note When Launching On Android

Note: /Users/jae/development/flutter/.pub-cache/hosted/pub.dartlang.org/plaid_flutter-2.1.4/android/src/main/java/com/github/jorgefspereira/plaid_flutter/PlaidFlutterPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/jae/development/flutter/.pub-cache/hosted/pub.dartlang.org/plaid_flutter-2.1.4/android/src/main/java/com/github/jorgefspereira/plaid_flutter/PlaidFlutterPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
This notes were generated during launch. I personally do not know how to remove them but does anyone has an idea?

Android app is crashing : JDK version need to be updated as this package is clashing with other with updated JDK version

I am working on wallet app which contains both plaid and stripe. I have created an issue there but they mentioned that other library is using older JDK version which is creating an issue. Problem is mentioned below please resolve this issue. Thanks

     Duplicate class org.bouncycastle.x509.X509StreamParserSpi found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509Util found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509Util$Implementation found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509V1CertificateGenerator found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509V2AttributeCertificate found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509V2CRLGenerator found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509V2CRLGenerator$ExtCRLException found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)
     Duplicate class org.bouncycastle.x509.X509V3CertificateGenerator found in modules jetified-bcprov-jdk14-1.69 (org.bouncycastle:bcprov-jdk14:1.69) and jetified-bcprov-jdk15to18-1.69 (org.bouncycastle:bcprov-jdk15to18:1.69)

Unable to continue with Oauth result

Hi,

I am using this plugin which works great but I am currently trying to implement Oauth.
I am using the Token Configuration for my Link workflow.

Everything is setup with App Links, the bank's webpage opens and comes back in my App with the "Oauth_state_id" appended to the URI.

However, I do not know what to do with it to continue the Link process once I have it.

I have noticed that the Link iOS SDK exposes a "continue" method to pass the redirectURI with but such method is not exposed in this plugin.

Can you please help me?

I tried to

Thanks

Account Subtype error: Investment > Brokerage

Hi,

I think there's an issue when specifying investment account type and brokerage subtype.

_plaidLink = PlaidLink(
      clientName: "Client Name",
      publicKey: "XXX",
      oauthRedirectUri: null,
      oauthNonce: null,
      env: EnvOption.development,
      products: <ProductOption>[
        ProductOption.investments,
        ProductOption.transactions,
      ],
      accountSubtypes: {
        "investment": ["brokerage"],
      },
      language: "en",
      countryCodes: ['US'],
      onAccountLinked: (publicToken, metadata) {
        log("onAccountLinked: $publicToken metadata: $metadata");
      },
      onAccountLinkError: (error, metadata) {
        log("onAccountLinkError: $error metadata: $metadata");
      },
      onEvent: (event, metadata) {
        log("onEvent: $event metadata: $metadata");
      },
      onExit: (metadata) {
        log("onExit: $metadata");
      },
    );
[log] onEvent: EXIT metadata: {institution_name: null, mfa_type: null, request_id: null, error_message: null, timestamp: 2020-06-11T13:49:45.936Z, link_session_id: null, error_code: null, exit_status: requires_credentials, institution_id: null, institution_search_query: null, view_name: null, error_type: null}
[log] onAccountLinkError: an unexpected error occurred metadata: {status: null, request_id: null, link_session_id: null}

I can try to dig further into it later

crash on release mode

hi when i running in debug mode and profile everything works ,
but in release i get this error:

version i am facing off : 2.2.0

2022-01-18 09:58:41.913 6328-6328/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.sahar.app, PID: 6328
    java.lang.ExceptionInInitializerError
        at g5.e.l(SourceFile:1)
        at y4.c.<clinit>(SourceFile:74)
        at t4.P.b(SourceFile:10)
        at t4.l.E(SourceFile:4)
        at t4.l$a$p.invoke(SourceFile:2)
        at t4.M$a.invoke(SourceFile:4)
        at t4.l$a.j(SourceFile:1)
        at t4.l.f(SourceFile:1)
        at D5.h$a.invoke(SourceFile:4)
        at E5.k.b(SourceFile:4)
        at D5.h.<init>(SourceFile:3)
        at com.plaid.internal.e4$b.invoke(SourceFile:1)
        at Y3.l.getValue(SourceFile:4)
        at com.plaid.internal.e2$b.invokeSuspend(SourceFile:8)
        at kotlin.coroutines.jvm.internal.a.resumeWith(SourceFile:3)
        at B5.E.run(SourceFile:15)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: w4.h.values []
        at java.lang.Enum.enumValues(Enum.java:270)
        at java.lang.Enum.access$000(Enum.java:61)
        at java.lang.Enum$1.create(Enum.java:277)
        at java.lang.Enum$1.create(Enum.java:275)
        at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
        at java.lang.Enum.getSharedConstants(Enum.java:289)
        at java.lang.Class.getEnumConstantsShared(Class.java:2428)
        at java.util.EnumMap.getKeyUniverse(EnumMap.java:755)
        at java.util.EnumMap.<init>(EnumMap.java:138)
        at g5.e.<clinit>(SourceFile:12)
        at g5.e.l(SourceFile:1) 
        at y4.c.<clinit>(SourceFile:74) 
        at t4.P.b(SourceFile:10) 
        at t4.l.E(SourceFile:4) 
        at t4.l$a$p.invoke(SourceFile:2) 
        at t4.M$a.invoke(SourceFile:4) 
        at t4.l$a.j(SourceFile:1) 
        at t4.l.f(SourceFile:1) 
        at D5.h$a.invoke(SourceFile:4) 
        at E5.k.b(SourceFile:4) 
        at D5.h.<init>(SourceFile:3) 
        at com.plaid.internal.e4$b.invoke(SourceFile:1) 
        at Y3.l.getValue(SourceFile:4) 
        at com.plaid.internal.e2$b.invokeSuspend(SourceFile:8) 
        at kotlin.coroutines.jvm.internal.a.resumeWith(SourceFile:3) 
        at B5.E.run(SourceFile:15) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 
     Caused by: java.lang.NoSuchMethodException: w4.h.values []
        at java.lang.Class.getMethod(Class.java:2072)
        at java.lang.Class.getDeclaredMethod(Class.java:2050)
        at java.lang.Enum.enumValues(Enum.java:267)
        at java.lang.Enum.access$000(Enum.java:61) 
        at java.lang.Enum$1.create(Enum.java:277) 
        at java.lang.Enum$1.create(Enum.java:275) 
        at libcore.util.BasicLruCache.get(BasicLruCache.java:63) 
        at java.lang.Enum.getSharedConstants(Enum.java:289) 
        at java.lang.Class.getEnumConstantsShared(Class.java:2428) 
        at java.util.EnumMap.getKeyUniverse(EnumMap.java:755) 
        at java.util.EnumMap.<init>(EnumMap.java:138) 
        at g5.e.<clinit>(SourceFile:12) 
        at g5.e.l(SourceFile:1) 
        at y4.c.<clinit>(SourceFile:74) 
        at t4.P.b(SourceFile:10) 
        at t4.l.E(SourceFile:4) 
        at t4.l$a$p.invoke(SourceFile:2) 
        at t4.M$a.invoke(SourceFile:4) 
        at t4.l$a.j(SourceFile:1) 
        at t4.l.f(SourceFile:1) 
        at D5.h$a.invoke(SourceFile:4) 
        at E5.k.b(SourceFile:4) 
        at D5.h.<init>(SourceFile:3) 
        at com.plaid.internal.e4$b.invoke(SourceFile:1) 
        at Y3.l.getValue(SourceFile:4) 
        at com.plaid.internal.e2$b.invokeSuspend(SourceFile:8) 
        at kotlin.coroutines.jvm.internal.a.resumeWith(SourceFile:3) 
        at B5.E.run(SourceFile:15) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923) 

i think the error maybe come from progaurd that u using or the plaid official lib

Plugin requiring minSdkVersion 21

Hello,

Thanks for this but I can't seem to get this plugin to work... it requires minSdkVersion 21 instead of 16 and I can't change that because it will break other plugins (like Google Firebase). Is there a way around this? Here's the error...
"Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library"

Thanks,
Ziad
PearlByte

Update to handle new plaid link

Incredible job on this repo,

I'm not so familiar with java/swift otherwise I would try to implement this myself, but is there any way you can make a branch to support the latest plaid link requirementes? Thanks!

institutionName is null

Just switched to v1.1.0, seems like institutionName is always null on android.

onSuccess: public-sandbox-9ee3e81a-6918-48f1-953d-b553515a4738, metadata: linkSessionId: 73ed0508-2952-4a5b-94c3-682a2468425a, institutionId: null, institutionName: null, accounts:

Running in sandbox mode

Error on Open

I'm testing with sandbox, got the link_token from the backend, but when running .open() I'm getting

Unable to create PLKHandler due to: The operation couldn’t be completed. (com.plaid.link error 0.)

on iOS. Any ideas?

Code for getting the linkToken

Can you kindly provide a dart code to get the GENERATED_LINK_TOKEN for the following

 LinkConfiguration linkTokenConfiguration = LinkConfiguration(
      linkToken: "GENERATED_LINK_TOKEN",
    );

I tried the following code but it gives: [VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: Exception: http.post error: statusCode= 400

import 'package:http/http.dart' as http;

void main() async {
  var headers = {
    'Content-Type': 'application/json',
  };

  var CLIENT_ID = "CLIENT_ID_from_PLAID";
  var SECRET = "Secret_from_PLAID";
  var unique_per_user = "user_good";

  
  var data =
      '{ "client_id": "$CLIENT_ID", "secret": "$SECRET", "user": { "client_user_id": "$unique_per_user", }, "client_name": "Plaid App", "products": ["auth"], "country_codes": ["US"], "language": "en", "webhook": "https://sample-web-hook.com", "account_filters": { "depository": { "account_subtypes": ["checking"] } } }';

  var res = await http.post('https://sandbox.plaid.com/link/token/create',
      headers: headers, body: data);
  if (res.statusCode != 200)
    throw Exception('http.post error: statusCode= ${res.statusCode}');
  print(res.body);
}

PlaidLink - update existing item

Hi, is it possible to pass in an existing public_token in order to re-link an existing item? I believe you would only need to pass in the token param. See below.

plaid.com/docs/#updating-items-via-link

Screen Shot 2020-06-11 at 9 33 46 AM

Thanks!

Error when compiling 0.2.0

Hi,
I get this error at runtime after to updating to the latest commit of Plaid_flutter.

Not sure how to fix this.

Any help would be most appreciated.

Error below:

/plaid_flutter/android/src/main/java/com/github/jorgefspereira/plaid_flutter/PlaidFlutterPlugin.java:143: error: <identifier> expected
      final LinkConfiguration configuration = new LinkConfiguration.Builder(clientName, products).
                                                                                                  ^
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':plaid_flutter:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 49s
Finished with error: Gradle task assembleDebug failed with exit code 1

[iOS][LinkSuccessMetadata] Missing verification status

verification_status is returned NULL on iOS (using Same Day Micro-deposits flow in sandbox mode).
and the value of institutionId is also different, it is empty on Android and NULL on iOS.

Android

linkSessionId: <LINK_SESSION_ID>, institutionId: , institutionName: null, accounts: [id: <ACCOUNT_ID>, mask: 0000, name: Checking ...0000, type: depository, subtype: checking, verification_status: pending_manual_verification]

iOS

linkSessionId: <LINK_SESSION_ID>, institutionId: null, institutionName: null, accounts: [id: <ACCOUNT_ID>, mask: 0000, name: Checking ...0000, type: depository, subtype: checking, verification_status: null]

Please let me know if I can provide you with any further information

Feature request

It would be amazing if you could add Android support for this api?

OAuth support

Some institutions use an OAuth authentication flow, does the library offer support for those orgs?

According to their docs once you get the oauth_state_id from the url params you need to dismiss the old Link object and create a new one and pass the oauth_state_id to the new config.

how to create a link token?

Not an issue with this package but I'm having a lot of trouble creating a link token and I was hoping for some guidance. I've read the plaid documentation but it doesn't help at all. I tried using cloud functions. I'm using nodejs and I installed the plaid npm package so that I can use createLinkToken(). Does the /link/token/create endpoint need to be in my cloud function? I tried that but nothing works. Please advise

Thank you for an awesome package, btw

URI Redirect

How do i add a URI Redirect to the Plaid Link Configuration?

I've had a look at your code and I can't see any support for it. Is there a way to add it myself or has it just not been implemented yet?

Unable to start activity ComponentInfo{.../com.plaid.internal.LinkRedirectActivity}

I am using Andriod Studio to build flutter app using this plugin. The link flow initialises as expected in the Emulator and I am redirected to the Bank (Monzo UK) but on completion and when the screen shows "All done", I am not redirected back to myapp, the emulator crashes - and I get the following messages:

I/flutter (11790): onEvent: verify.monzo.com, metadata: viewName: , exitStatus: null, mfaType: null, requestId: , timestamp: , linkSessionId: , institutionId: null, institutionName: null, institutionSearchQuery: null, errorType: null, errorCode: null, errorMesssage: null
I/utter_testapp_(11790): WaitForGcToComplete blocked HeapTrim on ProfileSaver for 5.674s
D/AndroidRuntime(11790): Shutting down VM
E/AndroidRuntime(11790): FATAL EXCEPTION: main
E/AndroidRuntime(11790): Process: com.company.flutter_testapp_1, PID: 11790
E/AndroidRuntime(11790): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.flutter_testapp_1/com.plaid.internal.LinkRedirectActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(11790): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
E/AndroidRuntime(11790): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
E/AndroidRuntime(11790): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(11790): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(11790): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(11790): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime(11790): 	at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(11790): 	at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(11790): 	at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime(11790): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11790): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(11790): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(11790): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(11790): 	at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:843)
E/AndroidRuntime(11790): 	at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806)
E/AndroidRuntime(11790): 	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:693)
E/AndroidRuntime(11790): 	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
E/AndroidRuntime(11790): 	at com.plaid.internal.LinkRedirectActivity.onCreate(SourceFile:2)
E/AndroidRuntime(11790): 	at android.app.Activity.performCreate(Activity.java:8000)
E/AndroidRuntime(11790): 	at android.app.Activity.performCreate(Activity.java:7984)
E/AndroidRuntime(11790): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
E/AndroidRuntime(11790): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
E/AndroidRuntime(11790): 	... 11 more
I/Process (11790): Sending signal. PID: 11790 SIG: 9

Keyboard not popping up when testing with iOS simulator

The keyboard is not showing when I try to enter the User login details in Plaid interface in the iOS simulator.

Can you give me a solution to this problem?

Here is the exact code I used"

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:plaid_flutter/plaid_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  PlaidLink _plaidLinkToken;
  var newpublicToken;
  var CLIENT_ID = "NTER YOUR PLAID CLIENT ID";
  var SECRET = "ENTER YOUR PLAID SECRET";
  var unique_per_user = "new_user";

  @override
  void initState() {
    super.initState();
    getLinkToken();
  }

  getLinkToken() async {
    var headers = {
      'Content-Type': 'application/json',
    };

    var data =
        '{ "client_id": "$CLIENT_ID", "secret": "$SECRET", "user": { "client_user_id": "$unique_per_user" }, "client_name": "Plaid App", "products": ["auth"], "country_codes": ["US"], "language": "en", "webhook": "https://sample-web-hook.com", "account_filters": { "depository": { "account_subtypes": ["checking"] } } }';

    var res = await http.post('https://sandbox.plaid.com/link/token/create',
        headers: headers, body: data);
    if (res.statusCode != 200)
      throw Exception('http.post error: statusCode= ${res.statusCode}');
    print(res.body);

    Map<String, dynamic> responseJson = json.decode(res.body);
    var response_link_token = responseJson['link_token'];
    print(response_link_token);

    LinkConfiguration linkTokenConfiguration = LinkConfiguration(
      linkToken: "$response_link_token",
    );

    _plaidLinkToken = PlaidLink(
      configuration: linkTokenConfiguration,
      onSuccess: _onSuccessCallback,
      onEvent: _onEventCallback,
      onExit: _onExitCallback,
    );
  }

  void _onSuccessCallback(String publicToken, LinkSuccessMetadata metadata) {
    print("onSuccess: $publicToken, metadata: ${metadata.description()}");
    newpublicToken = publicToken;
  }

  void _onEventCallback(String event, LinkEventMetadata metadata) {
    print("onEvent: $event, metadata: ${metadata.description()}");
  }

  void _onExitCallback(String error, LinkExitMetadata metadata) {
    print("onExit: $error, metadata: ${metadata.description()}");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Container(
          width: double.infinity,
          color: Colors.lightBlue,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              RaisedButton(
                onPressed: () => _plaidLinkToken.open(),
                child: Text("Open Plaid Link (Link Token)"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

_plaidLink.open() shows empty popup

I'm trying to launch Link in Simulator using the linkTokenConfiguration, pretty much following the Example.

Here's my current code for this:

class PlaidFour extends StatefulWidget {
  final String linkToken;
  PlaidFour({Key key, @required this.linkToken}) : super(key: key);
  static const id = 'plaid_screen_id';

  @override
  _PlaidFourState createState() => _PlaidFourState();
}

class _PlaidFourState extends State<PlaidFour> {
  PlaidLink _plaidLink;

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
    final user = Provider.of<User>(context);
    final HttpsCallable callable = CloudFunctions.instance
        .getHttpsCallable(functionName: 'addItem')
          ..timeout = const Duration(seconds: 30);

    LinkConfiguration linkTokenConfiguration = LinkConfiguration(
      linkToken: widget.linkToken,
    );

    print('linkTokenConfiguration: $linkTokenConfiguration');
    _plaidLink = PlaidLink(
      configuration: linkTokenConfiguration,
      onSuccess: (publicToken, metadata) async {
        print("UID: ${user.uid} onSuccess: $publicToken metadata: $metadata");
        try {
          final HttpsCallableResult result = await callable.call(
            <String, dynamic>{
              'public_token': publicToken,
              'user_id': user.uid,
            },
          );
          print('addItem function result: ${result.data}');
        } on CloudFunctionsException catch (e) {
          print('caught firebase functions exception');
          print(e.code);
          print(e.message);
          print(e.details);
        } catch (e) {
          print('caught firebase functions generic exception');
          print(e);
        }
      },
      onEvent: (event, metadata) {
        print("onEvent: $event metadata: $metadata");
      },
      onExit: (error, metadata) {
        print("onExit: $error, onExit: $metadata");
      },
    );
  }

  @override
  Widget build(BuildContext context) {
    print('PlaidFour linkToken: ${widget.linkToken}');
    return MaterialApp(
      home: Scaffold(
        body: Container(
          width: double.infinity,
          color: Colors.lightBlue,
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              RaisedButton(
                onPressed: () => _plaidLink.open(),
                child: Text("Open Plaid Link"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

But for some reason when clicking 'Open Plaid Link' the popup is empty and won't show Link:
image

No errors or anything in my console. Just the empty popup. I'm able to successfully print the linkToken in the widget.

Any suggestions for how to resolve this would be very appreciated!

Unsure how to connect the client to the server

Sorry if this is a stupid question I'm quite new at this. I was looking through the closed issues to see what I should do but I'm a bit stuck.

I followed the steps at https://plaid.com/docs/link/android/ and I am stuck on the Link Token bit. In the most recent issue related to this and in the plaid documentation there is something about the link_token being created by the apps server and passed through the apps client through an endpoint.

Im assuming that I'll have to host this code and I would change the android_package_name to the package name I've chosen and the same goes for the client name. I also understand that inside the example main.dart, the LinkTokenConfiguration bit will create a new link token from the server.

How would I connect the client to the server and what would I use for the endpoint in the LinkTokenCreateRequest function?

Error when running on Web

I am getting this error when trying to run on web. Everything is working well on Android. I have followed all of the instructions that I can find. Any help would be greatly appreciated.

thanks!

[2021-03-13 16:33:08.910 | Catcher | INFO] Setup localization lazily!
[2021-03-13 16:33:08.911 | ConsoleHandler | INFO] ============================== CATCHER LOG ==============================
[2021-03-13 16:33:08.912 | ConsoleHandler | INFO] Crash occured on 2021-03-13 16:33:08.911
[2021-03-13 16:33:08.912 | ConsoleHandler | INFO]
[2021-03-13 16:33:08.912 | ConsoleHandler | INFO] ------- DEVICE INFO -------
[2021-03-13 16:33:08.913 | ConsoleHandler | INFO] userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
[2021-03-13 16:33:08.914 | ConsoleHandler | INFO] language: en-US
[2021-03-13 16:33:08.914 | ConsoleHandler | INFO] vendor: Google Inc.
[2021-03-13 16:33:08.915 | ConsoleHandler | INFO] platform: MacIntel
[2021-03-13 16:33:08.915 | ConsoleHandler | INFO] cookieEnabled: true
[2021-03-13 16:33:08.915 | ConsoleHandler | INFO]
[2021-03-13 16:33:08.916 | ConsoleHandler | INFO] ------- APP INFO -------
[2021-03-13 16:33:08.916 | ConsoleHandler | INFO] environment: debug
[2021-03-13 16:33:08.916 | ConsoleHandler | INFO]
[2021-03-13 16:33:08.917 | ConsoleHandler | INFO] ---------- ERROR ----------
[2021-03-13 16:33:08.917 | ConsoleHandler | INFO] PlatformException(error, TypeError: elements is not iterable, null, null)
[2021-03-13 16:33:08.917 | ConsoleHandler | INFO]
[2021-03-13 16:33:08.918 | ConsoleHandler | INFO] ------- STACK TRACE -------
[2021-03-13 16:33:09.204 | ConsoleHandler | INFO] dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49 throw
[2021-03-13 16:33:09.205 | ConsoleHandler | INFO] packages/flutter/src/services/message_codecs.dart 581:7 decodeEnvelope
[2021-03-13 16:33:09.205 | ConsoleHandler | INFO] packages/flutter/src/services/platform_channel.dart 158:18 _invokeMethod
[2021-03-13 16:33:09.205 | ConsoleHandler | INFO] dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50
[2021-03-13 16:33:09.205 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1362:47 _rootRunUnary
[2021-03-13 16:33:09.206 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1265:19 runUnary
[2021-03-13 16:33:09.206 | ConsoleHandler | INFO] dart-sdk/lib/async/future_impl.dart 152:18 handleValue
[2021-03-13 16:33:09.206 | ConsoleHandler | INFO] dart-sdk/lib/async/future_impl.dart 704:44 handleValueCallback
[2021-03-13 16:33:09.207 | ConsoleHandler | INFO] dart-sdk/lib/async/future_impl.dart 733:13 _propagateToListeners
[2021-03-13 16:33:09.207 | ConsoleHandler | INFO] dart-sdk/lib/async/future_impl.dart 539:5 [_completeWithValue]
[2021-03-13 16:33:09.207 | ConsoleHandler | INFO] dart-sdk/lib/async/future_impl.dart 577:7
[2021-03-13 16:33:09.207 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1354:13 _rootRun
[2021-03-13 16:33:09.208 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1258:19 run
[2021-03-13 16:33:09.208 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1162:7 runGuarded
[2021-03-13 16:33:09.208 | ConsoleHandler | INFO] dart-sdk/lib/async/zone.dart 1202:23 callback
[2021-03-13 16:33:09.209 | ConsoleHandler | INFO] dart-sdk/lib/async/schedule_microtask.dart 40:11 _microtaskLoop
[2021-03-13 16:33:09.209 | ConsoleHandler | INFO] dart-sdk/lib/async/schedule_microtask.dart 49:5 _startMicrotaskLoop
[2021-03-13 16:33:09.209 | ConsoleHandler | INFO] dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 166:15
[2021-03-13 16:33:09.209 | ConsoleHandler | INFO]
[2021-03-13 16:33:09.210 | ConsoleHandler | INFO] ======================================================================
[2021-03-13 16:33:09.211 | Catcher | INFO] Report result: true

Flutter (Channel beta, 2.0.1, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
• Flutter version 2.0.1 at /Users/cwesterhold/flutter
• Framework revision c5a4b4029c (9 days ago), 2021-03-04 09:47:48 -0800
• Engine revision 40441def69
• Dart version 2.12.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /Users/cwesterhold/Library/Android/sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (2 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82

security vulnerabilities in deps

Hi @jorgefspereira !

Plaid's security team has completed their review of this project and there are a couple of dependencies that were picked up by our vulnerability scanner as having potential issues. They would like these to be fixed before we can officially endorse the project. Would you be able to take a look and resolve them if possible?

They are:

plaid_flutter/android com.google.code.gson:[email protected] Deserialization of Untrusted Data High
plaid_flutter/android com.google.protobuf:[email protected] Denial of Service (DoS) High
plaid_flutter/android org.bouncycastle:[email protected] Information Exposure High
plaid_flutter/android org.bouncycastle:[email protected] Insecure Encryption High

Thanks! Let me know if you need any more info or if it's not possible to resolve all of these.

PlaidLink.open crashing android emulator

Hi everyone,

I'm getting this error when doing PlaidLink.open
Any ideas?

E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): Failed to handle method call
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter linkTokenConfiguration
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at com.plaid.link.Plaid.create(Unknown Source:7)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.open(PlaidFlutterPlugin.java:209)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.onMethodCall(PlaidFlutterPlugin.java:130)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:178)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0$DartMessenger(DartMessenger.java:206)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$6ZD1MYkhaLxyPjtoFDxe45u43DI.run(Unknown Source:12)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at android.os.Handler.handleCallback(Handler.java:873)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at android.os.Looper.loop(Looper.java:193)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at android.app.ActivityThread.main(ActivityThread.java:6669)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#plugins.flutter.io/plaid_flutter( 8381): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 8381): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter linkTokenConfiguration, null, java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter linkTokenConfiguration
E/flutter ( 8381): 	at com.plaid.link.Plaid.create(Unknown Source:7)
E/flutter ( 8381): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.open(PlaidFlutterPlugin.java:209)
E/flutter ( 8381): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.onMethodCall(PlaidFlutterPlugin.java:130)
E/flutter ( 8381): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/flutter ( 8381): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:178)
E/flutter ( 8381): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0$DartMessenger(DartMessenger.java:206)
E/flutter ( 8381): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$6ZD1MYkhaLxyPjtoFDxe45u43DI.run(Unknown Source:12)
E/flutter ( 8381): 	at android.os.Handler.handleCallback(Handler.java:873)
E/flutter ( 8381): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter ( 8381): 	at android.os.Looper.loop(Looper.java:193)
E/flutter ( 8381): 	at android.app.ActivityThread.main(ActivityThread.java:6669)
E/flutter ( 8381): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 8381): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/flutter ( 8381): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 8381): )
E/flutter ( 8381): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 8381): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
E/flutter ( 8381): <asynchronous suspension>
E/flutter ( 8381): #2      PlaidMethodChannel.open (package:plaid_flutter/src/platform/plaid_method_channel.dart:19:5)
E/flutter ( 8381): <asynchronous suspension>
E/flutter ( 8381): #3      PlaidLink.open (package:plaid_flutter/src/core/plaid_link.dart:57:5)

Add docs for using `continueWithRedirectUri` method

It might be helpful to have some docs around the use of continueWithRedirectUri method and implementing OAuth in general using this plugin as the available tutorials might not come as straightforward in native iOS, eg. like this one.

[feature request] onExit callback should return error_code

Currently onExit returns an error message (for example: "the provided credentials were not correct") that doesn't look anything in the official plaid documentation. It would be more useful to return error data such as what's returned in the onEvent callback like error_type, error_code, error_message (but error_code is sufficient).

Thanks for a great package :)

onSuccess MetaData: null account.id

Since the new rollout of Plaid link, the account.id in the metadata variable passed into onSuccess has been null for me. Name, mask, and type are all there...no id though!

Running on iOS.

Plaid Link opens briefly and closes with error. "Error: Invalid env: "tartan"

"Error: Invalid env: "tartan". env must be "sandbox", "development" or "production"."

This is the error I am receiving. I have looked through the code and do not have a way to forcibly provide these details. It is important to note that SOMETIMES it works fine and Link opens properly. But 50% of the time it fails to open with this error.

I am also receiving errors related to font
Access to font at 'https://cdn.plaid.com/link/2.0.1097/assets/fonts/cern-regular.woff2' from origin 'https://secure.plaid.com' has been blocked by CORS policy:

Would like some better understanding on what can be done to ensure Plaid Link opens everytime successfully.
I am currently using Plaid in development mode.

Unable to launch Plaid Link in Flutter Web due to Dart error

I'm trying to run plaid_flutter on Chrome. I'm able to successfully fetch the linkToken, but when I proceed to launch Plaid Link I get this error output and the web view does not pop up:

[+9623 ms] Error: PlatformException(error, TypeError: elements is not iterable, null, null)
               at Object.throw_ [as throw] (http://localhost:62381/dart_sdk.js:5333:11)
               at StandardMethodCodec.decodeEnvelope (http://localhost:62381/packages/flutter/src/services/system_channels.dart.lib.js:792:19)
               at platform_channel.MethodChannel.new._invokeMethod (http://localhost:62381/packages/flutter/src/services/system_channels.dart.lib.js:956:47)
               at _invokeMethod.next (<anonymous>)
               at http://localhost:62381/dart_sdk.js:39031:33
               at _RootZone.runUnary (http://localhost:62381/dart_sdk.js:38888:58)
               at _FutureListener.thenAwait.handleValue (http://localhost:62381/dart_sdk.js:33874:29)
               at handleValueCallback (http://localhost:62381/dart_sdk.js:34434:49)
               at Function._propagateToListeners (http://localhost:62381/dart_sdk.js:34472:17)
               at _Future.new.[_completeWithValue] (http://localhost:62381/dart_sdk.js:34314:23)
               at async._AsyncCallbackEntry.new.callback (http://localhost:62381/dart_sdk.js:34337:35)
               at Object._microtaskLoop (http://localhost:62381/dart_sdk.js:39175:13)
               at _startMicrotaskLoop (http://localhost:62381/dart_sdk.js:39181:13)
               at http://localhost:62381/dart_sdk.js:34688:9

This is my index.html file:

<!DOCTYPE` html>
<html>
<head>
  <!--
    If you are serving your web app in a path other than the root, change the
    href value below to reflect the base path you are serving from.

    The path provided below has to start and end with a slash "/" in order for
    it to work correctly.

    Fore more details:
    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
  -->
  <base href="/">

  <meta charset="UTF-8">
  <meta content="IE=Edge" http-equiv="X-UA-Compatible">
  <meta name="description" content="Carbon Budgeting for Everyone">

  <!-- iOS meta tags & icons -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="dcrbn3">
  <link rel="apple-touch-icon" href="icons/Icon-192.png">

  <!-- Favicon -->
  <link rel="icon" type="image/png" href="favicon.png"/>

  <title>Decarbon</title>
  <link rel="manifest" href="manifest.json">
</head>
<body>
  <!-- Plaid Link initialize script -->
  <script src="https://cdn.plaid.com/link/v2/stable/link-initialize.js"></script>

  <!-- This script installs service_worker.js to provide PWA functionality to
       application. For more information, see:
       https://developers.google.com/web/fundamentals/primers/service-workers -->
  <script>
    if ('serviceWorker' in navigator) {
      window.addEventListener('flutter-first-frame', function () {
        navigator.serviceWorker.register('flutter_service_worker.js');
      });
    }
  </script>

  <!-- The core Firebase JS SDK is always required and must be listed first -->
  <script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-app.js"></script>

  <!-- Add SDKs for Firebase products that you want to use
       https://firebase.google.com/docs/web/setup#available-libraries -->
  <script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-analytics.js"></script>
  <script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-auth.js"></script>
  <script src="https://www.gstatic.com/firebasejs/8.0.1/firebase-firestore.js"></script>
  <script src="https://www.gstatic.com/firebasejs/8.4.1/firebase-functions.js"></script>

  <script>
  // Your web app's Firebase configuration
  // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  var firebaseConfig = {
    apiKey: "xxxxxx",
    authDomain: "decarbon-app.firebaseapp.com",
    databaseURL: "https://decarbon-app.firebaseio.com",
    projectId: "decarbon-app",
    storageBucket: "decarbon-app.appspot.com",
    messagingSenderId: "xxxxxxx",
    appId: "xxxxxx",
    measurementId: "xxxxxx"
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
  </script>

  <script src="main.dart.js" type="application/javascript"></script>
</body>

I haven't migrated my project to null safety yet, if that matters. Please let me know if there's a solution. Thank you!!!

Pods install failed due to plaid

[!] CocoaPods could not find compatible versions for pod "Plaid":
  In snapshot (Podfile.lock):
    Plaid (= 2.2.0)

  In Podfile:
    plaid_flutter (from `.symlinks/plugins/plaid_flutter/ios`) was resolved to 0.0.1, which depends on
      Plaid (= 2.3.1)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Plaid` inside your development pod `plaid_flutter`.
   You should run `pod update Plaid` to apply changes you've made.

Exception has occurred.

Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method open on channel plugins.flutter.io/plaid_flutter))

I'm new to this. could you please help me out? Thanks

Integration of plaid working fror android but crashing app on ios

I am working with plaid but its crashing on ios. Error is posted below:


Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart:1
Xcode build done.                                           13,1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/abcdefg/Code/flutter/.pub-cache/hosted/pub.dartlang.org/plaid_flutter-2.1.4/ios/Classes/PlaidFlutterPlugin.m:3:9: fatal error: 'LinkKit/LinkKit.h' file not found
    #import <LinkKit/LinkKit.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: the following command failed with exit code 1 but produced no further output
    CompileC /Users/abcdefg/Library/Developer/Xcode/DerivedData/Runner-dnbujvtnlrnqewcajznimcqfcgbf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/plaid_flutter.build/Objects-normal/arm64/PlaidFlutterPlugin.o /Users/abcdefg/Code/flutter/.pub-cache/hosted/pub.dartlang.org/plaid_flutter-2.1.4/ios/Classes/PlaidFlutterPlugin.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

Futures instead of callbacks

It would be great if the open function would return a future with the linkToken instead of having to specify the onSuccess/onError callbacks. Any ideas on how this could be solved?

Thanks

Unhandled Exception: MissingPluginException(No implementation found for method open on channel plugins.flutter.io/plaid_flutter)

I am using v0.2.2
I got this error when build on android:
Unhandled Exception: MissingPluginException(No implementation found for method open on channel plugins.flutter.io/plaid_flutter)

I've added this on build.gradle:

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

I have set the minimum api to 21.
in iOS it built and works fine.

in main/java/io/flutter/plugins/GeneratedPluginRegistrant.java plugin has been registered.

what am I doing wrong?

thank you

Can't run app because of NoClassDefFoundError

I'm trying to run my app but it appears to be interrupted by some errors within plaid_flutter. See runtime snippet below.

I'm on version ^1.1.6

[ +128 ms] sdk gphone x86 startApp
[   +6 ms] executing: /Users/kylegraycar/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true com.decarbonapp.decarbon.android/com.example.dcrbn3.MainActivity
[ +591 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.decarbonapp.decarbon.android/com.example.dcrbn3.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
[+548486 ms] E/AndroidRuntime(10141): FATAL EXCEPTION: main
[  +17 ms] E/AndroidRuntime(10141): Process: com.decarbonapp.decarbon.android, PID: 10141
[        ] E/AndroidRuntime(10141): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/plaid/link/result/PlaidLinkResultHandler;
[        ] E/AndroidRuntime(10141): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.<init>(PlaidFlutterPlugin.java:73)
[        ] E/AndroidRuntime(10141): 	at com.github.jorgefspereira.plaid_flutter.PlaidFlutterPlugin.registerWith(PlaidFlutterPlugin.java:110)
[        ] E/AndroidRuntime(10141): 	at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:23)
[        ] E/AndroidRuntime(10141): 	at com.example.dcrbn3.MainActivity.configureFlutterEngine(MainActivity.kt:10)
[        ] E/AndroidRuntime(10141): 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:181)
[        ] E/AndroidRuntime(10141): 	at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:410)
[        ] E/AndroidRuntime(10141): 	at android.app.Activity.performCreate(Activity.java:8000)
[        ] E/AndroidRuntime(10141): 	at android.app.Activity.performCreate(Activity.java:7984)
[        ] E/AndroidRuntime(10141): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
[        ] E/AndroidRuntime(10141): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
[        ] E/AndroidRuntime(10141): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
[        ] E/AndroidRuntime(10141): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
[        ] E/AndroidRuntime(10141): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[        ] E/AndroidRuntime(10141): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[        ] E/AndroidRuntime(10141): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
[        ] E/AndroidRuntime(10141): 	at android.os.Handler.dispatchMessage(Handler.java:106)
[        ] E/AndroidRuntime(10141): 	at android.os.Looper.loop(Looper.java:223)
[        ] E/AndroidRuntime(10141): 	at android.app.ActivityThread.main(ActivityThread.java:7656)
[        ] E/AndroidRuntime(10141): 	at java.lang.reflect.Method.invoke(Native Method)
[   +3 ms] E/AndroidRuntime(10141): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
[        ] E/AndroidRuntime(10141): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
[        ] E/AndroidRuntime(10141): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.plaid.link.result.PlaidLinkResultHandler" on path: DexPathList[[zip file "/data/app/~~bsmE5xQCw2h3hQN4MJ9FOg==/com.decarbonapp.decarbon.android-IKwOUSNFfROqF3dMTphAOQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~bsmE5xQCw2h3hQN4MJ9FOg==/com.decarbonapp.decarbon.android-IKwOUSNFfROqF3dMTphAOQ==/lib/x86, /data/app/~~bsmE5xQCw2h3hQN4MJ9FOg==/com.decarbonapp.decarbon.android-IKwOUSNFfROqF3dMTphAOQ==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
[        ] E/AndroidRuntime(10141): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
[        ] E/AndroidRuntime(10141): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[        ] E/AndroidRuntime(10141): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[        ] E/AndroidRuntime(10141): 	... 21 more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.