Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Ky sajt do të funksionojë me kufizime, teksa bëjmë mirëmbajtjen e tij për të përmirësuar punën tuaj. Nëse një artikull nuk e zgjidh problemin tuaj dhe dëshironi të bëni një pyetje, kemi bashkësinë tonë të asistencës, e gatshme për t’ju ndihmuar, te @FirefoxSupport në Twitter dhe/r/firefox në Reddit.

Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

Firefox Prevents Local Machine File Access But Firefox Dev Ed Allows It . . .

  • 3 përgjigje
  • 1 e ka hasur këtë problem
  • 1 parje
  • Përgjigjja më e re nga tamjk

more options

Local Machine: Dell Inspiron i5-7200 / 16 GB RAM / Local Op Sys: Ubuntu 20.04LTS

Firefox version: 99.0 FFDE version: 100.0b5

Node.js version 14.18.1 npm version 6.14.15


I had a Node.js web app running on my local machine all usual browsers like Firefox, Firefox Dev Ed (FFDE), Chromium, Edge, Opera, etc till recently.

Recently it shows an error when run on Firefox (also on Chromium, Opera and Edge) although continuing to run okay on FFDE.

Firefox Error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/sandbar/Desktop/nodeapp-local/undefined. (Reason: CORS request not http).

Edge Error: Access to XMLHttpRequest at 'file:///home/sandbar/Desktop/nodeapp-local/undefined' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, edge, https, chrome-untrusted.


Naturally, I need to test the web app on my local machine using several browsers before I should upload it to a server and trial it there.

So how do I configure the browser and/or app to allow access to local machine files ?

''' Local Machine: Dell Inspiron i5-7200 / 16 GB RAM / Local Op Sys: Ubuntu 20.04LTS Firefox version: 99.0 FFDE version: 100.0b5 Node.js version 14.18.1 npm version 6.14.15''' I had a Node.js web app running on my local machine all usual browsers like Firefox, Firefox Dev Ed (FFDE), Chromium, Edge, Opera, etc till recently. Recently it shows an error when run on Firefox (also on Chromium, Opera and Edge) although continuing to run okay on FFDE. Firefox Error: ''Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at file:///home/sandbar/Desktop/nodeapp-local/undefined. (Reason: CORS request not http).'' Edge Error: ''Access to XMLHttpRequest at 'file:///home/sandbar/Desktop/nodeapp-local/undefined' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, edge, https, chrome-untrusted.'' Naturally, I need to test the web app on my local machine using several browsers before I should upload it to a server and trial it there. So how do I configure the browser and/or app to allow access to local machine files ?

Ndryshuar nga tamjk

Zgjidhje e zgjedhur

Sorted.

The frontend JavaScript had an error in it after a recent update that sent the XHR to an undefined endpoint. It was this that triggered a CORS error in Firefox, not the fact that I was using a local server call.

Why FFDE showed no error was likely that the browser cache had not been cleared since the web app was last run on it. I can explain it no other way.

Anyway, after correcting the frontend request sending script - and taking care to close FF, clear the cache etc and restart FF - all ran well on both browsers.

Lexojeni këtë përgjigje brenda kontekstit 👍 0

Krejt Përgjigjet (3)

more options

Zgjidhja e Zgjedhur

Sorted.

The frontend JavaScript had an error in it after a recent update that sent the XHR to an undefined endpoint. It was this that triggered a CORS error in Firefox, not the fact that I was using a local server call.

Why FFDE showed no error was likely that the browser cache had not been cleared since the web app was last run on it. I can explain it no other way.

Anyway, after correcting the frontend request sending script - and taking care to close FF, clear the cache etc and restart FF - all ran well on both browsers.

more options

That was very good work. Well Done. Please flag your last post as Solved Problem as this can help others with similar problems. Go to that post and click the 'Solved' button to its right.

more options

I see no Solved Problem button.

The Solution chosen text beside Undo button is non-clickable to me.