-
Notifications
You must be signed in to change notification settings - Fork 16
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
TypeError: "pageData.items is undefined" #16
Comments
Either the API URL has changed or the API itself doesn't return a list of items anymore. |
Both suggestions in my previous comment are wrong. The request is still the same but if it is sent by our extension, we get the following response: |
Update: We couldn't figure out why the API call fails sometimes. Most of the time it works just fine. Might be a timing issue or just HSLU doing HSLU stuff.. Version 2.0.6 includes error handling for this issue. A message is shown to the user to inform him that the extension failed to download the necessary data. Workaround: Wait a few minutes and reload the page. |
Reopened because this turned out to be a big issue. After logging in, the requests of our browser add-on get blocked.
All of the methods above work (sometimes). If the request is made from the browser console, the requests work more reliably, but also not always. But in the browser add-on nothing fixed the problem. The only thing that fixes this issue is to stay logged in for 10 - 15 minutes and then reload the page. If anyone has an idea on how to fix this, let us know. |
The session cookies of the mycampus page have the attribute "sameSite=Lax", which is the reason they are not included in normal browser extension requests and the API request will fail (as there is no session active).
Add correct permissions to fix API fetch error (#16)
Thanks @dev-jan! Your pull requests seems to have fixed the issue. |
Fix got released with 2.0.9! https://github.com/eddex/hslu-simple-mep-results/releases/tag/2.0.9 |
Thank you so much! |
The text was updated successfully, but these errors were encountered: