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

[Bug] CORS: error while retrieving images... #11

Open
dtslvr opened this issue Mar 2, 2021 · 13 comments
Open

[Bug] CORS: error while retrieving images... #11

dtslvr opened this issue Mar 2, 2021 · 13 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed instagram-api
Milestone

Comments

@dtslvr
Copy link

dtslvr commented Mar 2, 2021

Expected Behavior

Images from Instagram are loaded.

Actual Behavior

No images from Instagram are loaded.

Steps to Reproduce

  1. Visit https://codepen.io/ptkdev/pen/WNQOYqy
  2. See Error message console of developer tools:
    Access to fetch at 'https://www.instagram.com/ptkdev/?__a=1' from origin 'https://cdpn.io' 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.
@ptkdev ptkdev self-assigned this Mar 2, 2021
@ptkdev ptkdev added bug Something isn't working help wanted Extra attention is needed instagram-api labels Mar 2, 2021
@ptkdev
Copy link
Member

ptkdev commented Mar 2, 2021

@dtslvr Instagram added a CORS Policy to the free api last week that this widget uses. I currently don't have a quick fix to solve this problem.

@ptkdev ptkdev added this to the v2.9.0 milestone Mar 4, 2021
@ptkdev
Copy link
Member

ptkdev commented Mar 4, 2021

@dtslvr workaround available in v2.9.0.

@ptkdev ptkdev closed this as completed Mar 4, 2021
@dtslvr
Copy link
Author

dtslvr commented Mar 6, 2021

It is working with v2.9.0. See here: dotsilver.ch

Thank you very much @ptkdev!

@ptkdev
Copy link
Member

ptkdev commented Mar 6, 2021

Great!

@ToledoNicola
Copy link

ToledoNicola commented Apr 16, 2021

I had the same problem as the cors, I updated but it still gives me this
and I have seen that also a @dtslvr website
Schermata 2021-04-16 alle 11 28 57

@ptkdev
Copy link
Member

ptkdev commented Apr 16, 2021

@ToledoNicola thanks, CORS issue appear again,

Workaround: refresh 5-6 times and random the google proxy skip cors. My plugin cached latest correct response.

@ptkdev ptkdev reopened this Apr 16, 2021
@ptkdev ptkdev changed the title Demo: error while retrieving images... CORS: error while retrieving images... Apr 16, 2021
@ptkdev ptkdev changed the title CORS: error while retrieving images... [Bug] CORS: error while retrieving images... Apr 16, 2021
@sarsharma
Copy link

Facing the same issue :(
The images fail to load
image

Could there be a possibility of a future workaround since instagram is now blocking these requests? @ptkdev

@ptkdev
Copy link
Member

ptkdev commented Apr 27, 2021

@sarthaksharma2199 i need help. I tried all solutions in my mind but don't work.

@ptkdev
Copy link
Member

ptkdev commented Apr 29, 2021

Possibile workaround: Cloudflare worker to bypass Instagram new cross-origin policy on images (fixes net :: ERR_BLOCKED_BY_RESPONSE )

@jcyovera
Copy link

jcyovera commented Apr 30, 2021

I have the same CORS issue in my website, I tried to add CORS policy in my header on the server but it doesn't work. Is possible add a config property to set a proxy server and we can add the workaround for other servers not just cloudflare?

@jhvanderschee
Copy link

jhvanderschee commented Apr 30, 2021

I personally gave up trying to beat Instagram and ad blockers and created this service: https://profilepageimages.usecue.com. It is aimed at developers who want to integrate Instagram in a really simple way.

Simple: https://codepen.io/joosts/pen/NWbdMLW?editors=1100
Advanced: https://codepen.io/joosts/pen/bGBByOo

The service currently has 75 users and is used on 21 websites. It uses the Instagram Basic Display API. I hate that this is required, but it gets the job done (properly).

@edoardottt
Copy link

same here :/
a

@marizona
Copy link

hi, I guess it is not working.... anyone has found an alternative ? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed instagram-api
Projects
None yet
Development

No branches or pull requests

8 participants