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

Error Status: 0 Message: Http failure response for https://api64.ipify.org/?format=json: 0 Unknown Error #570

Open
ghachey opened this issue May 17, 2023 · 3 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation minor Level of urgency of bug (or enhancement)

Comments

@ghachey
Copy link

ghachey commented May 17, 2023

I got this a few times after rebooting the production server. It has something to do with the following code that runs in the browser of the users. I have not identified yet the exact fix. More details coming...

@ghachey ghachey self-assigned this May 17, 2023
@ghachey ghachey added the documentation Improvements or additions to documentation label May 17, 2023
@ghachey
Copy link
Author

ghachey commented May 17, 2023

I tracked this down to the Browser DuckDuckGo Tracking protection add-on in the browser. Turning this off for the SIS website fixes the issue. However, this raises the question: "is the call to https://api64.ipify.org/?format=json necessary for the proper functioning of the SIS?". Leaving this opened until this is more clear.

@ghachey
Copy link
Author

ghachey commented May 17, 2023

It seems this is merely used to store the IP address from which the users are accessing the SIS. One flaw here is that if this IP address is not retrieved successfully (like a tracking blocker) the whole system does not work when in fact this action is merely to collect a non-essential piece of data for the audit of users' access. There should be a more graceful solution in case where the user chooses to not share their IP address such as inserting "null" into the UserModel.userAccessLog.ipaddress field. Something like

if (this.ipAdd.ip) {
  this.UserModel.userAccessLog.ipaddress=this.ipAdd.ip;
} else {
  this.UserModel.userAccessLog.ipaddress=null;
}

This is to respect the choice of users running tracking blockers in their browsers but just as importantly to avoid having users faced with a system that does not work for an invalid reason. Another reason there should be a graceful fallback is that ipify is a free service and who knows when it will stop operating or change the API. In such case, the whole SIS would stop working.

@openSISAdmin openSISAdmin added the bug Something isn't working label May 24, 2023
@ghachey ghachey added minor Level of urgency of bug (or enhancement) major Level of urgency of bug (or enhancement) and removed major Level of urgency of bug (or enhancement) labels May 25, 2023
@ghachey
Copy link
Author

ghachey commented Apr 30, 2024

The two lines of codes solution above has not been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation minor Level of urgency of bug (or enhancement)
Projects
None yet
Development

No branches or pull requests

4 participants