Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Google embed asks for consent #336

Closed
hondem opened this issue Jul 20, 2021 · 2 comments
Closed

Google embed asks for consent #336

hondem opened this issue Jul 20, 2021 · 2 comments

Comments

@hondem
Copy link

hondem commented Jul 20, 2021

Hello guys. I have an issue with embeding Google Maps. The setup was done according to the tutorial. Without an API key, I was unable to embed YouTube and Google. After creating an API key with YouTube API enabled, YouTube embedding started working. Unfortunately cannot say the same for Google Maps. I've added Maps Embed API to this key but didn't help. I saw that there was exactly the same issue with YouTube in a different issue (#326) so I was wondering whether somebody already faced the same with maps?

Request

http://localhost:8061/iframely?url=https://www.google.com/maps/@49.194908,16.6078658,15.86z

Console output

-- [21-07-20 14:01:39]:48372 Whitelist activated. Domains, including blacklisted: 1706
-- [21-07-20 14:01:43]:48372 127.0.0.1 - Loading /iframely for https://www.google.com/maps/@49.194908,16.6078658,15.86z
-- [21-07-20 14:01:45]:48372    -- plugin redirect (by "htmlparser") https://consent.google.com/ml?continue=https://www.google.com/maps/@49.194908,16.6078658,15.86z&gl=CZ&m=0&pc=m&hl=cs&src=1

Response

{
   "meta":{
      "title":"Before you continue to Google Maps",
      "canonical":"https://consent.google.com/ml?continue=https://www.google.com/maps/@49.194908,16.6078658,15.86z&gl=CZ&m=0&pc=m&hl=cs&src=1"
   },
   "links":{
      "icon":[
         {
            "href":"https://www.google.com/favicon.ico",
            "rel":[
               "shortcut",
               "icon",
               "ssl"
            ],
            "type":"image/icon"
         }
      ]
   },
   "rel":[
      
   ]
}

Location

  • Europe
@iparamonau
Copy link
Member

You probably need EU server to reproduce this error.

The error is due to * mixin requires HTML parser:
https://github.com/itteco/iframely/blob/master/plugins/domains/google.com/google.maps.js#L48

Please try commenting out this line and see if the error is gone.

If it is gone, then the only way for you would be to keep this line commented. Unfortunately, you'll loose meta such as title and description. But the good news is that thumbnail should still be available if you have Static Maps API enabled on your key.

Alternatively, you may try and route Google Maps via non-EU server.

@hondem
Copy link
Author

hondem commented Jul 20, 2021

The fix worked! Thank you! :)

@hondem hondem closed this as completed Aug 5, 2021
ccpu pushed a commit to ccpu/iframely that referenced this issue Jun 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants