#button-20_rn-identity-asset-missing
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1445542070067396660
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- button-20_identiy-verification-issues-events-and-state, 6 days ago, 35 messages
Hi there,
let me take a look...
Okay
Hi ๐
I'm stepping in to offer some assistance. I'm looking at the stack trace for the error you referenced and I see this is coming from node_modules and some from Expo. Are you using our React Native SDK?
Yes
Okay and just so we're on the same page (literally), you are using this integration?
Yes exactly
Okay great. Now, can you provide your code as text and highlight the specific line where the error is thrown?
๐งโ๐ป How to format code on Discord
Inline code: wrap in single backticks (`)
This:
The variable `foo` contains the value `bar`.
Will turn into this:
The variable
foocontains the valuebar.
Code blocks: wrap in three backticks (```)
Also, you can specify the language after the first three backticks to get syntax highlighting.
This:
```javascript
function foo() {
return 'bar';
}
```
Will turn into this:
function foo() {
return 'bar';
}```
Notes about **code blocks**:
- Specifying the language is optional (e.g., you can omit `javascript` in the example above)
- If you don't specify the language you won't get syntax highlighting
- When you're inside a code block (after you type \`\`\`) the `Return`/`Enter` key will add a new line instead of sending your message
- Once you end the code block `Return`/`Enter` works normally again
You can [read more about message formatting on Discord's website.](https://support.discord.com/hc/en-us/articles/210298617)
Okay
Ah wait, I think I see it. It's the Image.resolveAssetSource(logo),
You mean this?
import logo from './assets/{{YOUR_BRAND_LOGO}}.png';
Yes
Ah wait. yes it's at the top of the screenshot. Sorry, screenshots are code are awful and I hate looking at them but I see what you mean
Lol
And what version of the RN SDK are you using?
"expo": "^54.0.25"
Sorry, Stripe React Native
"@stripe/stripe-identity-react-native": "^0.4.1",
"@stripe/stripe-react-native": "^0.57.0",
Thank you
You're welcome
Okay I don't see any specific call outs for this. I don't think this is a Stripe issue, since both the path to the logo and the function throwing the error are not from the Stripe SDK
But the docs shows the same location. It works on IOS but not on Android
The docs show import logo from './assets/{{YOUR_BRAND_LOGO}}.png'; but your code snippet has ../../../../../assets/icon.png
But again, that is not code Stripe controls. This has to do with the React Native project not finding the image file
The fact that it works in iOS and not Android suggests something is wonky with path resolution between the RN implementation of both. But, again, that code isn't something Stripe has control over.
I notice in the stack trace you are using Expo (which makes sense because that's what RN does by default) but we've noticed Expo causing problems
Mostly with Google Pay
Oh okay
Yeah, sorry. I wish I could be of more help here
But the code snippet is actually the brand logo equivalent to the docs
We are talking about a file path to a file that exists in your React Native project. It's not a part of Stripe functionality and the path in the docs has many less layers than yours does
So the location should be exactly the same?
I don't know what you mean. Same as what?
The path shown here:
// A square logo for your brand
import logo from './assets/{{YOUR_BRAND_LOGO}}.png'; // <- this is something unique to your project
is just a reference. You would not use this same path unless your actual brand logo image file was located at that exact location. All it means is that you should have a local asset that is your brand logo image. But actually where that lives and how you import it is up to you.
Oh okay but according to what you're saying then I've done exactly the same thing but the stripe SDK is throwing that error and not displaying the image on Android
Not the Stripe SDK, no
Secondly, I think the Stripe SDK requires that for a successful flow right?
Image.resolveAssetSource() <- this is throwing the error
And that is core React Native
Unless, you do what I suggested earlier and try setting that to a value and see if the error is thrown earlier
e.g.
const bLogo = Image.resolveAssetSource(logo) // <- if this works, then it's Stripe. If it fails, it's React Native
Yeah that works
You said brandLogo: Image.resolveAssetSource(logo), was throwing the error
In the code snippet here: https://docs.stripe.com/identity/verify-identity-documents?platform=react-native&type=new-integration#add-an-event-handler-to-the-verify-button
Stripe functionality isn't called until this line:
const { status, present, loading } = useStripeIdentity(fetchOptions);
But there is no Stripe code in the call stack of the error
Yes the process is successful, opens up the consent screen, the error is thrown and the process also fails
I'll send you a screenshot of it
And the exact logs for this error are what you shared above?
Yes please
All this would mean to me is that the attempt to resolve the image location isn't made until the page is loaded
That does not change anything about whether this is Stripe code or not
I'm sorry to say
Oh okay
button-20_rn-identity-asset-missing