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

onExit is not being emitted #134

Open
SofiaRey opened this issue Sep 11, 2024 · 8 comments
Open

onExit is not being emitted #134

SofiaRey opened this issue Sep 11, 2024 · 8 comments

Comments

@SofiaRey
Copy link

In my project we use Plaid and we encountered an issue:

When triggering the flow to connect a bank account and closing it, it won't send the event of LinkExit

After a quick research and debugging, the issue seems to be in plaid_flutter_web.dart as options.onExit is not being execute. Therefore, no event is sent.

Hope this helps!

@jorgefspereira
Copy link
Owner

@SofiaRey

From your description I'm assuming you expect a LinkExit event when the user closes the bank popup (marked in red):

Screenshot 2024-10-08 at 16 41 11

I assume the LinkExit event is bound to the view with the Link session. Since is an external view it should not trigger the event, according to the documentation:

Note that onExit will not be called when Link is destroyed in some other way than closing Link, such as the user hitting the browser back button or closing the browser tab on which the Link session is present.

Please correct me if I'm misunderstanding you report, or send me a more complete description with video or pictures of the issue.

@SofiaRey
Copy link
Author

SofiaRey commented Oct 8, 2024

I didn't mean an external view. Here's a video:

Screen.Recording.2024-10-08.at.1.34.33.PM.mov

From our side, the Loading State is shown as we never receive the PlaidLinkStateExit from Plaid and as I mentioned before, after debugging we came to the conclusion that options.onExit from your plaid_flutter_web.dart is not being executed. We think it can be related to that, but you'll be able to tell better than us!

Hope this helps and it's clear now.

Let me know if you need any other information.

@jorgefspereira
Copy link
Owner

jorgefspereira commented Oct 8, 2024

I have tried in sandbox the same flow and was not able to reproduce the issue. I receive the following exit events:

onEvent: EXIT, metadata: viewName: , exitStatus: institution_not_found, mfaType: , requestId: ZcOF5HYMTXw7tIF, timestamp: 2024-10-08T16:50:48.437Z, linkSessionId: ad2c3fc5-7f11-47d5-8694-203a25ac7cf8, institutionId: , institutionName: , institutionSearchQuery: , errorType: , errorCode: , errorMessage: ,  selection: , routingNumber: , matchReason: , accountNumberMask: 

onExit metadata: status: institution_not_found, linkSessionId: ad2c3fc5-7f11-47d5-8694-203a25ac7cf8, requestId: ZcOF5HYMTXw7tIF, institution.id: , institution.name: , error: null

How are you creating your link token? I created mine with the following options:

{
  "client_id": "...",
  "secret": "....", 
  "user": { "client_user_id": "plaid_user_26" },
  "client_name": "Plaid Flutter",
  "products": [ "auth" ],
  "country_codes": [ "US" ],
  "language": "en",
  "auth": {
      "automated_microdeposits_enabled": true
  }
}

@MauriMiguez
Copy link
Contributor

Hi @jorgefspereira! I'm working on the same project as @SofiaRey. Not sure if this helps, but the event seems to not be emitted when the 'X' button is pressed immediately after the flow opens (without pressing 'continue'). However, if the 'X' is pressed after advancing in the flow, the event is emitted correctly.

@jorgefspereira
Copy link
Owner

Hi @MauriMiguez,

Based on your description, it appears that the problem lies within the Plaid SDK itself rather than being related to the Flutter plugin. To address this effectively, please report the issue through the official Plaid channels, specifically their GitHub repository: https://github.com/plaid

I'll keep this issue open so we can both monitor its progress. If you receive any updates or resolutions from the Plaid team, please feel free to share them here.

@MauriMiguez
Copy link
Contributor

Just created an issue on the plaid-node repository since the problem was only happening on the web. plaid/plaid-node#648

@Juliusman33
Copy link

it is also happing for flutter ios, but not on android. But I only get this issue when the user is done adding accounts and clicks the 'finished' button. When 'finished' is clicked I get the continue loading indicator of death.

Since I use the multi-product link flow, my current work around is the following. I wait for the webhook from plaid telling me the link session has ended and I notify the user to execute plaid.close() to close the loading indicator of death.

Also tried talking to plaid about it but they referred me here. And this forum is referring us to plaid. So not sure where to go anymore.

@Juliusman33
Copy link

@MauriMiguez Did you figure this out?

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

4 participants