jordenc / org.telegram.api.bot

Homey Telegram communication
5 stars 6 forks source link

Crash of the app #34

Closed aivus closed 5 years ago

aivus commented 5 years ago

Got 2 crashes today with an interval of few hours.

Logs that you should get on email: image

Seems related to #33

Please let me know if I can help you somehow

Tweaqer commented 5 years ago

20190901_080306 Yeah I had crashes as well. I created a flow to restart the app after the first two crashes. Notice how it crashes exactly every four hours? That's strange.

hvhol commented 5 years ago

Same here!

benny-ng commented 5 years ago

Telegram bot for homey is down since yesterday. Tried to re setup the whole process again but it does not work either.

Kindly check and let us know what we should do. Thanks.

rodroz commented 5 years ago

Same here, app crashes. Started a day ago.

fvhuizen commented 5 years ago

Here too problems, app seems to work every now and then but all flows gives a question mark with a warning. Please @jordenc give us an update what we can expect.

Entelien commented 5 years ago

Same problem here! App crashes every 4 hours.

satbopper commented 5 years ago

where is the developer for comments,is he alive

jordenc commented 5 years ago

Sorry guys, I've been really busy last few weeks and my vacation just ended.

Since @aivus has the same problem, it isn't "Telegram-specific" and seems to be a problem with the Athom Webhook. I will try to contact Athom when I have time today but my work has to be done first.

aivus commented 5 years ago

Hey @satbopper

Keep in mind that this is an open source project and developers are working on such plugins just on enthusiasm.

So, you can not expect any immediate support here. Only when developer will have some free time

Thanks for understanding

Entelien commented 5 years ago

Seems to be working again atm. Had no crashes since yesterday!

jordenc commented 5 years ago

@Entelien Good to hear! Guess a restart of the Telegram app on Homey will fix it now. And I might be able to publish a small update to prevent this in the future.

Tweaqer commented 5 years ago

Me neither, still working! This many comments just shows how good the app is he made; we're all depending on it :) (and it hurts if it doesnt work). A real compliment in my opinion. Thanks @jordenc great job as always

satbopper commented 5 years ago

still crashing here allthough not so often but same fault

Tweaqer commented 5 years ago

Sadly mine crashed again too earlier tonight (1 hr ago)

hvhol commented 5 years ago

