Jerry
Jerry9mo ago

[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.
No description
40 Replies
Jerry
Jerry9mo ago
No description
Gaurav Chadha
Gaurav Chadha9mo ago
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?
Jerry
Jerry9mo ago
@Gaurav Chadha Thank you for your quick reply. the API in the URL requires NO query/body/authorization, just simple as following :
No description
Jerry
Jerry9mo ago
@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!
Gaurav Chadha
Gaurav Chadha9mo ago
Yes, some of the nodes are having issues, we are working on fixing nodes, it will be updated soon.
Jerry
Jerry9mo ago
@Gaurav Chadha Good to know. Thank you! Hi, Hi, Gaurav, when will the issues can be solved and updated? I'm waiting ... ... Thank you.
Gaurav Chadha
Gaurav Chadha9mo ago
It should be working fine now, if you try with any API in the API call node.
Jerry
Jerry9mo ago
I tried again. Still the same. Can you double check it ?
Gaurav Chadha
Gaurav Chadha9mo ago
Yes, working fine, seems an issue with the API you are creating?
No description
Jerry
Jerry9mo ago
This is mine. Can you find the issue?
No description
No description
Gaurav Chadha
Gaurav Chadha9mo ago
Can you test this in editor, or single test of the API call node?
Jerry
Jerry9mo ago
Yes, the same issue, You can try it very quickly on yourself. can you?
Gaurav Chadha
Gaurav Chadha9mo ago
Okay, seems only BuildShip APIs testing on BuildShip API call node throwing this error. We'll check for this case.
Jerry
Jerry9mo ago
I tried google.com, still the same.
No description
Jerry
Jerry9mo ago
Can you try this?
Gaurav Chadha
Gaurav Chadha9mo ago
google.com gives HMTL content. The API call is also working fine.
Gaurav Chadha
Gaurav Chadha9mo ago
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.
No description
No description
Jerry
Jerry9mo ago
BTW, should I delete and re-create ALL my API call nodes when you updated ?
Gaurav Chadha
Gaurav Chadha9mo ago
nope. All nodes were bulk fixed. If any still does not work, you can try re adding.
Jerry
Jerry9mo ago
I trie as you said, still the same. https://1op2ul.buildship.run/ah
No description
No description
Gaurav Chadha
Gaurav Chadha9mo ago
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.
No description
Jerry
Jerry9mo ago
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.
No description
Gaurav Chadha
Gaurav Chadha9mo ago
The support form is experiencing and issue currently, we'll fix it asap.
Jerry
Jerry9mo ago
Fine, I'll contact you tomorrow, Okey? Sorry to bother you for this strange issue.
Gaurav Chadha
Gaurav Chadha9mo ago
Sure, no sweat, the support is fixed now.
Jerry
Jerry9mo ago
Thanks. I've send the issue via support-form. Please find it.
Gaurav Chadha
Gaurav Chadha9mo ago
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.
Jerry
Jerry9mo ago
I've deleted the project and created a new one. Still the same error.
No description
Jerry
Jerry9mo ago
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.
Gaurav Chadha
Gaurav Chadha9mo ago
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.
Phokagesan🥷
Phokagesan🥷7mo ago
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!
No description
Gaurav Chadha
Gaurav Chadha7mo ago
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.
Phokagesan🥷
Phokagesan🥷7mo ago
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?
Gaurav Chadha
Gaurav Chadha7mo ago
can you try using one selector, in this case div.scroll-nojump ?
Phokagesan🥷
Phokagesan🥷7mo ago
Yeah no luck with just div.scroll-nojump. I've tried other websites and it works fine but for some reason flutterflow has issues\
Gaurav Chadha
Gaurav Chadha7mo ago
okay, looks like FlutterFlow has some different level selector system? cc @Stu?
Phokagesan🥷
Phokagesan🥷7mo ago
Any help would be appreciated @Stu
Stu
Stu7mo ago
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)
Phokagesan🥷
Phokagesan🥷7mo ago
understood thank you for your help