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

Testing view sdk pdf embed on localhost

Community Beginner ,
Mar 26, 2020 Mar 26, 2020

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

TOPICS
How to

Views

19.2K

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 ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

Yes, the < and > were removed from the code for the clientId, url, and fileName.

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 ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

Could you share the full code? You can email it to me at jedimaster@adobe.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 ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

It's part of a giant Angular application. I'll try to recreate the error with a smaller app.

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 ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

That's always a good idea. Also, do you see anything in the console?

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 ,
Sep 09, 2022 Sep 09, 2022

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.

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 ,
Sep 09, 2022 Sep 09, 2022

Copy link to clipboard

Copied

The only error in the console has to do with Adobe logging services. 

JustACodeMonkey_0-1662750850938.png

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.

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 ,
Sep 09, 2022 Sep 09, 2022

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. 🙂

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 ,
Sep 09, 2022 Sep 09, 2022

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.

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
Community Beginner ,
Jun 13, 2023 Jun 13, 2023

Copy link to clipboard

Copied

I'm also getting this error. How long does it take to propogate the allowed domains?

 

Screenshot 2023-06-13 at 5.12.23 PM.pngScreenshot 2023-06-13 at 5.12.48 PM.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 ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

It should be very fast. Are you sure you used http://localhost for the domain?

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

Yes

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

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.

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

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
    }
}

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

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
}
}

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

Screenshot 2023-06-14 at 8.40.47 AM.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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

This keeps happening over and over

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 ,
Jun 14, 2023 Jun 14, 2023

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?

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

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.

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

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.

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

Please pass this onto your developers to fix.

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 ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

I can confirm and will report.

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
Community Beginner ,
Jun 14, 2023 Jun 14, 2023

Copy link to clipboard

Copied

Thank you.

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
Community Beginner ,
Jun 15, 2023 Jun 15, 2023

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).

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 ,
Jun 15, 2023 Jun 15, 2023

Copy link to clipboard

Copied

I have never had an issue with nonstandard ports. Do you mind sharing the key you used?

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
Community Beginner ,
Jun 15, 2023 Jun 15, 2023

Copy link to clipboard

Copied

Hi Raymond. I've messaged you the key.

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