burstware / expo-plaid-link

Use the Plaid Link flow inside your expo app
MIT License
35 stars 20 forks source link

Blank Screen on Expo #4

Closed sherodtaylor closed 3 years ago

sherodtaylor commented 3 years ago

My whole app just turns blank no errors or anything for ios

{
  "main": "index.js",
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@burstware/expo-plaid-link": "^1.0.2",
    "@eva-design/eva": "^2.0.0",
    "@expo-google-fonts/inter": "^0.1.0",
    "@rainbow-me/animated-charts": "^1.0.0-alpha.4",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/native": "^5.9.2",
    "@react-navigation/stack": "^5.14.2",
    "@ui-kitten/components": "^5.0.0",
    "@ui-kitten/eva-icons": "^5.0.0",
    "abs-svg-path": "^0.1.1",
    "axios": "^0.21.1",
    "d3-scale": "^3.2.3",
    "d3-shape": "^2.0.0",
    "expo": "^40.0.1",
    "expo-asset": "~8.2.1",
    "expo-constants": "~9.3.3",
    "expo-font": "~8.4.0",
    "expo-linking": "~2.0.1",
    "expo-secure-store": "~9.3.0",
    "expo-splash-screen": "~0.8.0",
    "expo-updates": "~0.4.0",
    "expo-web-browser": "~8.6.0",
    "lightweight-charts": "^3.3.0",
    "lottie-react-native": "~2.6.1",
    "moment": "^2.29.1",
    "normalize-svg-path": "^1.1.0",
    "parse-svg-path": "^0.1.2",
    "query-string": "^6.14.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-hook-form": "^6.15.1",
    "react-native": "~0.63.4",
    "react-native-animated-charts": "^0.0.5",
    "react-native-app-intro-slider": "^4.0.4",
    "react-native-appearance": "~0.3.3",
    "react-native-chart-kit": "^6.11.0",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-navigation": "^7.8.4",
    "react-native-navigation-hooks": "^6.2.0",
    "react-native-onboarding-swiper": "^1.1.4",
    "react-native-reanimated": "2.0.0-rc.3",
    "react-native-redash": "^16.0.8",
    "react-native-responsive-linechart": "^5.7.0",
    "react-native-safari-view": "^2.1.0",
    "react-native-safe-area-context": "3.1.9",
    "react-native-screens": "~2.15.2",
    "react-native-svg": "12.1.0",
    "react-native-unimodules": "~0.12.0",
    "react-native-web": "^0.15.0",
    "react-native-webview": "11.0.0",
    "react-query": "^3.6.0",
    "victory-native": "^35.3.1"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "@types/react": "~16.9.35",
    "@types/react-dom": "~16.9.8",
    "@types/react-native": "~0.63.2",
    "babel-eslint": "^10.1.0",
    "babel-preset-expo": "~8.3.0",
    "eslint": "^7.20.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-prettier": "^8.0.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-react": "^7.22.0",
    "jest-expo": "~40.0.0",
    "metro-react-native-babel-preset": "^0.65.1",
    "prettier": "^2.2.1",
    "typescript": "~4.0.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true
}

It just breaks when I import the plaid link

import PlaidLink from '@burstware/expo-plaid-link'

function () => {
        ....
        return (
            <>
            {connectedToX && openPlaid && !!linkTokenResp?.data?.data?.token ? (
            <PlaidLink
              linkToken={linkTokenResp?.data?.data?.token}
              onEvent={(event) =>  {
                console.log(event)
              }}
              onExit={(exit) =>  {
                console.log(exit)
                setConnectedBank(false)
              }}
              onSuccess={(success) => {
                console.log(success.publicToken)
                setConnectedBank(true)
              }}
            />

            ) : <></>}
        </>)
}
sherodtaylor commented 3 years ago

If i comment out or delete the reference it is still broken. I can't import it i've installed it with expo install and also installed react native webviewer.

JBaczuk commented 3 years ago

@sherodtaylor It is still broken if you remove any code to do with the module?

sherodtaylor commented 3 years ago

It works if I remove the import of the module.

On Mon, Mar 1, 2021 at 7:28 PM Jordan Baczuk notifications@github.com wrote:

@sherodtaylor https://github.com/sherodtaylor It is still broken if you remove any code to do with the module?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/burstware/expo-plaid-link/issues/4#issuecomment-788551519, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALKCVGHBJSQPNPS2FT6NSDTBRLMFANCNFSM4YJL6J3A .

JBaczuk commented 3 years ago

@sherodtaylor I am unable to reproduce this. A few things to check:

1 - You have recently obtained a valid, up-to-date link token from Plaid 2 - Wait at least a few seconds for it to load the link page 3 - verify you can get the link flow to work in a browser using the same token

JBaczuk commented 3 years ago

closing due to inactivity

andrei-zgirvaci commented 3 years ago

I have the same error, if I remove the PlaidLink component, it works. I checked and the link token and it works in the browser. My whole app seems to freeze once I import PlaidLink...

But, if I copy the exact same code from PlaidLink component and just add it to my project, it works. Seems like the problem comes when importing the component directly from your library...

Any ideas?

justinbretting commented 3 years ago

@JBaczuk I'm also having the white screen error, my whole app is blank when I try to use this module. I went into the module itself and it appears that the WebView component was problematic. IE, if I commented out any use of the WebView and replaced it with <Text>Debugging</Text>, the app loads without issue. Further, I copied the source code into my project and then import the component directly, it fixes the white screen and I see plaid webview show up.

FWIW I'm using a yarn 2 monorepo, and I noticed that the installed version of react-native-webview at node_modules/@burstware/expo-plaid-link/node_modules/react-native-webview was something like version 11.6.2, whereas the version installed for my app is 11.0.2. I'm wondering if the fix is to remove the ^11.0.2 package ref and pin it to something less modern.

JBaczuk commented 3 years ago

@justinbretting I'm not sure about the webview version, but which version of this package are you using? There was a recent fix that might help.