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

riot-web served at file://... names the device by its path #2986

Closed
ara4n opened this issue Jan 18, 2017 · 5 comments
Closed

riot-web served at file://... names the device by its path #2986

ara4n opened this issue Jan 18, 2017 · 5 comments

Comments

@ara4n
Copy link
Member

ara4n commented Jan 18, 2017

thus leaking NT acct names!

@richvdh
Copy link
Member

richvdh commented Jan 18, 2017

Not electron. Local riot-web.

@uhoreg
Copy link
Member

uhoreg commented Jan 18, 2017

https://github.com/vector-im/riot-web/blob/master/src/vector/platform/WebPlatform.js#L188 bases the device name on window.location, so this can be fixed by adding a special case for file: URLs. Maybe doing something like "Private install via [browser] on [OS]"?

@uhoreg
Copy link
Member

uhoreg commented Jan 18, 2017

I'm not sure of the value of using the full path from window.location either since, for example, riot.im/develop, /app, and /staging all use the same device name which means that it may be inaccurate. It seems to me like if the protocol is http(s), then we should just use the host name, and otherwise (I don't know what other protocols we should support), we just say "Private install".

@richvdh richvdh changed the title electron on windows names the device by its path riot-web served at file://... names the device by its path Feb 5, 2017
@ara4n
Copy link
Member Author

ara4n commented Feb 18, 2017

This is basically the same as https://github.com/vector-im/riot-web/issues/2295

@t3chguy
Copy link
Member

t3chguy commented Jul 14, 2021

file:// no longer seems to work to run Element from

Access to font at 'file:///fonts/Inter/Inter-Bold.fc28dff.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-Bold.fc28dff.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-BoldItalic.2129bd0.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-BoldItalic.2129bd0.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-SemiBoldItalic.10a60d8.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-SemiBoldItalic.10a60d8.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-SemiBold.0802d48.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-SemiBold.0802d48.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-MediumItalic.8154ac2.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-MediumItalic.8154ac2.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-Medium.027d14e.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-Medium.027d14e.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-Italic.b791861.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-Italic.b791861.woff2:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to font at 'file:///fonts/Inter/Inter-Regular.4232a67.woff2' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
Inter-Regular.4232a67.woff2:1 Failed to load resource: net::ERR_FAILED
rageshake.js:65 Initialised rageshake.
rageshake.js:65 To fix line numbers in Chrome: Meatball menu → Settings → Ignore list → Add /rageshake\.js$
olm.js:34 Fetch API cannot load file:///Users/t3chguy/WebstormProjects/element-web/webapp/olm.91fced0.wasm. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ olm.js:34
rageshake.js:65 Using Web platform
WebPlatform.ts:40 Uncaught (in promise) TypeError: Failed to register a ServiceWorker: The URL protocol of the current origin ('null') is not supported.
    at new V (WebPlatform.ts:40)
    at $ (init.tsx:49)
    at index.ts:139
olm.js:34 Uncaught (in promise) TypeError: Failed to fetch
    at olm.js:34
    at olm.js:34
    at s (olm.js:33)
    at olm.js:134
    at new Promise (<anonymous>)
    at Object.a.init (olm.js:127)
    at J (init.tsx:82)
    at index.ts:137
index.html:1 Access to XMLHttpRequest at 'file:///Users/t3chguy/WebstormProjects/element-web/webapp/config..json?cachebuster=1626250521142' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
config..json?cachebuster=1626250521142:1 Failed to load resource: net::ERR_FAILED
index.html:1 Access to XMLHttpRequest at 'file:///Users/t3chguy/WebstormProjects/element-web/webapp/config.json?cachebuster=1626250521143' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
rageshake.js:65 No bug report endpoint set - logs will not be persisted
e.<computed> @ rageshake.js:65
rageshake.js:65 Loading skin...
config.json?cachebuster=1626250521143:1 Failed to load resource: net::ERR_FAILED
MFileBody.js:32 Fetch API cannot load file:///Users/t3chguy/WebstormProjects/element-web/webapp/img/download.4f331f0.svg. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ MFileBody.js:32
rageshake.js:65 Skin loaded!
index.html:1 Access to XMLHttpRequest at 'file:///Users/t3chguy/WebstormProjects/element-web/webapp/i18n/languages.8ed4a83.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
rageshake.js:65 Unable to set language Error: Failed to load i18n/languages.8ed4a83.json, got 0
    at Object.callback (languageHandler.tsx:477)
    at index.js:294
    at XMLHttpRequest.o.onreadystatechange (index.js:244)
e.<computed> @ rageshake.js:65
i18n/languages.8ed4a83.json:1 Failed to load resource: net::ERR_FAILED
MFileBody.js:32 Uncaught (in promise) TypeError: Failed to fetch
    at MFileBody.js:32
    at Module.<anonymous> (MFileBody.js:37)
    at a (bootstrap:68)
    at n.load (Skinner.js:75)
    at Module.i (index.js:21)
    at X (init.tsx:142)
    at async o (index.ts:34)
    at async index.ts:152
9The resource <URL> was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
index.html:1 Access to internal resource at 'file:///Users/t3chguy/WebstormProjects/element-web/webapp/manifest.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.

So I don't think this is longer an issue, element-hq/element-meta#382 / element-hq/element-meta#1438 is the proper solution to this anyhow.

@t3chguy t3chguy closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants