Google Authenticator Node - doesn't re-execute during batch mode

I have a workflow that runs correctly when I manually open and execute it in KNIME. However, it fails to execute properly when I run it as a scheduled task using a .bat file.

It connects successfully to the db, but it doesn’t execute the google auth node.

Why isn’t the Google Authentication node re-executing correctly in batch mode? Is there a workaround to fix this?

image

Hello @Nika_erek,

Welcome to the forum.

Could you confirm if the Google Authenticator node was reset before scheduling the workflow. If it wasn’t reset, that might explain why it’s not re-executing correctly.

Best,
Keerthan

2 Likes

Hi k10shetty,

Thank you for replaying.
I’ve tried every possible combination - save it executed, all node restarted…
I’ve also put the -reset command in the .bat file, to force reset before executing the workflow.
It executes the whole workflow without an error, but it doesn’t write the modified data back to the google sheet, since the google auth node (from some unknown reason) doesn’t reset when run in batch mode.

@Nika_erek you could give this a try

2 Likes

Hi @mlauber71

Unfortunately that doesn’t help either.
I don’t have the exclamation sign anymore on the google auth node but still it doesn’t write in the google sheet file when run from batch mode.

image

This is the whole workflow for context.

My workflow works as intended when I run it from KNIME, it doesn’t work when run as a scheduled task from batch mode.

Could you confirm where are you storing your credentials (.json file). Is it available for the node when executing?

Best,
Keerthan

1 Like

Yes, it is stored in a .json file in the workflow folder.

Hello @Nika_erek,

Just to confirm, can you share the screenshot of your google authenticator node configuration window (with sensitive information blured out)? I need to check if you are using the interactive authentication or service account authentication.

Best,
Keerthan

1 Like

Yes, I’m using a service account.

1 Like

@Nika_erek you should check where your credentials are being stored. Is the path a full path or a relative path? You could try and set the path via Workflow variables in the KNIME workflow.

Also you might want to take a look at a fresh Log file in debug mode (or even sure that)

2 Likes

@mlauber71 I have no problems executing the workflow in KNIME - it works!
It is not executing correctly ONLY WHEN RUN IN BATCH MODE!

  • the .json file is in the workflow folder on a local disk.
  • I don’t see how making a variable of the .json key would make a difference since the google auth node has an option to use a .json credential file just for this exact purpose?
    My question is why is not the google auth node working correctly in batch mode?
    I get no errors when I execute the .bat file.

It would be great if you could test it on your rig - connect a service acc and try to update a google sheet file on google disk running Knime from batch mode.

The Batch mode sometimes has problems with paths. Especially relative paths. So one try could be to give an explicit full path via flow variables.

Also a look at a log might give additional information.

Also you could check the wiring of the reset node.

1 Like

Understood. How to do that? When I use the String Configuration node and input the file path there, it doesn’t allow me to use it as a variable in the google auth node.


If i use the Json reader node, and make a variable there - still doesn’t work.
image

I would provide the path to the JSON as workflow variable (string) convert that to path and provide that to the authenticator. Also I would wire the reset node to the rest of the workflow.

No guarantee it will work though. I will see if I can set up a test workflow myself.

@mlauber71 tried it,but to no avail. I’ve also connected the reset node to all the nodes in the google chain, still nothing.
Let me know if you have more luck, but I think the devs should have a look at this.

@Nika_erek Can you please share a screenshot of the workflow, configuration of string to path node as well as how you are using the workflow variable in your batch file?

Best,
Keerthan

1 Like

Keerthan,
I’ve already shared everything you asked in the above posts.
I’ve tried using the string to path node and it didn’t work, next I used the json reader node and made the file path to a variable that is feed to the google auth node - again not working. (see below)
I’ve looked and googled every possible workaround and it just doesn’t work!
I feel like we are running in circles.

The node just isn’t working as intended in batch mode and should be fixed on KNIME end. Is there a way to report this to anyone on the dev team other than here?



Hi @Nika_erek -

I just wanted to chime in here and say that while we can (and will!) let the developers know about this one, batch mode is legacy functionality in KNIME AP and isn’t actively supported. It’s still included for backwards compatibility reasons, and because a certain segment of our users still make use of it.

Might I suggest that there is an easier way? With a Team Plan on the KNIME Hub, you can can schedule and execute workflows directly on the Hub. While not free, it might save some frustration.

3 Likes