[GH-ISSUE #109] Broken 2FA after somes days #35

Closed
opened 2026-02-26 05:32:32 +03:00 by kerem · 13 comments
Owner

Originally created by @binford6000 on GitHub (Sep 18, 2018).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/109

I installed nc 14 last friday and activated 2FA gateway with telegram. It worked out of the box
like a charm! Since sunday its broken. Message in the log when trying to send a verification code:

Error | PHP | Trying to get property of non-object at /var/www/cloud/apps/twofactor_gateway/lib/Service/Gateway/Telegram/Gateway.php#92 | 2018-09-18T08:28:24+0200

If you need further information please feel free to ask for!
Cheers, Sebastian

Originally created by @binford6000 on GitHub (Sep 18, 2018). Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/109 I installed nc 14 last friday and activated 2FA gateway with telegram. It worked out of the box like a charm! Since sunday its broken. Message in the log when trying to send a verification code: Error | PHP | Trying to get property of non-object at /var/www/cloud/apps/twofactor_gateway/lib/Service/Gateway/Telegram/Gateway.php#92 | 2018-09-18T08:28:24+0200 If you need further information please feel free to ask for! Cheers, Sebastian
kerem 2026-02-26 05:32:32 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ChristophWurst commented on GitHub (Sep 18, 2018):

Hi Sebastian,

thanks a lot for your valuable feedback, especially from a Telegram user!

This could be related to #86. There are some cases the code does not yet handle well. I'll look into this.

Btw, if you have any other feedback/suggestions, please open new tickets for them. I'm very thankful for feedback that helps me/us improving this app 😉

<!-- gh-comment-id:422297723 --> @ChristophWurst commented on GitHub (Sep 18, 2018): Hi Sebastian, thanks a lot for your valuable feedback, especially from a Telegram user! This could be related to #86. There are some cases the code does not yet handle well. I'll look into this. Btw, if you have any other feedback/suggestions, please open new tickets for them. I'm very thankful for feedback that helps me/us improving this app :wink:
Author
Owner

@binford6000 commented on GitHub (Sep 18, 2018):

No problem. This gateway - when it works as intended - is really great!
Before i used google authenticator and had tu pull out my iPhone. But now i can read the verficiation code directly on my Apple Watch :-)

<!-- gh-comment-id:422379064 --> @binford6000 commented on GitHub (Sep 18, 2018): No problem. This gateway - when it works as intended - is really great! Before i used google authenticator and had tu pull out my iPhone. But now i can read the verficiation code directly on my Apple Watch :-)
Author
Owner

@DotOnedotNL commented on GitHub (Sep 23, 2018):

I had the same issue, after a few days the gateway errors with an "Trying to get property of non-object" error.
after issueing a /start at my telegram bot the login process is working again.
Let's wait for a few days until the login process stops again and see if the /start at the bot will resolve it.

<!-- gh-comment-id:423834751 --> @DotOnedotNL commented on GitHub (Sep 23, 2018): I had the same issue, after a few days the gateway errors with an "Trying to get property of non-object" error. after issueing a /start at my telegram bot the login process is working again. Let's wait for a few days until the login process stops again and see if the /start at the bot will resolve it.
Author
Owner

@ChristophWurst commented on GitHub (Sep 24, 2018):

I think this could be related to the bot API not returning old updates at github.com/nextcloud/twofactor_gateway@fd4696db77/lib/Service/Gateway/Telegram/Gateway.php (L82), hence it breaks after a certain time.

<!-- gh-comment-id:423880511 --> @ChristophWurst commented on GitHub (Sep 24, 2018): I think this could be related to the bot API not returning old updates at https://github.com/nextcloud/twofactor_gateway/blob/fd4696db777867c9549269a30f7c68dc22ca7467/lib/Service/Gateway/Telegram/Gateway.php#L82, hence it breaks after a certain time.
Author
Owner

@ChristophWurst commented on GitHub (Sep 24, 2018):

Oh, there's a tiny but critical bug.

They keys at github.com/nextcloud/twofactor_gateway@fd4696db77/lib/Service/Gateway/Telegram/Gateway.php (L76) and github.com/nextcloud/twofactor_gateway@fd4696db77/lib/Service/Gateway/Telegram/Gateway.php (L93) don't match, hence the values isn't stored for later use.

