[Unexpected token R in JSON at position 0] when access another workflow
I have 2 very simple workflows: Hello and Access Hello.
In Access Hello workflow I used a API call node to access Hello workflow with its Endpoint URL.
when I test Hello, it works very well. However, when I test Access Hello, it always prompt:
Unexpected token R in JSON at position 0.
Please find the attachment [image]
Why is that? What shoul I do now?
Thanks a lot.
40 Replies
Hi @Jerry It is because you are running a test without passing the required values in the fields.
It is a syntax error in JavaScript, it is not due to the code, or your created BuildShip workflow, it is due to the string or the value you are trying to parse the possible reason for this could be - an empty string, an empty array or an incomplete (a.k.a malformed) JSON data. Does your API which is in the URL requires any query/body/authorization?
@Gaurav Chadha Thank you for your quick reply. the API in the URL requires NO query/body/authorization, just simple as following :
@Gaurav Chadha Would you like to create two very simple workflows for test like I did? Is this a bug in Buildship for now? what can i do now? Thanks!
Yes, some of the nodes are having issues, we are working on fixing nodes, it will be updated soon.
@Gaurav Chadha Good to know. Thank you!
Hi, Hi, Gaurav, when will the issues can be solved and updated? I'm waiting ... ... Thank you.
It should be working fine now, if you try with any API in the API call node.
I tried again. Still the same. Can you double check it ?
Yes, working fine, seems an issue with the API you are creating?
This is mine. Can you find the issue?
Can you test this in editor, or single test of the API call node?
Yes, the same issue, You can try it very quickly on yourself. can you?
Okay, seems only BuildShip APIs testing on BuildShip API call node throwing this error. We'll check for this case.
I tried google.com, still the same.
Can you try this?
google.com gives HMTL content. The API call is also working fine.
Found the issue, it is with the type your first (deployed) API is returning, it is in string, and the API call return the output in JSON, you'll require to format your return value in the Hello world workflow and then test it, it will work fine.
BTW, should I delete and re-create ALL my API call nodes when you updated ?
nope. All nodes were bulk fixed. If any still does not work, you can try re adding.
I trie as you said, still the same. https://1op2ul.buildship.run/ah
It works for me with your API too, delete the workflow and create a new one and then test, if it still gives you error send it via support-form, I'll take a look and will fix on your project.
I delete the workflow and re-create it, still the same error. send it via support-form, got an error
What can I do now? Thanks.
The support form is experiencing and issue currently, we'll fix it asap.
Fine, I'll contact you tomorrow, Okey?
Sorry to bother you for this strange issue.
Sure, no sweat, the support is fixed now.
Thanks. I've send the issue via support-form. Please find it.
Hi @Jerry, It is a project specific issue, your api works on other projects well. I suggest to delete the project and create a new one as you are on free plan and only this workflow.
I've deleted the project and created a new one. Still the same error.
Hi, I've recoded my screen. Please find the jam.dev link and help me.
https://jam.dev/c/d0c30951-110d-4ade-805a-06a6ff4d6942
Thak you.
Jam
Jam | Console logs, network requests, and more
Click this link to see the video on buildship.app, with console logs, network tab and device information.
Thanks for sharing, I can now replicate this issue on a new project. Will share it with the team and let you know on fix. Also we have a new node
Execute Workflow
which you can use to execute a BuildShip workflow and return data.
@Jerry We have now updated the API call node, you can refersh your app and add it again from the explorer and try agian, it should work.Hi there I am getting a similar error "Unexpected token u in JSON at position 0" I am using the GPT Crawler template and all I've done was change the URL to https://docs.flutterflow.io/ in body instead of BuildShips docs site. I've tried deleting the entire project to no avail. pls halp
Introduction | FlutterFlow Docs
Welcome To FlutterFlow Docs!
You'll require to pass the other items in the body as well when making the request such as selector, id , request, concurrency as all of them are referenced form body as a part of object, as seen from the screenshot the body only has url but missing other fields.
Inspecting the flutteflow website I have copied the selector
body > div.scroll-nojump > div > div > div > main
the count is 0 have I chosen the wrong selector? Forgive me as I am low-code learning
I do not get the same error so i guess we're getting a step closer
Also I noticed that when inspecting Flutterflow's website it does not look like Buildships website. It's got a lot of flex boxes etc I tried to GPT this and it said this website might be dynamically loaded. How does this affect me in regards to identifying the selector for flutterflow?can you try using one selector, in this case div.scroll-nojump ?
Yeah no luck with just div.scroll-nojump. I've tried other websites and it works fine but for some reason flutterflow has issues\
okay, looks like FlutterFlow has some different level selector system? cc @Stu?
Any help would be appreciated @Stu
I'm wondering if you shouldn't use something like the Assistant AI template "Website Q&A" to return the information you want? It's a different approach and might not be as data safe as you want, but sometimes it can be impossible to scrape certain websites due to weird structure (and in Flutterflows case potentially even Flutter for Web compiling)
understood thank you for your help