How To Fix: "null has been blocked by CORS policy" Error in JavaScript AJAX

  Рет қаралды 146,021

dcode

dcode

Күн бұрын

Пікірлер: 182
@antoniofuller2331
@antoniofuller2331 3 жыл бұрын
I hate when they say "a very simple fix" lol
@mounir101
@mounir101 3 жыл бұрын
Pretty awesome! I think every programmer had faced this problem before. Even I faced it as well and fixed it by using live server extension. Thanks so much bro for helping people to solve this issue.
@chembetikarunakar814
@chembetikarunakar814 2 жыл бұрын
Without liveserver can we do this
@NoobDeveloper_123
@NoobDeveloper_123 3 ай бұрын
thanks brother, i were suffering from a lot and seeing many tutorials from different channels. most of them created garbage tutorial and finally from your side i get the original solution.
@cloudzero2049
@cloudzero2049 Жыл бұрын
I'm over here training neural networks and getting ready to pull my hair out because CORS wouldn't let me load my trained models (ML5.js library). I let out a huge sigh of relief when you said VS Code has a server extension, I was worried I was going to have to design a Node.js overlay. Every things working, thank you so much.
@RIGARR
@RIGARR 3 жыл бұрын
woah! what a coincidence! I was just searchin' to fix this problem and got your video just uploaded
@pavelromanov8833
@pavelromanov8833 3 жыл бұрын
You man are a live safer. I've been banging my head for the past 3 hours and I feel relieved to have finally solved my problem. Thank you very much sir!
@userg23
@userg23 2 жыл бұрын
Excellent explanation. Simple and short.. Easy to understand. Thnx man 👍🏻
@ScreenPrintR
@ScreenPrintR 2 жыл бұрын
Do I have to re-save my file in VS code? When I hit enter after doing the f1 I get a message on the bottom of vs that says open workspace.
@christianrivera1568
@christianrivera1568 2 жыл бұрын
This video is the response to my 2 weeks problem. Thank you sooo much!
@Olalekan.Ekundayo
@Olalekan.Ekundayo Жыл бұрын
So, I found someone like me that was stuck with this error message for weeks 😂
@juliuspaige5173
@juliuspaige5173 3 жыл бұрын
How do you fix it if downloading a webserver is not an option?
@MarkKathrynVegera
@MarkKathrynVegera 2 жыл бұрын
Excellent and thank you for saving me another two hours of checking my code!
@Olalekan.Ekundayo
@Olalekan.Ekundayo Жыл бұрын
Wow! You just gave me a solution to the error message I have been encountering for weeks now, and has slow down my learning... Thank you very much, you deserved a like and a subscribe from me 😄
@my.b707
@my.b707 Жыл бұрын
The same, that slow my learning an I was sad. Now I can continue
@smoothbeak
@smoothbeak 3 жыл бұрын
When running that live server option in Visual Studio Code what's the keyboard shortcut for macOS to open up that panel? (he uses F1 on windows)
@einsteinwallah2
@einsteinwallah2 2 жыл бұрын
ok so file on hard drive with extension html or htm or any other cannot access pages from (say) a news or literature site but what if i am writing an android app using cordova platform ... once i finish writing app following your work arounds and i upload app will it work on any android which has "bought" from app store? ... remember person who "buys" just gets app ... will ajax or fetch still work because no server is running on android device of buyer afaik ... my code is not for a client's website but for a device like android ... when it is game like wordle hosted on nytimes website's games page it is still an access from server to server but when an app is running on an android device it is running exactly like a file from storage just like your error giving file ... please correct me if i am wrong
@KinTsume
@KinTsume 2 жыл бұрын
I'm having the same error but i'm using fetch(). I tried to load the page with live server but still doesn't work. Any advise?
@clutchmasterman
@clutchmasterman 3 жыл бұрын
problem is this only works for the .html alone. no other .js or .css file in the folder, which ofc breaks the project
@Felix-vu9tz
@Felix-vu9tz 2 жыл бұрын
thanks man, helped with starting my journey learning react, I was getting pretty frustrated as I wasnt even able to print hello world but now i should be able to actually get going, thanks!
@ankitkumar-zx9mq
@ankitkumar-zx9mq Жыл бұрын
Didnt worked for me
@HonduranHunk
@HonduranHunk Жыл бұрын
Saved me what would have been hours of scouring the internet. Thank you so much
@Harry-gc8kb
@Harry-gc8kb Жыл бұрын
but then whuy do you get the error if you fetch it from your own harddrive?
@chatebillychilima6762
@chatebillychilima6762 2 жыл бұрын
Perfectly summed up.... Easy and great fix. Thanks bruv
@alin-alexandru-peter
@alin-alexandru-peter 2 жыл бұрын
maaaaaaaaaaaaan your the best !!! I need your tutorial for the timer and i was getting this error you fixed it for me!1 great job ! you and coding train:))) are my favorite developers ever.
@baqsinternacional975
@baqsinternacional975 Жыл бұрын
Hi, thank you for the video, my problem is a bit diferent, my cliente need the site to run offline in a company, and he can´t install the server in machines, because security compliance, how can i fix that? i´ve been trying this for more then 24 hours. I´ve created a bat file to open navigators without security in anonimous mode, however that´s not the ideal
@alexthewebdesigner1856
@alexthewebdesigner1856 Жыл бұрын
Thanx for posting this Bro. It was a great help!
@DJMIKE20
@DJMIKE20 2 жыл бұрын
Can you show how to solve this issue with the fetch method ?
@imaansarwar2314
@imaansarwar2314 2 жыл бұрын
Sir i am still getting error. while trying to add form data to google sheet
@delegatewu
@delegatewu 2 жыл бұрын
This video fixed my javascript csv loading problem too. Thank you very much.
@ashmandeepkaur9392
@ashmandeepkaur9392 2 жыл бұрын
I am already using live server in vs code but still getting this error. Can anyone help??
@aviuvaydov5690
@aviuvaydov5690 Жыл бұрын
were you able to figure it out? I'm getting the same error
@JHAM29
@JHAM29 3 жыл бұрын
How do i fix "because the scheme does not have a registered handler."
@JHAM29
@JHAM29 3 жыл бұрын
"Cookies marked with SameSite=None must also be marked with Secure to allow setting them in a cross-site context. This behavior protects user data from being sent over an insecure connection."
@michaelwhite278
@michaelwhite278 Жыл бұрын
Did you do the voice for the whale in the beached whale / chips bru video?
@almohaiminfarabi9181
@almohaiminfarabi9181 2 жыл бұрын
Is there any way to do it without live server extention?
@jossuer7124
@jossuer7124 2 жыл бұрын
If I dont want to use a web server?
@changleding4296
@changleding4296 Жыл бұрын
This really helps me a lot! Truly appreciate!!!
@WaheedRafiq
@WaheedRafiq 3 жыл бұрын
If you were standing in front of me, I would have kiss you buddy, spent like 2 days trying to fix this issue, and posted comments on stack flow for help you explained it well, easy to follow and for someone who is Dyslexic your tutorial was disable people-friendly too. well done.
@lanaphillips1482
@lanaphillips1482 4 ай бұрын
you, sir, MADE MY EFFING DAY
@dopamine_Seeker
@dopamine_Seeker 3 жыл бұрын
Thank God! Randomly I found your video. Thank u 😊
@willturner9849
@willturner9849 Жыл бұрын
Thank you so much! That was really helpful!
@PrincessCarrieGraham
@PrincessCarrieGraham 3 жыл бұрын
Modules in vanilla JavaScript produce the same error, BTW :-) and you totally rawk, because this worked on that too. Thank you.
@leonardosolorio9609
@leonardosolorio9609 Жыл бұрын
Thank you bro, your explanation saved me loads of time! Thanks!!
@nisenobody8273
@nisenobody8273 2 жыл бұрын
Oh my lord, thank you! As a rookie this was being a truly headache.
@rangabharath4253
@rangabharath4253 3 жыл бұрын
Awesome as always 👍😀
@sunnylarosa4700
@sunnylarosa4700 2 жыл бұрын
Thankyou! It's helping😁
@Huszan
@Huszan Жыл бұрын
Thank You man! You are a life saver!
@vicerogi
@vicerogi 3 жыл бұрын
I'm used to active live server, but this time I didn't cause I thought there will be some problem with scss ( it is the first time with this preprocessor) And I was searching different solutions. I did not expect it at all jajaj my gosh, thanks indeed!!
@davidpadron8329
@davidpadron8329 2 жыл бұрын
Thanks man for the explanation. This helped me to solve the problem 🙂👍
@bhoopendrafagna8535
@bhoopendrafagna8535 Жыл бұрын
this is not working with php code
@short_facts_entertaining
@short_facts_entertaining Жыл бұрын
Great! Was super helpful
@blazi_0
@blazi_0 3 жыл бұрын
Is live server like local host ?or they're different stuff ?
@thenarfer
@thenarfer 3 жыл бұрын
Fantastic video! I hope this will solve my problem. Will try to upload my files to my server and see if the problem still occurs.
@karlee8608
@karlee8608 2 жыл бұрын
Thank you dCode. You just solved it issue
@catz6457
@catz6457 2 жыл бұрын
What about in GeoServer
@davestorm6718
@davestorm6718 2 жыл бұрын
You need Browser Preview Extension installed as well to get this to work, however, it's been deprecated in favor of Live Preview (you have to uninstall Live Server, first).
@soufianetaku3137
@soufianetaku3137 Жыл бұрын
thanks man it's really working
@umangupadhyay4335
@umangupadhyay4335 Жыл бұрын
appriciated man .. thanks😇
@HAPPYLUCIA
@HAPPYLUCIA 2 жыл бұрын
You are the best. You save my time a lot. Many thanks!!
@joshuacushing2858
@joshuacushing2858 3 жыл бұрын
Thanks so much! You saved me a lot of time and frustration!
@csf4442
@csf4442 Жыл бұрын
thanks so much for this! you saved my bacon!
@marhlenz6476
@marhlenz6476 Жыл бұрын
Thanks man, excellent explanation.
@danielroman1484
@danielroman1484 2 жыл бұрын
I opened mine with live server but the error is still there
@aviuvaydov5690
@aviuvaydov5690 Жыл бұрын
were you able to figure it out? I'm getting the same error.
@comentarioscomentar
@comentarioscomentar 11 ай бұрын
i know that is too late but try this : you Don't make double click in the index.html archive to execute in the navigator. Instead, power on the server, open the navigator, enter in the address "localhost" and search manually the file to execute in the list.
@AhmedMohamed-sn1rp
@AhmedMohamed-sn1rp Жыл бұрын
Thank you so much It really helped me
@tentorias8344
@tentorias8344 3 жыл бұрын
Oh man, thank you so much, you save my life.
@freddecker7652
@freddecker7652 2 жыл бұрын
Well, something changed in our code, because it works in previous versions. We can't have people have to have a web server, that's ridiculous. Our app is designed so that anyone can download a zip file, unzip it, and run a web based tool. There must be another way.
@ScreenPrintR
@ScreenPrintR 2 жыл бұрын
Thank you. This was extremely helpful Kudos to you.
@lindaoktavianty2688
@lindaoktavianty2688 3 жыл бұрын
Thank youu so much.. your video is so helping 😭
@anthonysanchez119
@anthonysanchez119 2 жыл бұрын
te lo agradezco mucho estaba pariendo y pujando por ese error, pero gracias a ti lo he corregido. Awesome, thanks
@sarahz319
@sarahz319 3 жыл бұрын
so we have to download the visual studio code first
@isoftenterprise
@isoftenterprise 10 ай бұрын
On the money my boy!
@sarahz319
@sarahz319 3 жыл бұрын
how did u get into 03:36
@alfonsoramirezelorriaga1153
@alfonsoramirezelorriaga1153 3 жыл бұрын
Go to settings and then go to online service settings.
@seayellow5834
@seayellow5834 2 жыл бұрын
Not solved. I got this even on a server. I used an XMLHttpRequest object and I got this.
@comentarioscomentar
@comentarioscomentar 11 ай бұрын
i know that is too late but try this : you Don't make double click in the index.html archive to execute in the navigator. Instead, power on the server, open the navigator, enter in the address "localhost" and search manually the file to execute in the list.
@Atelier6061
@Atelier6061 2 жыл бұрын
Thank you so much. :) It worked for me
@itzigma9176
@itzigma9176 3 жыл бұрын
Pretty awesome!! Great Explanation. Well Thanks a lot.
@manojkolhe8221
@manojkolhe8221 3 жыл бұрын
thank u buddy, its very simple
@Roblify
@Roblify 5 ай бұрын
Even with a web server, it still gives me the error
@topsportscoverage9257
@topsportscoverage9257 3 жыл бұрын
Thanks for the great video!
@BlueJhonny777
@BlueJhonny777 2 жыл бұрын
works for me, thanks ; )
@kamrantailor
@kamrantailor 2 жыл бұрын
Thanks this helped me a lot
@romainba4098
@romainba4098 2 жыл бұрын
You helped us a lot, dude
@sammyj6077
@sammyj6077 2 жыл бұрын
Thanks so much!!!!! 🙏
@youarepopo
@youarepopo 3 жыл бұрын
Thanks a lot! Great Explanation.
@krishshah3974
@krishshah3974 2 жыл бұрын
yo, thank you so much! :D
@20sinngamkhaidem86
@20sinngamkhaidem86 2 жыл бұрын
Super Helpful
@leomussa3650
@leomussa3650 3 жыл бұрын
Thank you so much...amazing video
@t_sem84
@t_sem84 2 жыл бұрын
thanks so much really apreciated
@alexhoubak5869
@alexhoubak5869 2 жыл бұрын
Very helpful thanks!
@jrrobles79
@jrrobles79 3 жыл бұрын
Im still getting this error even with the live server
@aviuvaydov5690
@aviuvaydov5690 Жыл бұрын
were you able to figure it out? I'm getting the same error.
@comentarioscomentar
@comentarioscomentar 11 ай бұрын
i know that is too late but try this : you Don't make double click in the index.html archive to execute in the navigator. Instead, power on the server, open the navigator, enter in the address "localhost" and search manually the file to execute in the list.
@vivekchavan9926
@vivekchavan9926 Жыл бұрын
thanks for the help !
@LearnWithSadik165
@LearnWithSadik165 3 жыл бұрын
Thanks, it's helpful for me.
@redpill5008
@redpill5008 3 жыл бұрын
Thank you a lot. It worked!
@expauloczar
@expauloczar Жыл бұрын
Very good!
@masophankhahle4799
@masophankhahle4799 3 жыл бұрын
i did all this solutions but im still getting the same
@SameerAbbasMughal
@SameerAbbasMughal 3 жыл бұрын
Thank You Sir this video is very help full for me Thank altos!
@mandavijayaraju2140
@mandavijayaraju2140 Жыл бұрын
It's working for me.thanks
@azraiputrabarumundaulay2082
@azraiputrabarumundaulay2082 2 жыл бұрын
thank u ser, it works
@neontuts5637
@neontuts5637 3 жыл бұрын
Nice video sir, If Nodejs installed in your system use *lite-server*
@vadym1316
@vadym1316 2 жыл бұрын
Excellent!
@dontcare989
@dontcare989 2 жыл бұрын
thx, u rly helps me
@dcode-software
@dcode-software 2 жыл бұрын
YOu're very welcome
@hs55236139
@hs55236139 3 жыл бұрын
thank you, i didn't know "f1 => open live sever" i lost my 3 hours hahah
@nahuelgarcia0
@nahuelgarcia0 2 жыл бұрын
thanks brother you are the best
@khushisingh3028
@khushisingh3028 Жыл бұрын
Helpful!!!
@angelarojastovar8780
@angelarojastovar8780 3 жыл бұрын
Ty, you saved my life.
React Proxy | Easiest Fix to CORS Errors
15:52
Sam Meech-Ward
Рет қаралды 95 М.
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
This Fixes CORS
13:02
Colby Fayock
Рет қаралды 7 М.
Как обойти CORS - Cross-Origin Resource Sharing
30:06
JSNavigator
Рет қаралды 3,7 М.
Learn CORS In 6 Minutes
6:06
Web Dev Simplified
Рет қаралды 743 М.
Why I No longer Hate CORS and Why you should too!
13:10
CoderOne
Рет қаралды 18 М.
How To Solve CORS Error? Learn CORS in 6 mins
6:32
Etisha Garg
Рет қаралды 11 М.
Cross-Origin Resource Sharing (CORS) | Complete Guide
52:17
Rana Khalil
Рет қаралды 77 М.
Fix CORS Error Permanently Regardless of Your Web App
15:24
SoftAuthor
Рет қаралды 13 М.
User Input and Response on a webpage using JavaScript (for beginners)
16:55
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН