tabame icon indicating copy to clipboard operation
tabame copied to clipboard

Persistent crash upon switching networks to OysterLending

Open jordaaash opened this issue 4 years ago • 2 comments

Steps to reproduce:

  1. Run locally with HTTPS=true npm start
  2. Open https://localhost:3000
  3. Open settings menu
  4. From Networks select, choose "OysterLending"
Screen Shot 2021-02-08 at 2 36 35 PM

Because the chosen network is set in localStorage, the crash will persist upon reloading the page, and clearing localStorage is the only way to recover.

From my debugging, it looks like the root issue is this:

Mixed Content: The page at 'https://localhost:3000/#/' was loaded over HTTPS, but requested an insecure resource 'http://oyster-dev.solana.com/'. This request has been blocked; the content must be served over HTTPS.

Mixed Content: The page at 'https://localhost:3000/#/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://oyster-dev.solana.com/'. This request has been blocked; this endpoint must be available over WSS.

jordaaash avatar Feb 08 '21 20:02 jordaaash

Access over HTTPS is required for WebUSB support (e.g. https://github.com/solana-labs/oyster-lending/pull/56)

jordaaash avatar Feb 08 '21 20:02 jordaaash

Promixate cause is probably HTTP access of this link:

https://github.com/solana-labs/oyster-lending/blob/6ce7798fa75bd4cb89219d45e3e49716d20ae2be/src/contexts/connection.tsx#L30

However, the HTTPS version of this link doesn't resolve.

jordaaash avatar Feb 09 '21 01:02 jordaaash