Here also.... Verzonden vanaf mijn telefoon van Huawei Mobile-------- Oorspronkelijk bericht --------Onderwerp: Re: [jordenc/org.telegram.api.bot] Crash of the app (#34)Van: Tweaqer Aan: "jordenc/org.telegram.api.bot" Cc: hvhol ,Comment Sadly mine crashed again too earlier tonight

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.

sossienl commented 5 years ago

@aivus are you getting that error? this is quite bizar, as it's a webhook that I have defined for my setup and is running since a few days......

How the hell is it possible others receive this information +it crashes everyone's Telegram app.. This should be escalated to Homey team, as a potential privacy / data breach.

I disabled that specific flow for now.

EDIT: @jordenc any input to fix this leak, would be appreciated , I've contacted the Homey team just now

frdrkndrssn commented 5 years ago

My Telegram app has also been crashing the last few days. Has been restarting it and now it crashed again during the night.

aivus commented 5 years ago

Got crash around 10.5 hours ago.

@sossienl I installed version from store yesterday with original app webhook and it's crashed again like other guys above.

It crashes because the app uses one shared webhook for telegram for all users.

Still trying to reach Athom support

sossienl commented 5 years ago

But did it crash since then? I disabled my webhook 9h ago, since then no crashes on my side

It's ridiculous that this is even possible. I've also notified the team, but they are probably still waking up. I also filed a request at the Dutch APG. Depending on how this is solved by Athom, I'll turn that in to an official complaint.

My data is very sensitive and should have never ended up in someone’s logs.

aivus commented 5 years ago

But did it crash since then?

No new crashes since last one 10.5h ago. But this strange webhook calls are not permanent. So, it can crash tomorrow or today night. Who knows.

aivus commented 5 years ago

@jordenc could you please confirm that all crashes are caused by same webhook data from this message: https://github.com/jordenc/org.telegram.api.bot/issues/34#issuecomment-526913266 ?

Hope you can find all crash reports in your emails with all logs

jordenc commented 5 years ago

@aivus I cannot see that because I don't log that. But all crash reports contain the same error message as in the first post.

sossienl commented 5 years ago

I'll initiate the webhook once at 10:00 CET (13 minutes from this post), to validate if that triggers a crash for others.

fvhuizen commented 5 years ago

It’s up and running here since 2 AM

sossienl commented 5 years ago

For me Telegram Bot app crashed shortly after the webhook was triggered at 10:00 CET. This is my setup;

  1. Homey will trigger a HTTP GET request every hour (this is disabled for now)
  2. A PHP script will trigger one webhook call (as described per message #34)
  3. Homey receives the webhook call, and stores the 3 data variables in that same flow with better logic. (this flow does not include any Telegram actions).
  4. 3 separate flows will be triggered IF the variables have changed.
aivus commented 5 years ago

@sossienl it doesn't work like you've mentioned. Athom webhook system filters request by device_id and chat_ids to send requests to specific Homeys not all.

sossienl commented 5 years ago

@sossienl it doesn't work like you've mentioned. Athom webhook system filters request by device_id and chat_ids to send requests to specific Homeys not all.

I understand that, but how is it possible that @aivus has my (personal) data in his logs?

aivus commented 5 years ago

@sossienl wait. Could you please confirm that data from https://github.com/jordenc/org.telegram.api.bot/issues/34#issuecomment-526913266 (comission, data1, data2, data3) is yours?

sossienl commented 5 years ago

That is my data yes.....

You can imagine how I feel. This (and other) data is quite sensitive.

jordenc commented 5 years ago

How do you send that to the Telegram bot? Please let me know by mail (info@chamidmedia.nl)

MCFurry commented 5 years ago

I'll initiate the webhook once at 10:00 CET (13 minutes from this post), to validate if that triggers a crash for others.

I just started following this thread since the crashes seemed to stop, but indeed, at 10am this morning Homey reported my Telegram app crashed again.

Entelien commented 5 years ago

No crash here at 10.00 am!

sossienl commented 5 years ago

How do you send that to the Telegram bot? Please let me know by mail (info@chamidmedia.nl)

Done. I included screenshots of my flows. BTW. My flows do not include ANY telegram triggers. So it's even weirder.

Tweaqer commented 5 years ago

Did you create your private bot? Or the basic @athomhomey_bot?

sossienl commented 5 years ago

Private bot, but please be aware. My Flows (that cause this crash) are NOT using ANY telegram actions. So the actual problem on a different level

Tweaqer commented 5 years ago

20190903_114628 Hmm interesting. Telegram crashed again seconds ago btw

sossienl commented 5 years ago

Well that confirms that it's my webhook. I ran it again, to create some additional logs.....

Tweaqer commented 5 years ago

This is real concerning IMHO, Athom should look into this asap

aivus commented 5 years ago

Just got crash as well on my custom bot with my own webhooks :|

@sossienl could you please share how do you send webhook to https://webhooks.athom.com/webhook/xxxx ? What do you send in POST/GET parameters? Any specific headers?

Of course you can just replace on XXX any sensitive info.

sossienl commented 5 years ago

https://webhooks.athom.com/webhook/XXX/?token=XXX&event=commissies&data1=XXX&data2=XXX&data3=XXX

This is via Webhook Manager. No Body/POST data, just GET data.

aivus commented 5 years ago

A PHP script will trigger one webhook call (as described per message #34)

How do you call webhook here?

Just trying to investigate how this call distributes to all users.

sossienl commented 5 years ago

file_get_contents call. nothing fancy.

I just removed webhook manager, reinstalled a got a new token & id as comment #34 was showing my personal (?!) token

Tweaqer commented 5 years ago

crashed 2x: 4 minutes ago and 15 minutes ago

aivus commented 5 years ago

@Tweaqer thanks for the info.

@jordenc is that possible that you are using same webhook for telegram and https://github.com/jordenc/webhook.manager and it causes this?

sossienl commented 5 years ago

Yep. that's me (again). I'll stop all tests now, as I can't seem to figure out what is happening. My new token and ID still trigger crashes, with me and others. Even though the data I'm sending is just "test1" "test2" "test3".

The only thing I can think about is that this part "event=commissies" is creating issues? All other webhooks I receive - and believe me those are quite a lot 12K+ so far - are not creating this problem.

BTW: This is a huge concern, I cannot understand that Athom is not responding to my email / tweet.

jeroenvollenbrock commented 5 years ago

This issue consists of three sub-issues: 1. The Telegram webhook routing function is improperly configured by the Telegram app developer to forward incoming data to all telegram app installs if it does not recognize the incoming data format.

  1. The telegram app crashes if it gets a message with an invalid format. 3. @sossienl is using the webhook URL that is used for telegram in his script triggering the first two issues.

I suggest fixing 1. to resolve the entire chain of issues, and @sossienl should probably check the url that is invoked by the script.

Tweaqer commented 5 years ago

For the record; I dont have webhook installed

jordenc commented 5 years ago

@aivus No, it's two different webhooks. It seems there is a problem with the webhook routine, as the Telegram app should never receive the webhooks that are going to a different webhook URL.

I am going to update the Telegram app so it won't crash on invalid formatted data anymore, but I lack the time to do that today (and not even sure about this whole week).

sossienl commented 5 years ago

This issue consists of three sub-issues:

  1. The Telegram webhook routing function is improperly configured by the Telegram app developer to forward incoming data to all telegram app installs if it does not recognize the incoming data format.
  2. The telegram app crashes if it gets a message with an invalid format.
  3. @sossienl is using the webhook URL that is used for telegram in his script triggering the first two issues.

I suggest fixing 1. to resolve the entire chain of issues, and @sossienl should probably check the url that is invoked by the script.

I can't comment on the first two points, but regarding point 3 that doesn't seem the problem. I'm using the same webhook URL for the last few years with over 12k of triggers. But for the purpose of this problem, I did the following in the last hour or so:

aivus commented 5 years ago

I am going to update the Telegram app so it won't crash on invalid formatted data anymore, but I lack the time to do that today

@jordenc I'll prepare PR to skip such messages to prevent crashes.

But it's still not clear to me what's wrong with Homey webhook routine.