#el-capitan14_code
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/1397366308219125821
๐ 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.
- el-capitan14_docs, 5 minutes ago, 26 messages
- el-capitan14_docs, 21 hours ago, 108 messages
Hi there, can you share with me the code? is there a public URL that I visit and replicate the problem?
no its not
I could give you a free membership though
what part of the code do you want to see?
The error says "Error: Failed to load Connect.js", can you should me how you load the Connect.js ?
Implementation Details
Stack & Dependencies
- Frontend: React 18.2.0 with Chakra UI
- Stripe Libraries:
- @stripe/connect-js: ^3.0.6
- @stripe/react-connect-js: ^3.0.6
- Environment: Production (Live mode)
- Domain: atomiktrading.io (Cloudflare proxy enabled)
Backend Integration โ Working
- Account Sessions API endpoint: /api/v1/creators/create-account-session
- Successfully creating Stripe Express accounts
- Account sessions generating valid client_secret tokens
- Account Sessions configuration:
components: {
account_onboarding: {
enabled: true,
features: {
external_account_collection: true
}
}
}
Frontend Implementation
// Component: StripeConnectEmbed.js
const instance = loadConnectAndInitialize({
publishableKey: process.env.REACT_APP_STRIPE_PUBLISHABLE_KEY,
fetchClientSecret: async () => client_secret,
appearance: { /* custom styling */ }
});
// Rendered component:
<ConnectComponentsProvider connectInstance={instance}>
<ConnectAccountOnboarding
onExit={handleOnboardingExit}
collectionOptions={{
fields: 'eventually_due',
futureRequirements: 'include',
}}
/>
</ConnectComponentsProvider>
Current Error
Console Output
๐ต Stripe Connect instance created: true
๐ต Rendering ConnectAccountOnboarding component
โ Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
Behavior
- โ Stripe Connect instance creates successfully
- โ ConnectAccountOnboarding component attempts to render
- โ Connect.js library fails to load internally
- โ Component container remains blank
Troubleshooting Completed
CSP (Content Security Policy)
- โ
Added all required Stripe domains:
- https://js.stripe.com
- https://connect.stripe.com
- https://*.stripe.com
- โ Configured frame-src for iframe embedding
- โ Verified CSP allows all Stripe resources
Cloudflare Configuration
- โ Disabled Rocket Loader globally
- โ Added data-cfasync="false" to all Stripe scripts
- โ Confirmed Cloudflare is not interfering
Script Loading
- โ Loading base Stripe library synchronously: <script src="https://js.stripe.com/v3/">
- โ Verified base window.Stripe object is available
- โ Using correct publishable key (pk_test_...)
API Test Results
Account Session Creation - SUCCESS
curl https://api.atomiktrading.io/api/v1/creators/create-account-session
Response: {
"client_secret": "accs_secret__SjIXNRZE...",
"account_id": "acct_1Rnpw0D19aev8rIX",
"expires_at": 1753228288
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Environment Details
- Browser Testing: Chrome 138.0.0.0, Mobile Safari
- Network: Production environment with CDN (Cloudflare)
- Bundle: React production build with code splitting
- Error Persistence: Occurs consistently across browsers and devices
The backend integration is working perfectly - the issue appears to be specifically with the frontend Connect.js library loading
within our React application environment.
This looks like AI geenerated response to me.
it answers your question right
https://docs.stripe.com/connect/get-started-connect-embedded-components?platform=web I'd recommend you use this integration guide to get started
Did you follow this doc to integration Connect.js? Can you share with me the code to load Connect.js?
const instance = loadConnectAndInitialize({
publishableKey,
fetchClientSecret: async () => {
console.log('๐ต Stripe requesting client secret...');
return client_secret;
},
appearance: {
overlays: 'dialog',
variables: {
colorPrimary: '#00C6E0',
colorBackground: '#1a1a1a',
colorText: '#ffffff',
colorDanger: '#df1b41',
fontFamily: 'Inter, system-ui, sans-serif',
spacingUnit: '4px',
borderRadius: '8px',
colorBorder: '#333333',
}
},
});
console.log('๐ต Stripe requesting client secret...');
return client_secret;
},
Looks like you haven't implemented the fetchClientSecret function yet
one sec
still does not work
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)Understand this error
main.88742e6f.js:1 Unhandled promise rejection: Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
(anonymous) @ main.88742e6f.js:1Understand this error
vendors-ab1cd7d0.8ccd3135.js:1 Uncaught (in promise) Error: Failed to load Connect.js
at HTMLScriptElement.<anonymous> (vendors-ab1cd7d0.8ccd3135.js:1:3135)
Is there a staging URL that I can visit and check your integration?
how do i do that
Deploy your website so that I can visit and access it
what is the api endpoint to get the link for the user to be authenticated logged in
https://docs.stripe.com/connect/get-started-connect-embedded-components?platform=web&client=js#components-requiring-authentication these are the components that requires authentication.
Authentication should be handle by Connect.js automatically and you don't need to worry about it.
https://docs.stripe.com/security/guide?csp=csp-connect if your website has a CSP, you should include these directives in your CSP configuraitons
so i give you access to my site and then you could see whats going on
No I can't access your project directly.
I don't need full access to your project. I just need a public URL to visit the page where you integrated the embedded Connect.js
its not public though
That's why I asked you to deploy to a staging site so that I can test