question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Service "iframe" error: Cannot read property 'name' of undefined

See original GitHub issue

Installing the service “iframe”

  • <div class="tac_iframe" width="930" height="500" data-url="https://maps.google.ch/maps?f=[...]output=embed"> </div>
    var tarteaucitron_interval = setInterval(function() {
        if (typeof tarteaucitron.services.iframe.name == 'undefined') {
            return;
        }
        clearInterval(tarteaucitron_interval);
        
        tarteaucitron.services.iframe.name = 'Google Maps';
        tarteaucitron.services.iframe.uri = 'https://myuri.com/disclaimer';
        tarteaucitron.services.iframe.cookies = ['APISID','CONSENT','HSID','NID','SAPISID','SID','SIDCC','SSID'];
    }, 10);
    (tarteaucitron.job = tarteaucitron.job || []).push('iframe');

Gives me the error in the console: TypeError: Cannot read property 'name' of undefined

What am I missing?

BTW: nice script! Thanks for the work.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
achterbahncommented, May 16, 2018

😃 But even when we wait for it (setting the interval to 5000 in var tarteaucitron_interval), the same problem occurs. I’m over my limit with this… Thanks for your help, anyway.

But the principal question remains: Why is it necessary to define

tarteaucitron.services.iframe.name
tarteaucitron.services.iframe.uri
tarteaucitron.services.iframe.cookies

if they are not used in tarteaucitron.services? They are nevers passed into it.

0reactions
stale[bot]commented, Mar 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'name' of undefined
On this line: if(response.location !== 'undefined') ...you're checking if response.location is not the string "undefined" .
Read more >
Uncaught TypeError : Cannot read properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >
How to Fix TypeError: Cannot read Property 'push' of ...
You call the method on a variable previously set to undefined . · You call the method on a variable before it has...
Read more >
How To Fix Cannot Read Property 'style' of Null in JavaScript
This error boils down to one problem. The element you are trying to access does not exist in the DOM (document object model)...
Read more >
ERROR TypeError: Cannot read property title of undefined
HEY, SET YOUR LIKE THERE ! ... Your browser can't play this video. ... Solved: ERROR TypeError : Cannot read property title of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found