#button-20_rn-identity-asset-missing

1 messages ยท Page 1 of 1 (latest)

silver roostBOT
#

๐Ÿ‘‹ 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.

fading nexus
#

Here's the error and the code snippet

#

This is Expo React Native to be specific

mossy badge
#

Hi there,
let me take a look...

fading nexus
#

Okay

lapis comet
#

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?

fading nexus
#

Yes

lapis comet
#

Okay and just so we're on the same page (literally), you are using this integration?

fading nexus
#

Yes exactly

lapis comet
#

Okay great. Now, can you provide your code as text and highlight the specific line where the error is thrown?

silver roostBOT
#

๐Ÿง‘โ€๐Ÿ’ป 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 foo contains the value bar.

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)
fading nexus
#

Okay

lapis comet
#

Ah wait, I think I see it. It's the Image.resolveAssetSource(logo),

fading nexus
#

Yes

#

The logo location is also exactly as shown

lapis comet
#

You mean this?

import logo from './assets/{{YOUR_BRAND_LOGO}}.png';
fading nexus
#

Yes

lapis comet
#

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

fading nexus
#

Lol

lapis comet
#

And what version of the RN SDK are you using?

fading nexus
#
      "expo": "^54.0.25"
lapis comet
#

Sorry, Stripe React Native

fading nexus
#
    "@stripe/stripe-identity-react-native": "^0.4.1",
    "@stripe/stripe-react-native": "^0.57.0",
lapis comet
#

Thank you

fading nexus
#

You're welcome

lapis comet
#

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

fading nexus
#

But the docs shows the same location. It works on IOS but not on Android

lapis comet
#

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

fading nexus
#

Oh okay

lapis comet
#

Yeah, sorry. I wish I could be of more help here

fading nexus
#

But the code snippet is actually the brand logo equivalent to the docs

lapis comet
#

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

fading nexus
#

So the location should be exactly the same?

lapis comet
#

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.

fading nexus
#

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

lapis comet
#

Not the Stripe SDK, no

fading nexus
#

Secondly, I think the Stripe SDK requires that for a successful flow right?

lapis comet
#

Image.resolveAssetSource() <- this is throwing the error

#

And that is core React Native

fading nexus
#

No please

#

It's the stripe process actually

lapis comet
#

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
fading nexus
#

Yeah that works

lapis comet
#

You said brandLogo: Image.resolveAssetSource(logo), was throwing the error

#

But there is no Stripe code in the call stack of the error

fading nexus
#

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

lapis comet
#

And the exact logs for this error are what you shared above?

fading nexus
#

Yes please

lapis comet
#

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

fading nexus
#

Oh okay

silver roostBOT
#

button-20_rn-identity-asset-missing