Giter Club home page Giter Club logo

Comments (13)

rwieruch avatar rwieruch commented on June 2, 2024 2

@Kovner I think your request misses a ?. Can you try again https://hn.algolia.com/api/v1/search?query=redux ?

from the-road-to-learn-react.

miloszpanas avatar miloszpanas commented on June 2, 2024 2

That's odd @miloszpanas I cloned https://github.com/the-road-to-learn-react/hackernews-client and it worked for me.

It's really weird, I couldn't get it to work yesterday, today it works just fine with no modifications on my part. No idea what was causing it. Sorry for bothering

from the-road-to-learn-react.

Kovner avatar Kovner commented on June 2, 2024 1

Are you sure this is fixed? I am getting the same error:

Failed to load https://hn.algolia.com/api/v1/searchquery=redux: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 404. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

from the-road-to-learn-react.

rwieruch avatar rwieruch commented on June 2, 2024

Fixed: algolia/hn-search#106 (comment)

from the-road-to-learn-react.

Kovner avatar Kovner commented on June 2, 2024

Yep that was it sorry! That question got hidden in the template string variables!

from the-road-to-learn-react.

danascheider avatar danascheider commented on June 2, 2024

I am still getting this issue:


fetchSearchTopStories @ App.js:70
onSearchSubmit @ App.js:46
callCallback @ react-dom.development.js:100
invokeGuardedCallbackDev @ react-dom.development.js:138
invokeGuardedCallback @ react-dom.development.js:187
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:201
executeDispatch @ react-dom.development.js:461
executeDispatchesInOrder @ react-dom.development.js:483
executeDispatchesAndRelease @ react-dom.development.js:581
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:592
forEachAccumulated @ react-dom.development.js:562
runEventsInBatch @ react-dom.development.js:723
runExtractedEventsInBatch @ react-dom.development.js:732
handleTopLevel @ react-dom.development.js:4477
batchedUpdates$1 @ react-dom.development.js:16660
batchedUpdates @ react-dom.development.js:2131
dispatchEvent @ react-dom.development.js:4556
interactiveUpdates$1 @ react-dom.development.js:16715
interactiveUpdates @ react-dom.development.js:2150
dispatchInteractiveEvent @ react-dom.development.js:4533
localhost/:1 Failed to load https://hn.algolia.com/api/v1/search?query=redux&page=%20%20%20%20%20%200&hitsPerPage=100: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3001' is therefore not allowed access. The response had HTTP status code 400. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

This is a screen cap of the Network tab in my browser (which is Chrome, if it matters):
screen shot 2018-09-01 at 1 06 40 pm

This happened after I implemented the client cache, although I had taken a break for a week or two so maybe something changed in the HN API since then?

from the-road-to-learn-react.

danascheider avatar danascheider commented on June 2, 2024

Oh and also! Changing to the GitHub API did not help.

from the-road-to-learn-react.

rwieruch avatar rwieruch commented on June 2, 2024

@danascheider can you share your project on GitHub?

from the-road-to-learn-react.

danascheider avatar danascheider commented on June 2, 2024

@rwieruch You bet! Here it is!

from the-road-to-learn-react.

rwieruch avatar rwieruch commented on June 2, 2024

@danascheider see danascheider/road-to-learn-react#1 You can simply merge the PR and everything should be fixed. Check the commits again to understand what has been wrong.

from the-road-to-learn-react.

angeldelacruzdev avatar angeldelacruzdev commented on June 2, 2024

My problem.

Failed to load http://127.0.0.1:8000/api/fileupload: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. createError.js:17 Uncaught (in promise) Error: Network Error at createError (createError.js:17) at XMLHttpRequest.handleError (xhr.js:87)

from the-road-to-learn-react.

miloszpanas avatar miloszpanas commented on June 2, 2024

I'm having the very same issue when trying to fetch data from API

Access to fetch at 'https://hn.algolia.com/api/v1/search?query=react' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any ideas? Here's the repo:
https://github.com/miloszpanas/react_practice

from the-road-to-learn-react.

rwieruch avatar rwieruch commented on June 2, 2024

That's odd @miloszpanas I cloned https://github.com/the-road-to-learn-react/hackernews-client and it worked for me.

from the-road-to-learn-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.