Shared-Reality-Lab / IMAGE-browser

IMAGE project browser extensions & client-side code
Other
2 stars 0 forks source link

No default value for server storage #99

Closed JRegimbal closed 2 years ago

JRegimbal commented 2 years ago

If the user has not manually opened the settings menu and confirmed a URL for the server, requests to the server will fail silently. It seems to be that the serverURL value evaluates to "" and so the request will fail. This is not reported to the user. In DevTools, the following is shown:

POST chrome-extension://lkpbegcbfkalpankdodplodbhgeeddgb/undefinedrender net::ERR_FILE_NOT_FOUND (background.ts:125)
TypeError: Failed to fetch (background.ts:164)

Tested with the current main (f224155d58f4f721d586800835d9ba38dd5652db)

JRegimbal commented 2 years ago

Assigning to @jaydeepsingh25 for triage.

jeffbl commented 2 years ago

This should default to image.a11y.mcgill.ca . @jaydeepsingh25 : Assigning to @Clarisa1999 so this can be looked at quickly.

jeffbl commented 2 years ago

Moved to ASAP, since needs to be fixed before asking even team members to test (in case they install on new machines, for example)

rayanisran commented 2 years ago

Discussed earlier in tech-arch: in the extension options, you may need to change the server URL to point to https://pegasus.cim.mcgill.ca/image/ for now.

Clarisa1999 commented 2 years ago

This PR addresses the default server to be bach-image.a11y.mcgill.ca if user did not put any server options. I can change the default to be pegasus.

jeffbl commented 2 years ago

The default address should be https://image.a11y.mcgill.ca/ , and this will get targeted to the correct server (currently in progress of being switched from pointing to bach to pointing to pegasus...)

jaydeepsingh25 commented 2 years ago

The issue is still not fixed, I still get the same error when i check on the extension latest code. The requests fail because there is no default value in the storage, The extension works only when I open the options page and click on save settings. image I suggest please provide the fix in the Pull request already open (https://github.com/Shared-Reality-Lab/IMAGE-browser/pull/114)

jeffbl commented 2 years ago

@Clarisa1999 Please determine a method to test this in a "clean" browser to make sure it works (clearing the settings, VM, etc.) before submitting new fix.

JRegimbal commented 2 years ago

To hop in, using web-ext (already a dependency installed via npm) will start a clean browser instance. It can be started with chromium by calling npx web-ext run -t chromium in the build directory.