• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

adobe blocked by CORS policy but URL is in allowed domain for API settings?

New Here ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Im having some issues with the embed API. the PDF pops up and then instantly disappears when I check dev tools I see the below error.

 

Access to fetch at 'https://viewlicense.adobe.io/viewsdklicense/jwt' from origin 'https://download.militaryonesource.mil' has been blocked by CORS policy: No 'Access-Control-Allow-Origin'.

 

But I'm not sure why i am getting this error as the allowed domain is set to allow this URL  (download.militaryonesource.mil) in the API config.

 

 

<div id="adobe-dc-view" style="width: 800px;">
</div>
<script type="text/javascript">
const queryString = window.location.search;
const params = new URLSearchParams(document.location.search);
document.addEventListener("adobe_dc_view_sdk.ready", function() {
var adobeDCView = new AdobeDC.View({
clientId: "SOMECLIENTID",
divId: "adobe-dc-view"
});
adobeDCView.previewFile({
content: {
location: {
}
},
metaData: {
fileName: "SPA.pdf"
}
}, {
embedMode: "IN_LINE"
});
});
</script>

 

TOPICS
PDF Embed API

Views

2.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 27, 2022 Apr 27, 2022

Copy link to clipboard

Copied

Is this online where I can take a look?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

I am having this same issue, everything was working for a year+ and then stopped recently with this CORS error 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

As I asked the other person, is this online where I can see?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

Ray,

 

This turned out to be an issue on our end related to a Chrome extension. Sorry about that. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

No worries!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 13, 2023 Feb 13, 2023

Copy link to clipboard

Copied

It's likely the same issue here. I created a new project with the same domain settings as a working project, but we often encounter the error "domain is not authorized," and sometimes we see a CORS error.

https://sanofi-campaign.wenk-media.com/Medical-News/mCRPC-01.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

Testing your link, I get the error where the client id is not valid. So can you share a screenshot of your credentials from the dashboard, specifically the host name you specified? If you specified www.wenk-media.com, note that sanofi-campaign is a different subdomain and would not work. You would need to make a new client id and consider using just wenk-media.com.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 14, 2023 Feb 14, 2023

Copy link to clipboard

Copied

Please find attached a screenshot of the dashboard. The domain setting used is wenk-media.com. It seems that only the newly created project is not functioning properly, while the project created in July 2022 with the same domain setting is working fine.
截圖 2023-02-15 下午2.03.29.png

 

截圖 2023-02-15 上午11.08.08.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 15, 2023 Feb 15, 2023

Copy link to clipboard

Copied

Not quite sure what's happening here. It was a bit hard to get into your code as it's minified, but I see the right client id being used. If you were to make _another_ one and try again, do you get the same?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 16, 2023 Feb 16, 2023

Copy link to clipboard

Copied

Thanks for Ray's help.

I have identified the issue, the sdk script has been released with a new vesion.

previous script: https://documentcloud.adobe.com/view-sdk/main.js
lastest script: https://documentservices.adobe.com/view-sdk/viewer.js

 

The lastest sdk is compatible with older client id. However, if an older version of the sdk is used with a new client id, it will result in a domain setting error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 17, 2023 Feb 17, 2023

Copy link to clipboard

Copied

LATEST

Ah, I didn't even think of checking for that - so it sounds like you are good if you just use the new version.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources