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.
Copy link to clipboard
Copied
Is this online where I can take a look?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
As I asked the other person, is this online where I can see?
Copy link to clipboard
Copied
Ray,
This turned out to be an issue on our end related to a Chrome extension. Sorry about that.
Copy link to clipboard
Copied
No worries!
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.
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.
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.
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?
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.
Copy link to clipboard
Copied
Ah, I didn't even think of checking for that - so it sounds like you are good if you just use the new version.