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

node-red-contrib-viseo-google-spreadsheet : Problem installing #85

Open
Christian-Me opened this issue Apr 5, 2018 · 21 comments
Open

Comments

@Christian-Me
Copy link

Christian-Me commented Apr 5, 2018

Hello,

I installed google-spreadsheet together with node-red-contrib-viseo-google-authentication. I can drag the node into the flow and configure it. Bit when I try to deploy my flows I get this message:

The workspace contains some unknown node types:
google-spreadsheet
Are you sure you want to deploy?

or

Flows stopped due to missing node types.
google-spreadsheet

What am I doing wrong?

Using node-red V0.18.04 on a raspberry pi 3 with raspbian stretch with latest updates. Installed the node via UI: settings/palette/install

Thank you for your help.

Chris

@knolleary
Copy link

The current version of the google spreadsheet node is broken.

When trying to load it, you get:

SyntaxError: Unexpected token )

The Node-RED palette manager shouldn't have added it to the palette in this case (so we need to look at that part in Node-RED), but the fundamental issue is the node is broken and cannot load.

@Christian-Me
Copy link
Author

Thank you for your reply. Sad to hear this. This feature could be verry handy or even essential for my current project.
Can I expect a fix in the near future?
Christian

@sejbk
Copy link

sejbk commented Apr 14, 2018

Same problem, would be great with a fix for this.

@Klervix
Copy link
Contributor

Klervix commented Apr 16, 2018

Hi everyone,

I don't have this problem on my project. Are you working with the 0.2.9. version? I'll try to fix it today.

@mikehole
Copy link

Just to answer the question, Yes:

Welcome to Node-RED

13 Apr 12:21:27 - [info] Node-RED version: v0.18.4
13 Apr 12:21:27 - [info] Node.js version: v6.13.1
13 Apr 12:21:27 - [info] Linux 4.9.87-linuxkit-aufs x64 LE
13 Apr 12:21:27 - [info] Loading palette nodes
13 Apr 12:21:28 - [warn] ------------------------------------------------------
13 Apr 12:21:28 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
13 Apr 12:21:28 - [warn] ------------------------------------------------------
13 Apr 12:21:28 - [info] Settings file : /data/settings.js
13 Apr 12:21:28 - [info] User directory : /data
13 Apr 12:21:28 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
13 Apr 12:21:28 - [info] Flows file : /data/flows.json
13 Apr 12:21:28 - [info] Creating new flow file
13 Apr 12:21:28 - [info] Server now running at http://127.0.0.1:1880/
13 Apr 12:21:28 - [info] Starting flows
13 Apr 12:21:28 - [info] Started flows
13 Apr 12:22:30 - [info] Installing module: node-red-contrib-viseo-google-spreadsheet, version: 0.2.9
13 Apr 12:22:37 - [info] Installed module: node-red-contrib-viseo-google-spreadsheet
13 Apr 12:22:38 - [info] Added node types:
13 Apr 12:22:38 - [info] - node-red-contrib-viseo-google-spreadsheet:google-spreadsheet : SyntaxError: Unexpected token )
13 Apr 12:50:15 - [info] Stopping flows
13 Apr 12:50:15 - [info] Stopped flows
13 Apr 12:50:15 - [info] Waiting for missing types to be registered:
13 Apr 12:50:15 - [info] - google-spreadsheet

@Klervix
Copy link
Contributor

Klervix commented Apr 16, 2018

Thank you Mikehole! Could you tell me your version of ""node-red-contrib-viseo-google-authentication"?

@sejbk
Copy link

sejbk commented Apr 16, 2018 via email

@mikehole
Copy link

here is a log from a brand new nodered container:

Welcome to Node-RED

16 Apr 11:33:33 - [info] Node-RED version: v0.18.4
16 Apr 11:33:33 - [info] Node.js version: v6.13.1
16 Apr 11:33:33 - [info] Linux 4.9.87-linuxkit-aufs x64 LE
16 Apr 11:33:34 - [info] Loading palette nodes
16 Apr 11:33:34 - [warn] ------------------------------------------------------
16 Apr 11:33:34 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
16 Apr 11:33:34 - [warn] ------------------------------------------------------
16 Apr 11:33:34 - [info] Settings file : /data/settings.js
16 Apr 11:33:34 - [info] User directory : /data
16 Apr 11:33:34 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
16 Apr 11:33:34 - [info] Flows file : /data/flows.json
16 Apr 11:33:34 - [info] Creating new flow file
16 Apr 11:33:34 - [info] Server now running at http://127.0.0.1:1880/
16 Apr 11:33:34 - [info] Starting flows
16 Apr 11:33:34 - [info] Started flows
16 Apr 11:34:18 - [info] Installing module: node-red-contrib-viseo-google-authentication, version: 0.0.6
16 Apr 11:34:23 - [info] Installed module: node-red-contrib-viseo-google-authentication
16 Apr 11:34:24 - [info] Added node types:
16 Apr 11:34:24 - [info] - node-red-contrib-viseo-google-authentication:google-service-account
16 Apr 11:34:24 - [info] - node-red-contrib-viseo-google-authentication:google-api-key
16 Apr 11:34:44 - [info] Installing module: node-red-contrib-viseo-google-spreadsheet, version: 0.2.9
16 Apr 11:34:49 - [info] Installed module: node-red-contrib-viseo-google-spreadsheet
16 Apr 11:34:49 - [info] Added node types:
16 Apr 11:34:49 - [info] - node-red-contrib-viseo-google-spreadsheet:google-spreadsheet : SyntaxError: Unexpected token )

