Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: v2 throws an exception if the Google Spreadsheet has a chart sheet #107

Open
viranch opened this issue Sep 24, 2020 · 4 comments
Open

Comments

@viranch
Copy link

viranch commented Sep 24, 2020

My Google Spreadsheet has a bunch of sheets (tabs at the bottom) that are just dedicated for charts (the ones you get after you insert a new chart in a new dedicated tab/sheet). It was working fine with mintable v1, but after migration to v2.0.1 (and updating the config), running mintable fetch throws this exception:

[...]
2020-09-24T06:41:46.558Z [INFO] Fetched 18 sheets.
2020-09-24T06:41:46.804Z [INFO] Cleared 1 range(s): 'Balances'!A1:F10.
2020-09-24T06:41:47.038Z [INFO] Updated 1 range(s): 'Balances'!A1:F10.
2020-09-24T06:41:47.279Z [INFO] Fetched 18 sheets.
2020-09-24T06:41:47.528Z [INFO] Updated indices for 18 sheets.
2020-09-24T06:41:47.774Z [INFO] Fetched 18 sheets.
(node:89857) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'columnCount' of undefined
    at /usr/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:268:95
    at Array.map (<anonymous>)
    at GoogleIntegration.<anonymous> (/usr/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:236:42)
    at step (/usr/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:33:23)
    at Object.next (/usr/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:14:53)
    at fulfilled (/usr/lib/node_modules/mintable/lib/integrations/google/googleIntegration.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:89857) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:89857) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Looking at /.../mintable/lib/integrations/google/googleIntegration.js:268, its trying to get sheet.properties.gridProperties.columnCount for a sheet that's not of the typical type GRID but of OBJECT due to it being just a "chart sheet", which doesn't contain the sheet.properties.gridProperties attribute.

This sounds like the google's npm package issue, but wondering if there's a way to handle this in mintable and avoid the buggy code path. Also, I'm marking this issue as a bug because this issue did not happen in v1, so from a user's POV, v2 introduced a regression.

@kevinschaich kevinschaich added the Won't Fix This will not be worked on label Sep 21, 2022
@viranch
Copy link
Author

viranch commented Feb 26, 2023

Any reason this is a won't-fix?

@kevinschaich
Copy link
Owner

@viranch PRs welcome

viranch added a commit to viranch/mintable that referenced this issue Mar 5, 2023
@viranch
Copy link
Author

viranch commented Mar 5, 2023

@kevinschaich #153

@viranch
Copy link
Author

viranch commented Mar 25, 2023

@kevinschaich do you think wont-fix can be dropped given the above PR?

@kevinschaich kevinschaich removed the Won't Fix This will not be worked on label Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants