sheets-api-codelab icon indicating copy to clipboard operation
sheets-api-codelab copied to clipboard

Handlebars: Access has been denied to resolve the property "<id, customerName, productCode, unitsOrdered, status, name>" because it is not an "own property" of its parent.

Open justinTM opened this issue 6 years ago • 1 comments

It appears a new change to Handlebars starting from version 4.6.0 means the sheet and order data does not appear to render in index, because "Handlebars forbids accessing prototype properties and methods of the context object by default." (link from "Handlebars Runtime options")

Here is the server log:

Listening on port 3000
Executing (default): INSERT INTO `Spreadsheets` (`id`,`sheetId`,`name`,`createdAt`,`updatedAt`) VALUES ($1,$2,$3,$4,$5);
POST /spreadsheets 200 3223.663 ms - 103
Executing (default): SELECT `id`, `customerName`, `productCode`, `unitsOrdered`, `unitPrice`, `status`, `createdAt`, `updatedAt` FROM `Orders` AS `Order` ORDER BY `Order`.`createdAt` DESC;
Executing (default): SELECT `id`, `sheetId`, `name`, `createdAt`, `updatedAt` FROM `Spreadsheets` AS `Spreadsheet` ORDER BY `Spreadsheet`.`createdAt` DESC;
Handlebars: Access has been denied to resolve the property "id" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "customerName" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "productCode" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "unitsOrdered" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "unitPrice" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "status" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
Handlebars: Access has been denied to resolve the property "name" because it is not an "own property" of its parent.
You can add a runtime option to disable the check or this warning:
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details
GET / 200 57.565 ms - 13655

justinTM avatar Jan 23 '20 10:01 justinTM

By the way, this is from the codelabs Use Google Sheets as your application's reporting tool (step 7)

justinTM avatar Jan 23 '20 10:01 justinTM