Getting console error 'Uncaught TypeError: Cannot read property 'run' of undefined' for this line:google.script.run

Viewed 294

This happens on Chrome but not on my Iphone 7 and not on Firefox. It fails in both V8 and Rhino

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>


 $(function(){  
      google.script.run//this is the line
      .withSuccessHandler(function(vA) {
        $('#sel1').css('background-color','#ffffff');
        updateSelect(vA);
      })
      .getSelectOptions();

      google.script.run
      .withSuccessHandler(function(hl) {
        document.getElementById('dt1').innerHTML=hl;
      })
      .getTimeStamp();  
    });

This is what I cleared:

enter image description here

Why does clearing my browser data solve this problem?

I noticed this warning in my console. I'm wondering if this might have something to do with it.

A cookie associated with a cross-site resource at http://google.com/ was set without the SameSite attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

0 Answers
Related