Closed bensontrent closed 10 months ago
I've flagged this to the team internally and we'll investigate. Thanks for the report!
I was able to resolve this issue by switching to a ContextView as required by the docs. But this error as reported in the example I gave can be repeated in multiple environments.
Hey there, we haven't tested using Stripe Apps with React Router. Can you tell me more about your use case? Are you trying to set up navigation within your app that alters the URL? Thanks.
No, I'm not attempting to alter the URL. The memory router doesn't behave this way, the URL in the memory router is more of an internal route used to distribute chunks of pages so a very large app can load efficiently; without loading unnecessary components. To reproduce the error, I did leave-out one key detail: The InvoiceDetailView component in my example should be referenced in your stripe-app.json
views
object as:
{
"viewport": "stripe.dashboard.invoice.detail",
"component": "InvoiceDetailView "
}
You would then need to navigate to a individual invoice view in Stripe (after a period of inactivity sufficient to trigger a password prompt). At that point, it's a guaranteed browser crash (according to my tests on multiple environments).
That said, I have resolved the error by following the documentation indicating that a FocusView should never be the root component. Rather, a FocusView should always live as a child of a ContextView.
You're welcome to close this issue.
Great, thanks Benson.
The browser crashes when, after a period of user inactivity in the Stripe dashboard, an attempt is made to update a Stripe object, thus presenting a "Confirm your password" dialog box in the Stripe dashboard. This happens when the request to update an invoice is called from within a Focus view in a MemoryRouter.
To Reproduce
Screenshots
Desktop