Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

Cannot save/modify edited templates #123

Closed
sashaafm opened this issue Oct 1, 2020 · 14 comments
Closed

Cannot save/modify edited templates #123

sashaafm opened this issue Oct 1, 2020 · 14 comments

Comments

@sashaafm
Copy link

sashaafm commented Oct 1, 2020

Hello again @breuerfelix, I'm running into a problem regarding editing templates which seems to be somewhat similar as this old issue. When trying to edit certain templates they are not being saved.

Right now I've got a suspicion which is on a malformed payload or some "weird" character breaking the JSON parsing (on the server-side maybe?). Here are a couple of screenshots from the JS console:
WhatsApp Image 2020-09-30 at 23 09 54
WhatsApp Image 2020-09-30 at 18 17 18

I'm not sure what other information to give to help debug this. It's happening on Firefox (and I believe also on Chrome, but I'll try to doublecheck). I've gone through the actions and values in the template and I couldn't find any JSON breaking characters.

Any idea on how to solve this or how to debug the problem to work around it?

@breuerfelix
Copy link
Owner

Hey ! seems like this is always the same 'job' or actions that triggers this error. could you tell me which one this is ? I mean which InstaPy function this is in the frontend ? That would help me a lot identifying this problem :)

@ninthsense
Copy link

ninthsense commented Oct 2, 2020

it the

functionName | "set_user_interact"

image

@Rzbck
Copy link

Rzbck commented Oct 4, 2020

yep same here i can't modify my template ^^
after a certain amount of time
or maybe because of specific option i used .
I don't see for now what is going on !
Looks like a Json issue

image

@breuerfelix
Copy link
Owner

@Rzbck can you also tell me which specific job this is? which function name ?
i havent got the time to look into this issue yet, still some university stuff going on but i am gathering information so it will be a faster fix when i tackle this :) it will be during the next week i guess !

@Rzbck
Copy link

Rzbck commented Oct 4, 2020

i don't really know if its help ,
but i have this message for each job when i simply click on the icone save ,
i think something is wrong when the new json data append in the list (updateJob) maybe websocket too

i don't have for now the exact original issues
i see that now in main.js , don't kjnow if its the original issus

  • [1]
    image
    image

  • [2]
    image
    image

@sashaafm
Copy link
Author

@breuerfelix do you have any idea when you'll be able to tackle this issue?

I've investigated a bit further and this doesn't seem related to the JSON payloads being malformed. The error says it's a bad JSON payload but I've checked a few of them and they are valid JSON. Unless, this is the server-side not being able to parse the JSON for some reason.

I'm suspicious once the templates reach a certain size/number of actions/number of parameters in certain actions this error happens. For example, I got a large template with many actions and every single one of them gives this error. On the other hand, I've got a small template with one of the same actions as the large one, and this error doesn't happen.

If there's any other info you need to debug this please do tell!

Thank you for your efforts

@breuerfelix
Copy link
Owner

@sashaafm since i am currently moving i barely open my laptop at all. i finally got some free time in november again :)
also thanks for this info! this is gold and i guess i will fix the issue way quicker with this info :)

@sashaafm
Copy link
Author

sashaafm commented Dec 2, 2020

Hello again @breuerfelix, I realize this is an open-source project and we're not entitled to your efforts. I'd just like to ask if there's any chance of this issue being tackled in the near future? I know some people who are depending on this project and we'd like to continue using it.

Is maintenance and support for this project still expected?

Thank you for your time and efforts Felix!

Stay safe.

@breuerfelix
Copy link
Owner

hey @sashaafm thanks for getting back to me since i really can't find the time right now to tackle this even though you helped a lot with all this information! and i am sure i will tackle this 100% during the next weeks :)

well yeah this is open source and i made it open source in hope that when i have other stuff to do, some other people would go on with this project but sadly i am still the only programmer of this whole project... so chances that someone else is digging into this, fixing it, are pretty low right now. but even though i do not plan on adding new features, i still plan on fixing existing bugs and this IS a huge existing bug i really wanna fix!

also if people reading this who are depending on this project because they need it to make money / more money / more efficient money, let me know because finding time for a project like this is easier if you also get smth from the cake because then i can dump some time from other project where i earn some money.

@breuerfelix
Copy link
Owner

@sashaafm i just debugged a little bit but i am not able to recreate this issue ... do you still have a template that is not working ? if yes could you provide me with the template name ? and maybe your instapy.io username ? you can also send me these things private via email: [email protected]

that way i can copy that template to my dev environment to make some further investigations :)

@sashaafm
Copy link
Author

sashaafm commented Dec 6, 2020

@breuerfelix thank you so much for your attention to this matter! I've just sent you an email with the data you requested.

@breuerfelix
Copy link
Owner

it is a bug when copying a template... really damn stupid but that should be fixed now!
but all existing buggy templates are still buggy. after lunch i will write a script that fixes the current DB state so everything should work fine again :) just to let you know bug is found and fixed!

@breuerfelix
Copy link
Owner

also fixed all existing documents! everything should work as expected now :) thanks for the detailed information! without this, i wouldn't be able to fix it that fast :)

@sashaafm
Copy link
Author

sashaafm commented Dec 7, 2020

also fixed all existing documents! everything should work as expected now :) thanks for the detailed information! without this, i wouldn't be able to fix it that fast :)

Thank you so much for your effort. I'll post some feedback once I've confirmed everything's fine now :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants