Can't start process due to: "Expected BEGIN_OBJECT but was STRING"

My recording is working great in the studio but when exporting it to and trying to run it in control tower I get the exception below.

I don’t really understand the exception message. Is it a variable issue since it says “…but was STRING”?

Have any of you had this problem? Do you know anything I could try?

The exception message:

org.webharvest.exception.PluginException: [urn:uuid:3634589C257AA531AD157060283477439] robotics-flow executePlugin exception: [nodeId=null] java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:121)
at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125)
at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127)
at org.webharvest.runtime.Scraper.execute(Scraper.java:169)
at org.webharvest.runtime.Scraper.execute(Scraper.java:182)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173)
at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:116)
at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:171)
at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:142)
at com.workfusion.service.machine.BotRecordExecutionService.lambda$processSubmissionWithAllocationLogger$3(BotRecordExecutionService.java:112)
at com.workfusion.utils.thread.ThreadMonitoringUtils.executeWithAllocatedMemoryCallback(ThreadMonitoringUtils.java:17)
at com.workfusion.service.machine.BotRecordExecutionService.processSubmissionWithAllocationLogger(BotRecordExecutionService.java:112)
at com.workfusion.service.machine.BotRecordExecutionService.lambda$processRecord$0(BotRecordExecutionService.java:95)
at com.workfusion.utils.thread.NamedThreadTemplate.executeWithNamedThread(NamedThreadTemplate.java:10)
at com.workfusion.service.machine.BotRecordExecutionService.processRecord(BotRecordExecutionService.java:95)
at com.workfusion.service.machine.thread.RecordProcessThread.run(RecordProcessThread.java:28)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.Gson.fromJson(Gson.java:900)
at com.google.gson.Gson.fromJson(Gson.java:853)
at com.google.gson.Gson.fromJson(Gson.java:802)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotClient.findAndLockNode(RobotClient.java:105)
at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:107)
… 18 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
at com.google.gson.Gson.fromJson(Gson.java:888)
… 22 more

Do you just publish the recording to Control Tower without changing anything?
Can you share the recording here?

I’ve sent you the recording.

Such a weird issue! I’ve tried other parts of the whole automation and they work fine.

EDIT: Yes, I tried publishing without changing anything. To be sure I just published it again and tried but same exception.

1 Like

Thank you. We’ll have a look.

1 Like

What version of RPA Express are you using?

Thanks for your response, I’m running version 2.3.1.

Have you got anything that I could try?

@clanyb it is still unclear what could cause this issue. Try creating a very simple script (a couple of actions), publishing it to CT and running. Will it have the same issue?

Also, try exporting the recording you have an issue with as a bot task and share the resulting bot task file here.

Also, try switching off and on the server components. It looks like there might be some issue with finding the node.

Thank you.

1 Like

Hi again!

It’s a three part process. One part seems to be working but two of them don’t. So it shouldn’t be a node issue I guess.

I’ve restarted the server components but it didn’t help.

Thanks for trying to help me!

EDIT: I’ve sent you the bot task.

Ok, so I think I’m on to something…

I’ve honestly slaughtered the recording to one read file step, and it didn’t work… BUT when I then deleted all the variables it worked. So, it should be something with the variables. If you can see something with that info I would be very glad, otherwise I guess I will try to delete all the variables then readd them.

This is the most ridiculous bug ever…

I rebuilt the whole recording from scratch and trying it out in control tower several times and it worked. I used a temporary name while rebuilding, then when I was finished I uploaded as a new process with the “real” name. Same exception again. What can I do?

Did you just change the name of the process? Or did you use different names of variables?

1 Like

I think I only change the name of the process when publishing… Changed back to something like “test” and it works again. I don’t get this at all. Can’t I call the process by it’s real name? There must be some mix up with the name and unique ID somehow… Can I somehow reset control tower linkage and logs, without reinstalling?

Can you share the real name of the process with which it doesn’t work?

1 Like

Different versions of “Läs Rapporter från Excel”… Can it be the Swedish letters?

Yes, looks like it. I just tried it with special Swedish letters in the name and got the same error.

Thanks a lot for helping to get to the bottom of it.

2 Likes

Yes, thank you too!

Next time you might now what that exception is :slight_smile:

3 Likes