Skip to content
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

Widget: initial request returns NULL objects: #273

Closed
TarmoKlaarRIA opened this issue Aug 22, 2023 · 6 comments
Closed

Widget: initial request returns NULL objects: #273

TarmoKlaarRIA opened this issue Aug 22, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@TarmoKlaarRIA
Copy link
Contributor

tested 22.08.2023, env: dev.buerokratt.ee

Following request reutrns null object with statuscode 300:
https://ruuter.dev.buerokratt.ee/pub2/get-widget-config
{
"response": null
}
https://ruuter.dev.buerokratt.ee/pub2/get-emergency-notice
{
"response": null
}
https://ruuter.dev.buerokratt.ee/pub1/custom-jwt-userinfo
{
"data": {
"custom_jwt_userinfo": null
},
"error": null
}

Image

Image

@TarmoKlaarRIA TarmoKlaarRIA added the bug Something isn't working label Aug 22, 2023
@PaulaMerle PaulaMerle moved this from To Do to AT Rejected in Bürokratt Sprint Aug 22, 2023
@1AhmedYasser
Copy link
Collaborator

1AhmedYasser commented Aug 30, 2023

273.mov

Working on the local side as shown in the video, needs to be rechecked on the dev environment

As for the custom_jwt_userinfo returning null, its normal because in order for this endpoint to return the data the user should be logged in, but here is using the chat bot anonymously, so when the user logs in the clientCustomJwtCookie is filled and used in custom_jwt_userinfo endpoint

273-screenshot

@rasmusei rasmusei moved this from AT Rejected to Blocked in Bürokratt Sprint Aug 30, 2023
@TarmoKlaarRIA
Copy link
Contributor Author

https://dev.buerokratt.ee/
Loading widget configuration works once and then doesn't work again. This morning the configuration was loaded, and the appearance of the widget changed. At the moment the tests show http.300 again and the color remains blue.
And another question, why is the configuration loading 2 times?

image

@rasmusei rasmusei assigned 1AhmedYasser and unassigned varmoh Aug 30, 2023
@rasmusei rasmusei moved this from Blocked to In Progress in Bürokratt Sprint Aug 30, 2023
@rasmusei rasmusei moved this from In Progress to AT Rejected in Bürokratt Sprint Aug 30, 2023
@rasmusei rasmusei moved this from AT Rejected to Blocked in Bürokratt Sprint Sep 1, 2023
@rasmusei
Copy link
Contributor

rasmusei commented Sep 1, 2023

@turnerrainer, take a look at Ahmeds comment:
There are 2 things that could be added as a fix

1- Disable Caching on Module index.html by adding (Not Recommended)

2- Control Caching on API's in Java in case of ruuter via HTTP Headers (Recommended)
a- https://stackoverflow.com/questions/51524633/reactjs-how-to-prevent-browser-from-caching-static-files
b- https://stackoverflow.com/questions/49547/how-do-we-control-web-page-caching-across-all-browsers

In java:

response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
response.setHeader("Expires", "0"); // Proxies.

What do you think is more appropriate to use in our modules ?

Note: For example in chatbot when trying to set the cache control header to the api requests it stopped working, so i think Ruuter needs to account for this headers when needed

@rasmusei
Copy link
Contributor

rasmusei commented Sep 7, 2023

@turnerrainer still waiting your comment

@turnerrainer
Copy link
Contributor

@rasmusei @1AhmedYasser
We'll solve it via buerokratt/Ruuter#213. Ruuter enhancement, not a Chatbot bug.

@turnerrainer
Copy link
Contributor

Should be resolved by Ruuter v1 -> Ruuter v2 migration. Will be fully resolved by #213

@github-project-automation github-project-automation bot moved this from Blocked to Done in Bürokratt Sprint Jan 16, 2024
@github-project-automation github-project-automation bot moved this from Blocked to Done in Buerokratt chatbot Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Status: Done
Development

No branches or pull requests

6 participants