Undefined context in loader after redirect #1730
Send to my agentDescribe the bug#
Another problem relating to undefined context.
I'm creating a new issue since I'm NOT using defaultPreload: 'intent'
Your Example Website or App#
Steps to Reproduce the Bug or Issue#
- Navigate to Navigate to this links fails! (route:
/tests/$testId/reports, url:http://localhost:3001/tests/42/reports/create) - Reloading the page at the same url works.
Expected behavior#
The context provided to the loader function should not be undefined.
- it works correctly if the page is loaded directly at the url (http://localhost:3001/tests/42/reports/create)
- it does NOT work when we navigate to url (http://localhost:3001/tests/42/reports/create)
Screenshots or Videos#
No response
Platform#
- OS: macOS
- Browser: Chrome
Additional context#
I do not have this problem with version 1.27.0.
SeanCassiere added labelsbug
I'm experiencing the same issue in the latest version
We have a PR open that should fix this #1713. We are waiting on some feedback from Tanner before merging it in.
SeanCassiere closed this
@SeanCassiere I still have the same issue. Nothing changed.
And the main thing that I don't change context anywhere. I just set it and try to use helper functions from it. As a workaround I've made a patch using yarn to remove all functionality related to updating context. Something still overriding context with undefined
@SeanCassiere I still have the same issue. Nothing changed.
And the main thing that I don't change context anywhere. I just set it and try to use helper functions from it. As a workaround I've made a patch using yarn to remove all functionality related to updating context. Something still overriding context with undefined
Please create a new issue with a reproduction, I'd be happy to go through it next week!
Sign in to join this conversation.
@SeanCassiere The same thing happens to me, when I navigate between routes it goes fine, but when the component enters due to a redirect, if I try to get the context in that component, it is undefined and the app dies
example error:
hook into paymentMethodComponent
when it enters the before load of the verify email route, the contet works, but when I do the redirect it has to add card, in the addpaymentmethod hook it is undefined