Assigned
Status Update
Comments
jp...@google.com <jp...@google.com> #2
Generated Metadata
- Summary: Apps Script is probing for a property '__GS_INTERNAL_isProxy' on user-created objects, which is causing unexpected behavior with Proxy objects and requires developers to update their code to handle this new property.
- Tags:
,proxy-object ,property-access ,internal-property ,breaking-change custom-objects
bl...@google.com <bl...@google.com> #3
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for config assign for component 191640.
jp...@google.com <jp...@google.com> #4
I have reported this to the engineering team and future updates will be shared here. Thank you for your patience.
br...@mcpher.com <br...@mcpher.com> #5
Some additional info.
I'm using Drive advanced service, and have a custom class that takes the file metadata returned from Drive and does this
/**
* @constructor
* @param {object} p params
* @param {Drive.File} p.file the basic file
* @returns {instanceof <DriveFile>}
*/
constructor ({file}) {
this._file = {...file}
}
Both this._file = file and this._file = file ends up with the internal property being referenced. I'm not sure if this is the only place it happens, but I noticed this one. Proxying this class but ignoring the property probe attempt causes other side effects that are hard to figure out. Not proxying the class makes it all go away. Drive advanced service returns more than the file meta data of course (all the functions etc. are there).
I'm going to use the REST drive API instead of the Drive advacned service to make all this go away.
I'm using Drive advanced service, and have a custom class that takes the file metadata returned from Drive and does this
/**
* @constructor
* @param {object} p params
* @param {Drive.File} p.file the basic file
* @returns {instanceof <DriveFile>}
*/
constructor ({file}) {
this._file = {...file}
}
Both this._file = file and this._file = file ends up with the internal property being referenced. I'm not sure if this is the only place it happens, but I noticed this one. Proxying this class but ignoring the property probe attempt causes other side effects that are hard to figure out. Not proxying the class makes it all go away. Drive advanced service returns more than the file meta data of course (all the functions etc. are there).
I'm going to use the REST drive API instead of the Drive advacned service to make all this go away.
br...@mcpher.com <br...@mcpher.com> #6
Additional info - it's not related to object returned from Advanced Drive service - I moved to plain rest api, and still getting occassional probes on this property.
Description
Before opening a new issue, please search for other related issues , click the ★ to subscribe to updates, and click
+1
to vote.Description
I've recently noticed that App Script is sometimes probing for a property ' __GS_INTERNAL_isProxy' on user created objects/classes. I use a guard Proxy on many of my classes, including public libraries I've created.
I have to update my guard code to treat this as 'not an error' if the property accessed in the Proxy is __GS_INTERNAL_isProxy
This is a breaking change and this new probe will mean updating many scripts.
What are the circumstances under which this property is probed, and are there are any other new breaking changes like this?
Code
Output
Steps