These nodes are being added via the pallet management UI. Hope this helps.

@Klervix
Copy link
Contributor

Klervix commented Apr 18, 2018

We will receive a Raspberry in a few days, and so be able to reproduce this bug (no problem with linux/windows)

@mikehole
Copy link

mikehole commented Apr 18, 2018

I have the issue on docker* by the way I am using the node red official container:

https://hub.docker.com/r/nodered/node-red-docker/

*Docker for windows.

@knolleary
Copy link

I've had a quick look at the error and identified the problem. This node requires node.js 8.x. It will not work with any earlier version of node.js.

@mikehole
Copy link

Ah that's a pain there was me thinking that the docker image would be up to date when it comes to node.

@sejbk
Copy link

sejbk commented Apr 18, 2018 via email

@knolleary
Copy link

We do publish node 8 images - https://github.com/node-red/node-red-docker#images - but the default images are still 6. We will be switching over at some point in the future, but can't just switch them as its a major version change.

@sejbk
Copy link

sejbk commented Apr 18, 2018

Yes, so after switching to Node 8 I do get the node to load on the Raspberry Pi.

First it then complained about not having a scope, so added https://www.googleapis.com/auth/cloud-platform to the security configuration. Then it tried to load data but gave another error, it seems that it's somehow builds the URL incorrectly.

Looks like it tries to build the URL by combining the parameter from the node with parts of the REST api version url.

(I've changed the id of the spreadsheet when posting here.)

sheet | "https://docs.google.com/spreadsheets/d/1234567890/edit#gid=0"

The error message from Google is :

404. That’s an error.

The requested URL /v4/spreadsheets/https://docs.google.com/spreadsheets/d/1234567890/edit was not found on this server. That’s all we know.

@Klervix
Copy link
Contributor

Klervix commented Apr 19, 2018

Hi @sejbk,
Please read our documentation in Node Red info tab. All the fields are described.

@Christian-Me
Copy link
Author

Christian-Me commented Apr 23, 2018

Hello,

after updating node.js and npn no errors on deployment. But I get the same error as @sejbk

23 Apr 12:24:00 - [warn] [google-spreadsheet:Test1] Error: <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/v4/spreadsheets/https://docs.google.com/spreadsheets/d/1T-TRHrbLECIrQNVrVxDQe49MSATSc2ysRT9H0adq7h8/edit</code> was not found on this server.  <ins>That’s all we know.</ins>

Copy paste https:// [....] /edit bings be to the desired spreadsheet.

I think i did all configurations right.

@Klervix
Copy link
Contributor

Klervix commented Apr 23, 2018

Hi there!
In the node's configuration, you should enter the spreadsheet's ID for the 'ID' field, which is only '1T-TRHrbLECIrQNVrVxDQe49MSATSc2ysRT9H0adq7h8' in your case. The 'range' field must be your tab's name.
You can find the concepts here: https://developers.google.com/sheets/api/guides/concepts

Please tell me if it works! :)

@Christian-Me
Copy link
Author

Thank you!

my fault. Now I ran into the next problem:

Error: Request had insufficient authentication scopes.

I fixed it with adding the scope "https://www.googleapis.com/auth/spreadsheets" (for other users who run into the same problem)

Thank you for your great work. Have a nice day!

@janvda
Copy link

janvda commented Apr 27, 2018

I am having the same issue regarding the "SyntaxError" on my raspberry PI when using Node.js version : v6.13.1:

Welcome to Node-RED
===================
27 Apr 19:25:46 - [info] Node-RED version: v0.18.4
27 Apr 19:25:46 - [info] Node.js  version: v6.13.1
27 Apr 19:25:46 - [info] Linux 4.9.35-v7+ arm LE
27 Apr 19:25:47 - [info] Loading palette nodes
27 Apr 19:25:52 - [info] Dashboard version 2.8.2 started at /ui
27 Apr 19:25:57 - [warn] ------------------------------------------------------
27 Apr 19:25:57 - [warn] [node-red-contrib-viseo-google-spreadsheet/google-spreadsheet] SyntaxError: Unexpected token )
27 Apr 19:25:57 - [warn] ------------------------------------------------------
27 Apr 19:25:57 - [info] Settings file  : /home/pi/.node-red/settings.js
27 Apr 19:25:57 - [info] User directory : /home/pi/.node-red

I am willingly to upgrade to version 8 if this won't break my flows or at least that it is not expected that this will break any flows. Can you confirm this ?
And if so are there any instructions how I can best upgrade to version 8 ?

kr
jan

@igisho
Copy link

igisho commented Dec 3, 2018

Same problem here with node red version 0.19.5 and node.js 9.10.1. Any sugestion?

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

7 participants