connection error (on live site)
# 🤝help
b
bot works perfect in production. but on the main site, https://contactlesspaymentprocessing.com/ it stopped working. anyone ever get this error when starting up the bot? Connection Error There was an error connecting to the server. Please check your internet connection and try again. https://cdn.discordapp.com/attachments/1248107099922366476/1248107100484145192/2024-06-05_19-51-38.png?ex=666275d1&is=66612451&hm=2f95b4526b43180f4c05cfdf4bb583d6ebe282d4357c212f0617dcde5a11c2ab&
b
Ugh. 12 more hours of banging my head against the wall in botpress today with nothing working, then this. FML
c
Ye, I gotta deliver the complete product by tomorrow morning.
b
Best to you @clever-whale-49921 I'm 4 or 5 or 6 weeks (I don't even remember anymore) into what I thought would be a 3 day build. Botpress is hard, lol
c
What are you trying to build? Maybe I can give you some support lol (not that experienced tho, but I can manage)
b
@clever-whale-49921, much appreciated. Botpress just quits working. Workflows that used to jump from one to the next (was intended) just quit working. I spend 12 hours deleting nodes, rebuilding nodes, reconnecting nodes, just to find they stop working again. If I knew why, I'd be done. I'm thinking of upgrading to team for $1,000 to get support, then downgrading after 😆
c
Did you try to export your bot, creating a new one, and importing your template?
b
I can't find the export
c
In studio upper-left, right in the Botpress logo.
a
Hey, is your bot working? Mine is completely stuck on WhatsApp
b
I'm scared to death I'll come back to botpress and my month long build will be gone. I'd love to find it.
c
I'm pretty sure it's just the maintenance. Maybe they're re-deploying.
b
Ugh, I'm done for the day/night. Hope you get your project completed
c
Thanks, same for you.
b
how long is downtime
b
i hope you hit your deadline. i've been in botprss for 10+ hours today. not made any progress. still trying to debug. it's gross. it's frustrating. i should have just bought a real bot, that was not in whatever testing bs this is in.
c
I have, thankfully. Got a really good result after a lot of hours. I had to delay the deadline until tomorrow morning, but for the sake of a better product lol. Could you maybe send some SS of the error you're getting? I'm sure this cannot be more terrible than working with the JavaScript Client.
b
lol. biggest problem right now is variables wipe out in the middle of a flow. they track from the first workflow to the second then to the third. in the thrid workflow, they just vanish in the middle. no code. no anything there that would cause it. so, i've rebuilt nodes - that doesn't work. i finally found the export (thank you for that). now, i'm just going to build a different workflow from scratch. i feel there is "ghost" code or something weird with that workflow.
c
In case you're curious about the current state of my product. It's just a demo tho, not the final version. I did it with TypeScript + Vue because the original web version works awfully. https://cdn.discordapp.com/attachments/1248107099922366476/1248478486960672839/image.png?ex=6663cfb2&is=66627e32&hm=d20facc73d3a2eb46c4ad82d8752b4707b302ff22fcb4dd2f6355a8057fc71af&
User, workflow or environment variables?
b
that's really cool.
well, it took a while to figure out how to get wf variables to transfer from wf to wf. i've got that. but, because of all the problems, i run java to copy all wf to user variables, before transferring out of a wf. this works, like i said for several of the wfs. but, right in the middle of the 3rd wf (or 4th, not sure now) most (not all ... that's another really confusing part) wf and nearly all user variables turn "empty".
c
Oh, you're the one that asked how to transfer variables to another Workflow the other day. I haven't used Workflow variables at all since I started working with Botpress. Do you really need to handle them like that? Since you need to transfer them eventually, isn't it better to just work around User variables?
b
yah, i've tried that too. just making them all user. I feel like i've gone back and forth recoding and redoing that, then back to workflow. maybe that's the solution. i think it's going to be someting dumb. like today, the bot worked fine in the emulator and in the playground, but on my live site, the bot kept freezing. there's ZERO support out there, so somehow I fixed it. only thing i could think of was one of my variables being collected in a single choice card was leading to a node with the same name as the variable. so, i changed the node name, and bam, it started working. there's just little weird shit like that that i'm fighting.
c
Have you tried to track variables step-to-step? I mean, there's gotta be a pattern to this issue. At some point your code/workflow must wipe variables. Or (if you're using code) your logic could be wrong and causing variables to get lost.
b
yes. utility cards with debug and info from step to step.
c
Try using 1000 logs until you find at what point you loose 'em.
b
yah. ok, i'll go back and try that. do you know how to get the exact values of the variables? i tried delivering in a payload, but my code is bad. i'd like to track step by step with 1,000 logs, like you suggest, but my code is bad. https://cdn.discordapp.com/attachments/1248107099922366476/1248482506768908349/message.txt?ex=6663d371&is=666281f1&hm=e652f9384110c1ce1ae615c61ecff42c13e2ca1bd95114f5dc76927ed3f64c14&
c
I don't really know how big or complex your project is, but experience taught me that in these cases the best solution is to just start all over again. At some point you must find something that's the trigger to get a solution.
b
it's huge!
lol
c
Sheesh. Those are a lot of variables, would hate to debug that.
b
starting over just isn't an option
yah, well, it's really about 5 of them that are used in the flows that are giving me fits. i could simplify that. but, you just triggered a light in my head. i'll try a few other workflows that do not touch the part that is giving me problems and make sure that's all working correct. if so, then my idea of just rebuilding the one workflow where the problem (seems) to be isolated. otherwise, yah, maybe it's a reboot with testing after every node :/
c
There's a programming paradigm called "Negative Programming" (or "Defensive Programming") where you just assume something (or everything) will fail at some point, so you just make the code crash on purpose by raising some error. You should try that approach by using [assert()](https://developer.mozilla.org/en-US/docs/Web/API/console/assert_static) within Execute Code cards.
b
yah, nearly all got lost again, right toward the end. it just doesn't work. maybe the solution is to change all to user.variableName
i just don't understand why about 5 of the variables (both user and workflow) maintaing their value to the end and get to Zapier and the rest get wiped out. i just don't see the rhyme or reason
wait, wait, wait. only two of teh variable values didn't make it to zapier. maybe i can figure that out, then apply what i learn to the other workflows
c
That's some progress. It seems you could be close to a solution.
b
ha, i've thought that for 2+ weeks. that's how long i've been testing AFTER I thought i was done and a badass lol
c
Well, at least 2 it's better than 5, right?
b
fargh, i hope it doesn't go that long. any suggestions on code to see the values of the variables in the testing logs?
c
Unless you figure out a way to use [Icecream](https://github.com/gruns/icecream) within Execute Code Cards, not really. I haven't found a way to install NPM packages yet.
b
interesting. i'll see if i can figure that out. thanks!
c
I'm sorry, the ones I sent you were made for Python only. [Here](https://hackernoon.com/the-10-best-nodejs-logging-libraries) you have some for JavaScript (in case you find out how to install them).
b
awesome. yah, i noticed the python. with IC, it looks like json stringify would be similar. i think i've tried that too. i'll read that next posting. i like the idea of just putting debugging cards at the entrance and exit of each node and just see what happens. if i can isolate the exact where/when, maybe i'll find the 'why', right?
c
Exactly, that's the right approach.
b
well, if i don't have this done by the end of the weekend, maybe, if you've got time, we'll work it together and i'll pay you for your time. not sure if you've got interest in that. it's a pretty cool project though
c
Of course, there's no problem. You've got me interested with the amount of variables lol.
Hopefully you'll get it fixed by then.
Dude! i had to troubleshoot the shit out of that with console logs beginning and ending of each node. FOUND IT. Thanks for the suggestion. i was using some script to copy all workflow vars to user vars and BP didn't like that one bit lol. i deleted every instance of that, then had to hard code some variables that thier raw input and single choice cards weren't picking up. long story, i finally got all of the info to pass to Zapier. I'm elated, tired and happy to put that behind me. now, i can start working on the whole reason i wanted a bot on this site in the first place. I think I saw some code in here somewhere that would allow a site visitor to upload documents (PDF). I need to figure that out, so I can get those docs to an openAI assistant to do some magic, then send the results back to the bot. wish me luck!
c
Amazing. I told you, you had it. You only had to find a way to fix it and spend a thousand hours logging lol.
8 Views