#stripe_connect_platform-account-bug
1 messages ยท Page 1 of 1 (latest)
Hello!
Hmm that does sound odd
Do you have a request ID that is stating the logo url is in testmode?
Can you also provide the account ID for me to look at?
Connected Account
Thanks, give me a few mins to look
Hmm okay so the file that is present in that request does look to be in testmode
Can you provide the request ID when you attempt to fetch that file in testmode?
That is a different file than the request above
And that one is in livemode
So it seems like you may just be mixing up file IDs?
req_76RaWCklbWqv8d
No.
There is the request
In the Account found via testmode key:
stripe_account.settings.branding.icon
"file_1LO1fKGkntF0z1iAfVb8P7Ov"
Yes, that file is in livemode. Your livemode request (req_kuCwLwvJUCYJah) is retrieving a file ID ending in heU which is a file in testmode.
But we are getting the Account with a test key
Then getting the file path with a test key
Then getting the url with a test key
Then getting an error that the file is in livemode?
We aren't switching keys. Always using test mode key to get the Account and the File but getting an error that the file returned by Stripe is in a different livemode
Okay so yeah let's back up from the actual file retrieval then
ok one sec
i got the Account with a testmode key - are you with me?
req_f8gXUVWF3E7epi
๐
stripe_icon_file_id = stripe_account.settings.branding.icon
"file_1LO1fKGkntF0z1iAfVb8P7Ov"
right?
That is just on the Account object that was returned by Stripe yes?
Yep
just set the testmode key again to be 100% sure
stripe_icon_file_id = "file_1LO1fKGkntF0z1iAfVb8P7Ov"
just confirming the value
stripe_icon = Stripe::File.retrieve(stripe_icon_file_id, {stripe_account: stripe_user_id})
About to make that API call
3
2
1
*** Stripe::InvalidRequestError Exception: No such file upload: 'file_1LO1fKGkntF0z1iAfVb8P7Ov'; a similar object exists in live mode, but a test mode key was used to make this request.
WTF
That there is the problem
Okay thanks for walking through it
One sec
And what happens when you retrieve that file ID with your live key?
I think the idea here is that even though it was uploaded in test mode, the branding icon here would be used in both test and livemode
So the file actually lives in livemode for retrieval.
i think that did not work
let's go through it
But i think we get the inverse error. That's why i posted it. If it was all in livemode that woudl work.
i think it is a legit bug
one sec
getting the account in livemode
done
req_xKpNNh4rPb3nz9
getting the path
stripe_icon_file_id = stripe_account.settings.branding.icon
stripe_icon_file_id = stripe_account.settings.branding.icon
"file_1LO1fKGkntF0z1iAfVb8P7Ov"
Now making the API call to get that
stripe_icon = Stripe::File.retrieve(stripe_icon_file_id, {stripe_account: stripe_user_id})
3
2
1
wait that worked!
hmmm. maybe because I am in the Oauth flow and in development so we are connecting to the account in development with testmode keys that something is glitching when I am switching to a live key just to get this file in the flow where I am using a ca_ test in Oauth. ?
Can you try retrieving file_1LO1fKGkntF0z1iAfVb8P7Ov with your live key?
yes got it
let me run the code in context. one sec
yeah, in the context of the Oauth flow I am still getting the error. Hmmmm.
req_q7SfxvAhWQTnGD
I am forcing the key to best the live key before both API calls - to get the Account and then get the file. Not sure why we are getting that error still.
Any ideas?
So that file was uploaded in testmode, then you retrieve the account in livemode which provides you a testmode file and you attempt to retrieve that file in livemode and it throws the above error?
Do I have that right?
because those files seem to "flow over" between modes, i'm not sure in which mode I actually uploaded the file.
i uploaded it in one or the other, but now see it when I toggle in the dashboard either way
I'm just surprised you are seeing a testmode file returned from retrieving the account in livemode... ๐ค
then i retreive the account in livemode and I am provided with a file and i am unclear which mode it lives in but when I try to get it with the livemode key receive an error
likely b/c the branding section of the dashboard is unusual in the things from one mode appear to flow over to the other.
Anyway , is there a reliable way to get these images no matter if in livemode or test?
I am going to add a hack to just switch keys and make the API call with the inverse key in a rescue block if the call fails.?
Yeah that is what I would recommend for now.
I will file some feedback
That we should be returning the file relevant to where it can be retrieved
Or improving this so that you shouldn't have to switch keys
OK, yeah hack seems to solve the issue. OK, thank you! ๐