-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate AbortController() pre-emptively stopping requests #128
Comments
@aruniverse - @hl662 and I were able to reproduce the user's issue, and it seems related to the abortController as mentioned above. |
is this an issue with react 18 strict mode? |
Yes, that did it. Removing the strict mode corrects the issue. Should I remove it from the desktop-viewer-test? |
Remove it from the template and suggest that as a fix to the user |
Closing this issue with PR: iTwin/viewer#339 |
Re-opening, as there still is an issue with this custom hook in react 18 strict mode |
In Desktop View Test in iTwin/viewer when attempting to get imodels for a given iTwin, the api call is stalling and being aborted:
This causes the iModels page to never load, leaving 3 loading animations cycling forever, as described in this Issue
Removing the
signal: abortController.signal
from useIModelData.ts#L127 corrects the issue.
Removing React.StrictMode from the app also corrects the issue.
We should investigate why this is interfering with the request.
Additional info:
Running the request with the same accessToken and headers does return the iModels as normal, ruling out a clientId or auth issue.
The text was updated successfully, but these errors were encountered: