2

Google Apps Script is behaving really strangely for me and am wondering if anyone else has ever encountered the same issue and found a fix.

Instead of returning the objects / classes that the methods are supposed to return, they are instead returning "Proxy" objects, as you can see in the below screenshot which is from the debugger in the IDE:

Debugger image:

Here is the very simple code I used to generate the example of my issue, with 'my_url_here' obviously replaced with the real Google Sheets URL:

function test() {
  
  const ss = SpreadsheetApp.openByUrl('my_url_here');

  Logger.log(ss);
}

I tried converting the "Proxy" to a usable object with Object.values( ) but that did not produce anything useful:

Using Object.values( ):

Any assistance will be greatly appreciated!

Thanks

1 Answer 1

0

Attached proposal:

function test() {  
  const ss = SpreadsheetApp.openByUrl('my_url_here');
   console.log(Object.getOwnPropertyNames(ss).sort());
}

References:
Object.getOwnPropertyNames(object)
Class console

Result
enter image description here

1
  • The language of this site is English. Please translate your answer. Also please explain how this answer the question.
    – Wicket
    Commented Jul 3 at 17:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.