Copy link to clipboard
Copied
Hi hi have created my client credentials so I can embed pdfs in my angular application. but I can not get the viewer to display via localhost
Copy link to clipboard
Copied
Yes, the < and > were removed from the code for the clientId, url, and fileName.
Copy link to clipboard
Copied
Could you share the full code? You can email it to me at jedimaster@adobe.com.
Copy link to clipboard
Copied
It's part of a giant Angular application. I'll try to recreate the error with a smaller app.
Copy link to clipboard
Copied
That's always a good idea. Also, do you see anything in the console?
Copy link to clipboard
Copied
I'll have to re-add the code. When it stopped working yesterday, I removed everything and went another route.
Copy link to clipboard
Copied
The only error in the console has to do with Adobe logging services.
I tried in the minimal app and it seems to be OK there, so it must be something in our larger app that is breaking it.
I don't think I can use PDF embed anyway because we have multiple URLs for the same build bundle and from what I can see, the developer console only allows one URL per key (we need 1 key for multiple domains).
Thanks for the help you've provided.
Copy link to clipboard
Copied
Yeah, it's one domain per key. You can make multiple keys and use environment variables in your build process. 🙂
Copy link to clipboard
Copied
Ya, we use environment variables now, but they're shared across our various dev domains (that's the big issue). I'm investigating other alternatives for now.
Copy link to clipboard
Copied
I'm also getting this error. How long does it take to propogate the allowed domains?
Copy link to clipboard
Copied
It should be very fast. Are you sure you used http://localhost for the domain?
Copy link to clipboard
Copied
Yes
Copy link to clipboard
Copied
I should note when I go to add the credentials I get a message saying there was an error creating the credentials but they were created anyway. The adobe developer console needs work.
Copy link to clipboard
Copied
{
"errors": [
{
"message": "400: Bad Request",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"subscribeWorkspaceIntegrationToServices"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"response": {
"status": 400,
"statusText": "Bad Request",
"body": {
"id": "88d656d7-088a-4419-9365-0f60240c9258",
"messages": [
{
"template": "ERR_MSG_BAD_REQUEST",
"message": "400 BAD_REQUEST {\"reason\":\"bad_request_body:invalid_domain\",\"message\":\"Invalid domain provided\"}"
}
]
}
}
}
}
],
"data": {
"subscribeWorkspaceIntegrationToServices": null
}
}
Copy link to clipboard
Copied
I looked at the request from the console to your backend services and this is the response
{
"errors": [
{
"message": "400: Bad Request",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"subscribeWorkspaceIntegrationToServices"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"response": {
"status": 400,
"statusText": "Bad Request",
"body": {
"id": "88d656d7-088a-4419-9365-0f60240c9258",
"messages": [
{
"template": "ERR_MSG_BAD_REQUEST",
"message": "400 BAD_REQUEST {\"reason\":\"bad_request_body:invalid_domain\",\"message\":\"Invalid domain provided\"}"
}
]
}
}
}
}
],
"data": {
"subscribeWorkspaceIntegrationToServices": null
}
}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
This keeps happening over and over
Copy link to clipboard
Copied
Not sure what to tell you - I just went to a project, added the PDF Embed API, set localhost, and it worked. Can you try in a new project perhaps?
Copy link to clipboard
Copied
I don't understand how it gives me a 400 BAD_REQUEST. Your backend is not accepting localhost as a domain. It says so in the response above.
Copy link to clipboard
Copied
Ok so I figured out the issue. The console says you can add up to 5 domains comma separated but if you add more than one it throws an error and doesn't work.
Copy link to clipboard
Copied
Please pass this onto your developers to fix.
Copy link to clipboard
Copied
I can confirm and will report.
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
I'm also getting this error. At first I was adding 2 domains. I read the latest answer with the error on multiple domains. So I created a new project with only localhost in allowed domains. I'm getting the error in React app running on port 3005 (see attached screenshots).
Copy link to clipboard
Copied
I have never had an issue with nonstandard ports. Do you mind sharing the key you used?
Copy link to clipboard
Copied
Hi Raymond. I've messaged you the key.