<!-- gh-comment-id:423880605 --> @ChristophWurst commented on GitHub (Sep 24, 2018): Oh, there's a tiny but critical bug. They keys at https://github.com/nextcloud/twofactor_gateway/blob/fd4696db777867c9549269a30f7c68dc22ca7467/lib/Service/Gateway/Telegram/Gateway.php#L76 and https://github.com/nextcloud/twofactor_gateway/blob/fd4696db777867c9549269a30f7c68dc22ca7467/lib/Service/Gateway/Telegram/Gateway.php#L93 don't match, hence the values isn't stored for later use.
Author
Owner

@ChristophWurst commented on GitHub (Sep 25, 2018):

If anybody is up for a simple pull request, this is your chance 😉 All that is necessary to change is the settings key as described in https://github.com/nextcloud/twofactor_gateway/issues/109#issuecomment-423880605. It should be telegram_chat_id on bot linked lines.

<!-- gh-comment-id:424462746 --> @ChristophWurst commented on GitHub (Sep 25, 2018): If anybody is up for a simple pull request, this is your chance :wink: All that is necessary to change is the settings key as described in https://github.com/nextcloud/twofactor_gateway/issues/109#issuecomment-423880605. It should be `telegram_chat_id` on bot linked lines.
Author
Owner

@kangaroo72 commented on GitHub (Sep 25, 2018):

Sorry, I'm not a dev. Is it okay, to edit the lines?
And can someone paste the lines where the chat_id is 123456 e. g.?
Thanks

<!-- gh-comment-id:424486517 --> @kangaroo72 commented on GitHub (Sep 25, 2018): Sorry, I'm not a dev. Is it okay, to edit the lines? And can someone paste the lines where the chat_id is 123456 e. g.? Thanks
Author
Owner

@ChristophWurst commented on GitHub (Sep 26, 2018):

Please see https://github.com/nextcloud/twofactor_gateway/pull/121#issue-218202685. You'll have to setup the telegram gateway again (sorry for that). Please use the attached test build to test the patch on your system and report back if it fixes the issue or causes any others.

Thanks ✌️

<!-- gh-comment-id:424601315 --> @ChristophWurst commented on GitHub (Sep 26, 2018): Please see https://github.com/nextcloud/twofactor_gateway/pull/121#issue-218202685. You'll have to setup the telegram gateway again (sorry for that). Please use the attached test build to test the patch on your system and report back if it fixes the issue or causes any others. Thanks :v:
Author
Owner

@binford6000 commented on GitHub (Sep 26, 2018):

Hi Christoph,
i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-)
Of course i will post any changes.
Cheers, Sebastian

<!-- gh-comment-id:424631965 --> @binford6000 commented on GitHub (Sep 26, 2018): Hi Christoph, i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-) Of course i will post any changes. Cheers, Sebastian
Author
Owner

@ChristophWurst commented on GitHub (Sep 26, 2018):

i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-)
Of course i will post any changes.

Awesome, thank you Sebastian!

<!-- gh-comment-id:424643644 --> @ChristophWurst commented on GitHub (Sep 26, 2018): > i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-) > Of course i will post any changes. Awesome, thank you Sebastian!
Author
Owner

@DotOnedotNL commented on GitHub (Sep 26, 2018):

Same for me, patch is applied, let's see...

<!-- gh-comment-id:424667832 --> @DotOnedotNL commented on GitHub (Sep 26, 2018): Same for me, patch is applied, let's see...
Author
Owner

@binford6000 commented on GitHub (Sep 28, 2018):

Hi Christoph,
i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-)
Of course i will post any changes.
Cheers, Sebastian

After two days and many logons with 2FA: works like a charm again! :-)

<!-- gh-comment-id:425350453 --> @binford6000 commented on GitHub (Sep 28, 2018): > Hi Christoph, > i applied the patch and reactivated Telegram gateway. It works again. Lets see how long ;-) > Of course i will post any changes. > Cheers, Sebastian After two days and many logons with 2FA: works like a charm again! :-)
Author
Owner

@ChristophWurst commented on GitHub (Sep 28, 2018):

After two days and many logons with 2FA: works like a charm again! :-)

Thanks a lot. This is great to hear!

I will, however, wait with releasing a new version until Monday. Releasing by the end of the week is never a great again because nobody is around if quickfixes are required 😉

<!-- gh-comment-id:425351177 --> @ChristophWurst commented on GitHub (Sep 28, 2018): > After two days and many logons with 2FA: works like a charm again! :-) Thanks a lot. This is great to hear! I will, however, wait with releasing a new version until Monday. Releasing by the end of the week is never a great again because nobody is around if quickfixes are required :wink:
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/twofactor_gateway-nextcloud#35
No description provided.