Mail address to bad format error

SignInWithEmailAndPassword unable to handle error when the email address is badly formatted #3303 Comments Here is my email sign in method in my FirebaseAuthService class: And here is where the exception should be handled: And yet when I enter a badly formatted address the process is interrupted at message_codecs.dart file at the method dynamic […]

Содержание

  1. SignInWithEmailAndPassword unable to handle error when the email address is badly formatted #3303
  2. Comments
  3. This comment has been minimized.
  4. Footer
  5. Invalid Email Address Error Codes
  6. SMTP Error 501
  7. SMTP Error 510
  8. SMTP Error 513
  9. SMTP Error 515
  10. SMTP Error 530
  11. SMTP Error 553
  12. Why do your mailing lists contain invalid email addresses?
  13. How can spam traps occur in your mailing list?
  14. Recycled email addresses
  15. Pristine email addresses
  16. Old and inactive subscribers
  17. Misspelled email addresses
  18. How to avoid sending emails to spam traps?
  19. Contact inactive subscribers
  20. Make use of double opt-in
  21. Check new email addresses
  22. Never buy mailing lists
  23. Monitor Campaign Statistics

SignInWithEmailAndPassword unable to handle error when the email address is badly formatted #3303

Here is my email sign in method in my FirebaseAuthService class:

And here is where the exception should be handled:

And yet when I enter a badly formatted address the process is interrupted at message_codecs.dart file at the method dynamic decodeEnvelope(ByteData envelope) line 572 with error message See screenshot:

I couldn’t figure out how to handle this exception, knowing that it never happened to me before upgrading to firebase_auth: ^0.18.0+1 .

The text was updated successfully, but these errors were encountered:

You need to catch the FirebaseAuthException :

@Ehesp Didn’t work.
Apparently the exception is not rethrown, it is thrown inside the auth module that’s why I cannot handle it.
Here is the function that is throwing it:

Which, then, redirects here:

Can you create a reproduction repository please? I can’t replicate this.

Also, what platform is this?

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

@Ehesp probably referring to my post.
@mehdiRezzagHebla try this on your code:

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

@Ehesp probably referring to my post.
@mehdiRezzagHebla try this on your code:

@dhanniex82 Already been suggested by @Ehesp , doesn’t work.
Like I said, it is not a FirebaseAuthException it’s a normal PlatformException that is thrown from message_codecs.dart file in the path C:Program Files [flutter installation folder name] packagesflutterlibsrcservices

the suggested code from @Ehesp on other post got

I managed to get it to work on Web platform though.

Hi @mehdiRezzagHebla,
As requested here, please provide a minimal reproducible code sample that shows the issue.
Thanks.

Hi @mehdiRezzagHebla,
As requested here, please provide a minimal reproducible code sample that shows the issue.
Thanks.

Sorry for the delay, I built a reproducible code but strangely it worked normally, I still fail to identify the difference between the original codebase and copy.
Anyway, I apologize for wasting your time guys, should I delete this issue?

@mehdiRezzagHebla Could you paste your reproducible code? I was getting the same issue as you before, where the message_codecs.dart file was being called when catching exceptions thrown by FirebaseAuth. It’s probably something I’m doing wrong.

Thanks @mehdiRezzagHebla for confirming. Closing this as non-issue.

@dshundal94 I would love to check out your auth_service class maybe it’ll help up see what is wrong.

@mehdiRezzagHebla Here is the link to the test repository: https://github.com/dshundal94/testFlutterFireAuth
I get the unhandled exception when trying to login or even when the FirebaseAuthExceptions pop up.

I know I can probably not explicitly call setState() when trying to update the errorString probably with changeNotifier, but nonentheless, I get messages_codec.dart file getting accessed when trying to login. Most likely, I’m not handling the errors in the proper way.

@dshundal94 your code seems to be fine which makes me less comfortable since I don’t know why this is happening and it could happen any time for some reason I still cannot figure out, I mean imagine this happening in a production ready app.
Please keep me updated if you find anything, I will do the same from my end.

@mehdiRezzagHebla Yeah, I’ve been tackling it for the past few days. I’ve just been trying to write out everything explicitly and see where I went wrong. Just a little frustrating since there seems to be hardly anything documented on why this would happen. I will update here if I find anything related to this.

@mehdiRezzagHebla I updated my repository. Before I was getting some sort of [ERROR:flutter/lib/ui/ui_dart_state(166).cc] Unhandled Exception error in my debug console, now at least I’m not getting that. Although when I run the app in debug mode, it is still accessing message_codecs.dart and throwing a PlatformException.

I changed two things mainly:

  1. In my auth.dart file, I’m not error handling on my signIn function there.
  2. I changed my signIn function from Future(String) to Future(void) and doing the error handling here with try and catch method.

I don’t know if that helps, but I will continue to work at and update here if I find anything that will help.

@mehdiRezzagHebla I think it might be a problem with how I set up my IDE. After unchecking the BREAKPOINTS: Uncaught Exceptions box, the debugger does not break at the message_codecs.dart file. My suspicion is that the code executes before the catch clause can capture the FirebaseAuthException, but after stepping through the debugger, the catch clause will execute the code written in it without writing an error to the debug console. This seems to be a bug with dart debugging though, because we do catch the exception in our code, yet we still reach a breakpoint when debugging.

Would you know where to follow up on this?

I am using vscode and experiencing the same problem with @dshundal94. Similarly, I was able to solve it by unchecking the ‘Uncaught Exceptions’ checkbox. Afterwards, it runs fine and the FirebaseAuthException was caught. So not sure if the problem is coming from vscode debugger or the firebase auth plugin.

@dshundal94 sorry for the delayed response (timezone difference).
Thank you for spending the effort on tackling this, it seems intriguing, I think it is plausible that the IDE’s debugger config is what’s behind the problem, I am currently debugging an unrelated one in my project, and though I currently have no idea on how to follow up on this, I will get back to it in a few hours and keep you posted with my findings, cheers.

@dshundal94 just a side note on the latest dart v3.14.0 release does this have to anything to do with our issue?

#2699: When using “Debug my code” and an exception occurs with a call stack containing no user code, the top frame will now be selected to make it obvious that execution has paused.

@mehdiRezzagHebla Thanks for looking at this! I think it has to do when handling Futures. Looks like its native to how Dart looks at the debug stack trace as explained in this issue. I guess the current solution would either just step through the code when in debug mode, or uncheck the unhandled exception checkpoint (although this means that it won’t catch the actual unhandled exceptions).

I think you can vote on this open issue here. Again, thanks for looking into this, appreciate the assist!!

@dshundal94 I was lurking around and I fould this description of PlatformException :
Creates a PlatformException with the specified error code and optional message, and with the optional error details which must be a valid value for the MethodCodec involved in the interaction.
I am not sure but I think that it could have something to do with the formatting of PlatformException thrown by the Firebase_Firestore package, I mean a normal PlatformException would be like:

But when you look at the PlatformException not being handled, it does not respect this syntax, take a look at the screenshot you shared above.
@darshankawar @Ehesp any thoughts on this?

@mehdiRezzagHebla Yeah, I saw that too and in my updated repository I don’t get the [ERROR:flutter/lib/ui/ui_dart_state(166).cc] Unhandled Exception: Password associated with this password is wrong message in my debug console. I no longer throw PlatformExceptions when error handling.

I still however, do get the original PlatformException being thrown by the dart language:

In the flutterfire lib, a FirebaseAuthException is thrown anytime a error occurs when trying to sign in with email and password. Here is a link in the flutterfirelib that convert PlatformException to FirebaseAuthException.

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Invalid Email Address Error Codes

If you send bulk emails, you may face the problem of delivery errors. Knowing the reasons will help you cope with it and increase conversions. After registering with SendPulse, you’re welcome to monitor your campaign statistics, including the errors. Keep on reading this article to discover the causes and ways to avoid errors.

Contents

SMTP Error 501

501 Not Implemented

HTTP Error 501 Not implemented

The server either does not recognize the request method, or it cannot fulfill the request.

The command is correct and recognized, but the parameters were invalid. You may receive this error when sending an email to invalid email addresses or an invalid domain name. Also, it may be caused by drops in communication and problems with antivirus settings.

SMTP Error 510

Bad Email Address

Sender’s mail server generates this code. It means that email does not exist or was misspelled. Check your recipients’ emails and correct the typos.

SMTP Error 513

SMTP error 501 5.1.3 Invalid address

SMTP error 501 5.1.3 Bad recipient address syntax

The address type is incorrect, and there may be typos. You may have copied or pasted an address from a website incorrectly. If you have checked all the addresses, and still receive this error, the server needs authentication.

SMTP Error 515

Destination mailbox address invalid

The email address you want to send to may not exist, or there may be typos. Check all the emails for any misspellings.

SMTP Error 530

530 Authentication is required

SMTP Error 530: The message cannot be delivered due to a configuration error on the server. Please contact your Administrator.

You can receive this error due to several reasons:

  • You may have an invalid recipient’s address, misspelled the address, or it simply does not exist.
  • A recipient’s server could have blacklisted yours only.
  • Invalid authentication. Configure the settings.

SMTP Error 553

553 Your email address is denied.

553 sorry, this recipient doesn’t exist.

553 #5.1.8 Domain of a sender’s address does not exist

553 5.3.0 . address does not exist

553 message blocked, you are not authorized to send mail, authentication is required.

You can receive this error if the email address you send to does not exist, or there may be typos, so check. Or, you try to send email using an SMTP of an ISP with no authentication and no connection to the internet via this ISP’s service.

Why do your mailing lists contain invalid email addresses?

Invalid email addresses on your list may be spam traps.

Spam traps are the email addresses used to catch spam senders. They are usually created by inbox or blacklist providers to maintain the anti-spam policy and healthy mailing lists. If you send emails to spam traps, you risk being blacklisted, since it means that you aren’t practicing good mailing list hygiene. Thus, you can get a spam sender reputation.

How can spam traps occur in your mailing list?

Recycled email addresses

These are real but abandoned email addresses. Internet services deactivate addresses after some period of being inactive. Sometimes, they use them as spam traps to identify spammers.

Pristine email addresses

People never use these emails. They are placed on public websites but hidden in the code. They aim to reveal corrupt practices of email list growing, such as website scraping.

Old and inactive subscribers

Your mailing list may include the same email addresses that you’ve collected at the beginning of your business. That’s why some of them can be unengaged. Sending emails to inactive subscribers means that your emails will bounce.

Misspelled email addresses

People can give you an address with the typos deliberately or unintentionally. In the first case, they may have filled out a form that needed an email but didn’t want to share it. Thus they type anything that comes to their mind. Indeed, such an address will be fake. In the second case, it’s just a misprint. Still, you have to take steps to avoid spam traps.

How to avoid sending emails to spam traps?

Contact inactive subscribers

Send an email to subscribers who have not been active for one year, for example. Just ask if they are still interested in your emails. If not – give them a chance to unsubscribe.

Make use of double opt-in

Double-opt in is an excellent practice for building an email list of interested and engaged subscribers. Using this method, users can express their wish to subscribe via the confirmation email. Thus, you will have fewer subscribers, but the mailing list quality is more important.

Check new email addresses

Use a validation tool to find fake and misspelled email addresses.

Never buy mailing lists

The most obvious advice ever, but it works. A purchased email list is a collection of things that looks like a real email address. Surely, they will never bring you engagement.

Besides, when you add a mailing list to SendPulse, you’ll have to prove that you have permission to email the users. This is how an email service prevents sending spam.

Monitor Campaign Statistics

After sending an email campaign with SendPulse, go to «Reports» and check its performance.

In «Error statistics,» you’ll discover the number and type of email delivery errors. They’ll help to:

  • clean your mailing list
  • keep your sender reputation high
  • send campaigns to engaged subscribers only
  • pay an email service for active subscribers

If your mailing list has fewer than 500 active subscribers, enjoy the benefits of our free pricing plan!

Send 15,000 emails every month at no cost. Make use of personalization, segmentation, ready-made email templates, and subscription forms to make email marketing yield additional income.

Источник

Полезная информация

Пользователи не любят читать документацию. Станьте оригинальным, будьте не как все. Ознакомьтесь с нашей базой знаний.

Тема закрыта

Страницы: 1

  • Форумы
  •  » Thunderbird
  •  » Сообщение Bad Address Syntax при отправке писем

№121-09-2006 15:28:30

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Сообщение Bad Address Syntax при отправке писем

Поставил гром-птицу 1.5.0.7, и обнаружилась такая гадость. Thunderbird говорит, что сервер ругается на неверный синтаксис адреса (Bad Address Syntax). При этом адрес выглядит так:

Кретов Михаил Николаевич <m.kretov@rez.ru>

Если из адреса убрать ФИО, или заменить ФИО цифрами, или убрать только часть символов, то оправка проходит нормально. До этого сидел в версии 1.5.0.5, по этим же адресам письма отправлялись без вопросов.

Поиском по форуму ничего не нашёл, может, как-то не так искал?

Отсутствует

№221-09-2006 23:40:13

Unghost
Призрак-админ
 
Группа: Administrators
Откуда: Moscow, Russia
Зарегистрирован: 08-10-2004
Сообщений: 11771

Re: Сообщение Bad Address Syntax при отправке писем

Если Кретов Михаил Николаевич заключить в кавычки, ошибка остается?

Добавлено Чтв 21 Сен 2006 23:41:07 :
И лог общения Thunderbird с сервером было бы неплохо посмотреть.


Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Отсутствует

№322-09-2006 09:21:18

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Unghost пишет

Если Кретов Михаил Николаевич заключить в кавычки, ошибка остается?

Добавлено Чтв 21 Сен 2006 23:41:07 :
И лог общения Thunderbird с сервером было бы неплохо посмотреть.

Да, кавычки влияния не оказывают.
И, вероятно, глупый вопрос, но где взять лог общения с сервером?

Отсутствует

№422-09-2006 09:53:48

Merlyel
псЫх
 
Группа: Extensions
Откуда: Уфа
Зарегистрирован: 20-12-2005
Сообщений: 2415

Re: Сообщение Bad Address Syntax при отправке писем

paragon
Поиск рулит — Thunderbird logging.

:offtopic:
Unghost
Я вроде не заметил этого в Вики. Пропустил или действительно нету?


жЫзнь рандомна… и ничего с этим не поделаешь ;)

Отсутствует

№523-09-2006 00:39:02

Unghost
Призрак-админ
 
Группа: Administrators
Откуда: Moscow, Russia
Зарегистрирован: 08-10-2004
Сообщений: 11771

Re: Сообщение Bad Address Syntax при отправке писем

Merlyel

Я вроде не заметил этого в Вики. Пропустил или действительно нету?

Хочешь заняться добавлением?


Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Отсутствует

№625-09-2006 09:03:32

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Нарисовал слеующий батник:
set NSPR_LOG_MODULES=protocol:5
set NSPR_LOG_FILE=C:Templog.txt
start thunderbird.exe

Лог-файл создаётся, но ничего в него не пишется. Файл всё время нулевой длины.
Пока ковырялся с этим делом, несколько раз закрывал-открывал Thunderbird, и после очередного запуска описанная проблема исчезла. Сообщения по проблемным адресам стали уходить без вопросов. Закрыл Thunderbird, открыл снова — проблема вернулась. И пока больше не исчезала.

Отсутствует

№725-09-2006 10:38:07

Merlyel
псЫх
 
Группа: Extensions
Откуда: Уфа
Зарегистрирован: 20-12-2005
Сообщений: 2415

Re: Сообщение Bad Address Syntax при отправке писем

paragon
Хех… Точно нада перевести…. Вместо PROTOCOL нада написать POP3, IMAP и т.д. смотря что тебе надо :)


жЫзнь рандомна… и ничего с этим не поделаешь ;)

Отсутствует

№825-09-2006 11:48:09

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Merlyel пишет

paragon
Хех… Точно нада перевести…. Вместо PROTOCOL нада написать POP3, IMAP и т.д. смотря что тебе надо :)

Как-то не пришло в голову:)
Прописал SMTP, получилось вот что:

0[275160]: SMTP Connecting to: 192.168.0.195
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 220 post.rez.ru ESMTP Postfix
0[275160]: SMTP entering state: 15
0[275160]: SMTP Send: EHLO [192.168.0.15]

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-post.rez.ru
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-PIPELINING
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-SIZE 10240000
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-VRFY
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-ETRN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-AUTH LOGIN PLAIN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-AUTH=LOGIN PLAIN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250 8BITMIME
0[275160]: SMTP entering state: 4
0[275160]: SMTP entering state: 22
0[275160]: SMTP entering state: 3
0[275160]: SMTP Send: MAIL FROM:<paragon@rez.ru> SIZE=672

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250 Ok
0[275160]: SMTP entering state: 6
0[275160]: SMTP Send: RCPT TO:<«КеМлле<m.kretov»@rez.ru>»>

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 501 Bad address syntax
0[275160]: SMTP entering state: 7
0[275160]: SMTP entering state: 12
0[275160]: SMTP entering state: 13
0[275160]: SMTP Connecting to: 192.168.0.195
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 220 post.rez.ru ESMTP Postfix
0[275160]: SMTP entering state: 15
0[275160]: SMTP Send: EHLO [192.168.0.15]

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-post.rez.ru
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-PIPELINING
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-SIZE 10240000
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-VRFY
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-ETRN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-AUTH LOGIN PLAIN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250-AUTH=LOGIN PLAIN
0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250 8BITMIME
0[275160]: SMTP entering state: 4
0[275160]: SMTP entering state: 22
0[275160]: SMTP entering state: 3
0[275160]: SMTP Send: MAIL FROM:<paragon@rez.ru> SIZE=672

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 250 Ok
0[275160]: SMTP entering state: 6
0[275160]: SMTP Send: RCPT TO:<«КеМлле<m.kretov»@rez.ru>»>

0[275160]: SMTP entering state: 0
0[275160]: SMTP Response: 501 Bad address syntax
0[275160]: SMTP entering state: 7
0[275160]: SMTP entering state: 12
0[275160]: SMTP entering state: 13

Отсутствует

№926-09-2006 21:45:35

Unghost
Призрак-админ
 
Группа: Administrators
Откуда: Moscow, Russia
Зарегистрирован: 08-10-2004
Сообщений: 11771

Re: Сообщение Bad Address Syntax при отправке писем

paragon
С этим в багзиллу надо.


Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Отсутствует

№1026-09-2006 22:33:46

Merlyel
псЫх
 
Группа: Extensions
Откуда: Уфа
Зарегистрирован: 20-12-2005
Сообщений: 2415

Re: Сообщение Bad Address Syntax при отправке писем

Такое впечатление, что у тебя адрес в адресной книге забит как
Кретов Михаил Николаевич <m.kretov@rez.ru>, хотя должно быть всего лишь  m.kretov@rez.ru.

Попробуй в адр книге (ты ведь берешь адрес оттуда?) заново добавить этот контакт и попробовать с правильно введенным контактом отправку.

Добавлено Втр 26 Сен 2006 22:52:25 :
Кстати, некоторые сервера ненормально реагируют на адреса с точками (видел один такой давно), так что можно попробовать вместо m.kretov@rez.ru попробовать написать mkretov@rez.ru.

Отредактировано Merlyel (26-09-2006 22:34:13)


жЫзнь рандомна… и ничего с этим не поделаешь ;)

Отсутствует

№1127-09-2006 06:21:54

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Merlyel пишет

Такое впечатление, что у тебя адрес в адресной книге забит как
Кретов Михаил Николаевич <m.kretov@rez.ru>, хотя должно быть всего лишь  m.kretov@rez.ru.

Попробуй в адр книге (ты ведь берешь адрес оттуда?) заново добавить этот контакт и попробовать с правильно введенным контактом отправку.

Добавлено Втр 26 Сен 2006 22:52:25 :
Кстати, некоторые сервера ненормально реагируют на адреса с точками (видел один такой давно), так что можно попробовать вместо m.kretov@rez.ru попробовать написать mkretov@rez.ru.

Проверил в адресной книге, поля «Электронная почта» и «Отображать как» заполнены правильно. Причём если при отправке убрать из поля адреса ФИО (частично или полностью), то отправка проходит на ура. К тому же кроме указанного адреса, в аналогичном формате сделана адресная книга предприятия (несколько десятков адресов), и весь народ пользуется ею без вопросов. Клиенты у всех — либо Летучая Мышь!, либо аутглюк.

Такое ощущение, что при отправке письма из полей адресной книги вместо записанных там данных подставляется какая-то лажа. Самое забавное, что и Thunderbird долгое время работал с этой адресной книгой, и проблем с отправкой не возникало!

Отсутствует

№1227-09-2006 20:50:01

Unghost
Призрак-админ
 
Группа: Administrators
Откуда: Moscow, Russia
Зарегистрирован: 08-10-2004
Сообщений: 11771

Re: Сообщение Bad Address Syntax при отправке писем

paragon
На новом профиле пробовал? Или в безопасном режиме Thunderbird?


Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Отсутствует

№1328-09-2006 07:24:32

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Unghost пишет

paragon
На новом профиле пробовал? Или в безопасном режиме Thunderbird?

Цирк продолжается. Ввиду того, что сей глюк меня достал, пошёл на почти крайние меры — убил Thunderbird, удалил вручную его остатки, вычистил из реестра все упоминания о нём, прибил его профиль в «моих документах» (промежуточные меры не помогали). Установил Thunderbird заново. Глюк пропал.

Восстановил настройки Thunderbird’а, фильтры, плагины — глюк вернулся. Попробовал в безопасном режиме — глюк на месте.

Как-то меня притомил весь этот процесс:whiteflag:

Отсутствует

№1428-09-2006 08:29:14

Merlyel
псЫх
 
Группа: Extensions
Откуда: Уфа
Зарегистрирован: 20-12-2005
Сообщений: 2415

Re: Сообщение Bad Address Syntax при отправке писем

Через LDIF попробовал экспортнуть адр.книгу?


жЫзнь рандомна… и ничего с этим не поделаешь ;)

Отсутствует

№1528-09-2006 08:34:34

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Merlyel пишет

Через LDIF попробовал экспортнуть адр.книгу?

Не нашёл, как из аутглюка экспорт в LDIF сделать…

Так если в строке адреса написать ФИО и адрес ручками, ошибка выдаётся та же самая. То есть без разницы, из адресной книги беру этот адрес или ручками вбиваю.

Отсутствует

№1628-09-2006 21:28:30

Unghost
Призрак-админ
 
Группа: Administrators
Откуда: Moscow, Russia
Зарегистрирован: 08-10-2004
Сообщений: 11771

Re: Сообщение Bad Address Syntax при отправке писем

paragon
А если расширения по одному отключать? Пропадет баг?


Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Отсутствует

№1702-10-2006 13:39:01

paragon
Участник
 
Группа: Members
Зарегистрирован: 21-09-2006
Сообщений: 11

Re: Сообщение Bad Address Syntax при отправке писем

Расширений, собственно, было всего два. Оставил только базовый комплект (Talkback), остальное отключил. Глюк с отправкой остался.

Отсутствует

Тема закрыта

Страницы: 1

  • Форумы
  •  » Thunderbird
  •  » Сообщение Bad Address Syntax при отправке писем
  • Remove From My Forums
  • Question

  • Hello,

    I send a email with outlook 2003 and exchange 2003 to somebody and get this error.

    (servername and emailadres are changed)

    erxxx-vxx.@superxxxxxx.com op 1-9-2008 14:09

                The format of the e-mail address is incorrect.  Check the address, look up the recipient in the Address Book, or contact the recipient directly to find out the correct address.

                <xxxxxx.domain.local #5.1.3>

    Watch the dot after -vxx

    If i send the same email with outlook express without exchange it works!!!

    so the email address is good.

    What can i do?

    greetings,

    Paul

Answers

  • Hi Paul,

    Exchange is right, but the local part of a SMTP address is subject to various RFCs. It is commonly admitted that a SMTP address is defined like this:

    <mailbox> ::= <local-part> «@» <domain>

    <domain> ::=  <element> | <element> «.» <domain>
    <element> ::= <name> | «#» <number> | «[» <dotnum> «]»

    <local-part> ::= <dot-string> | <quoted-string> (we’ll forget the quoted-string here, not relevant)
    <dot-string> ::= <string> | <string> «.» <dot-string>

    <string> ::= <char> | <char> <string>
    <char> ::= <c> | «» <x>
    <c> ::= any one of the 128 ASCII characters, but not any <special> or <SP>

    <x> ::= any one of the 128 ASCII characters (no exceptions)

    As you can see the RFC appears to be «relaxed», format for SMTP address is somehow restrictive and not all implementations allow tailing dots.

    I suggest you fix the mailbox’s primary address and update your address book. The principle of being «the most compliant» should apply when dealing with messaging Stick out tongue

    Cheers,

    Benoit.

  • I am afraid you have no other choice.

    If you change the mailbox’s E-mail address, you can still support having the «wrong one» as a secondary SMTP address. For instance you could have user@domain.com as primary (reply) address == compliant and user.@domain.com (secondary) as failback address to support continuity.

    Cheers,

    Benoit.

Comments

@mehdiRezzagHebla

Here is my email sign in method in my FirebaseAuthService class:

  @override
  Future<UserCustom> signInWithEmail(
      String emailAddress, String password) async {
    try {
      UserCredential _signInWithEmailAndPasswordGoogle = await _auth
          .signInWithEmailAndPassword(email: emailAddress, password: password);
      if (_signInWithEmailAndPasswordGoogle.user != null) {
        return _userToUserModel(_signInWithEmailAndPasswordGoogle.user);
      } else {
        throw PlatformException(
            code: 'SIGN_IN_INTERRUPTED', message: 'Sin in interrupted');
      }
    } on PlatformException {
      print('Happened');
      rethrow;
    } catch(e){
      print(e.toString());
    }
  }

And here is where the exception should be handled:

  // creating the submit function
  Future<void> _submit(EmailSignInModelProviderPattern model) async {
    // if it is on sign in use sign in function ELSE use register function
    try {
      await model.submit();
      Navigator.pop(context);
    } on PlatformException catch (e) {
      CustomErrorPlatformException(
        title: 'Sign in failed',
        exception: e,
      ).show(context);
    } catch(e){
      print(e.toString());
    }
  }

And yet when I enter a badly formatted address the process is interrupted at message_codecs.dart file at the method dynamic decodeEnvelope(ByteData envelope) line 572 with error message See screenshot:

Exception has occurred.
PlatformException (PlatformException(firebase_auth, com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The email address is badly formatted., {code: invalid-email, additionalData: {}, message: The email address is badly formatted.}))

I couldn’t figure out how to handle this exception, knowing that it never happened to me before upgrading to firebase_auth: ^0.18.0+1.

@Ehesp

Hi @mehdiRezzagHebla Have you read: https://firebase.flutter.dev/docs/auth/error-handling

You need to catch the FirebaseAuthException:

try {
  await FirebaseAuth.instance.signInWithEmailAndPassword(
    email: "some invlaid emaill",
    password: "SuperSecretPassword!"
  );
} on FirebaseAuthException catch  (e) {
  if (e.code == 'invalid-email') {
    // Do something :D
  }
}

@mehdiRezzagHebla

@Ehesp Didn’t work.
Apparently the exception is not rethrown, it is thrown inside the auth module that’s why I cannot handle it.
Here is the function that is throwing it:

@override
  dynamic decodeEnvelope(ByteData envelope) {
    // First byte is zero in success case, and non-zero otherwise.
    if (envelope.lengthInBytes == 0)
      throw const FormatException('Expected envelope, got nothing');
    final ReadBuffer buffer = ReadBuffer(envelope);
    if (buffer.getUint8() == 0)
      return messageCodec.readValue(buffer);
    final dynamic errorCode = messageCodec.readValue(buffer);
    final dynamic errorMessage = messageCodec.readValue(buffer);
    final dynamic errorDetails = messageCodec.readValue(buffer);
    if (errorCode is String && (errorMessage == null || errorMessage is String) && !buffer.hasRemaining)
      throw PlatformException(code: errorCode, message: errorMessage as String, details: errorDetails);
    else
      throw const FormatException('Invalid envelope');
  }
}

Which, then, redirects here:

Future<Map<K, V>> invokeMapMethod<K, V>(String method, [ dynamic arguments ]) async {
    final Map<dynamic, dynamic> result = await invokeMethod<Map<dynamic, dynamic>>(method, arguments);
    return result?.cast<K, V>();
  }

@Ehesp

Can you create a reproduction repository please? I can’t replicate this.

@dhannie-k

This comment has been minimized.

@Ehesp

Also, what platform is this?

@mehdiRezzagHebla

Also, what platform is this?

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

@dhannie-k

Also, what platform is this?

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

@Ehesp probably referring to my post.
@mehdiRezzagHebla try this on your code:

try {
  await FirebaseAuth.instance.signInWithEmailAndPassword(
    email: "some invlaid emaill",
    password: "SuperSecretPassword!"
  ).then((UserCredential user) {
    if( user != null) {
    // do your thing here
}
});
} on FirebaseAuthException catch  (e) {
  print(e.code);
  print(e.message);
 // do some other thing
  }
}

@mehdiRezzagHebla

Also, what platform is this?

Do yo mean the CustomErrorPlatformException ?
It is just a custom AlertDialog widget.

@Ehesp probably referring to my post.
@mehdiRezzagHebla try this on your code:

try {
  await FirebaseAuth.instance.signInWithEmailAndPassword(
    email: "some invlaid emaill",
    password: "SuperSecretPassword!"
  ).then((UserCredential user) {
    if( user != null) {
    // do your thing here
}
});
} on FirebaseAuthException catch  (e) {
  print(e.code);
  print(e.message);
 // do some other thing
  }
}

@dhanniex82 Already been suggested by @Ehesp , doesn’t work.
Like I said, it is not a FirebaseAuthException it’s a normal PlatformException that is thrown from message_codecs.dart file in the path C:Program Files [flutter installation folder name] packagesflutterlibsrcservices

@dhannie-k

the suggested code from @Ehesp on other post got

.then method
and I need to add user null check after that.

I managed to get it to work on Web platform though.

@darshankawar

Hi @mehdiRezzagHebla,
As requested here, please provide a minimal reproducible code sample that shows the issue.
Thanks.

@mehdiRezzagHebla

Hi @mehdiRezzagHebla,
As requested here, please provide a minimal reproducible code sample that shows the issue.
Thanks.

Sorry for the delay, I built a reproducible code but strangely it worked normally, I still fail to identify the difference between the original codebase and copy.
Anyway, I apologize for wasting your time guys, should I delete this issue?

@dshundal94

@mehdiRezzagHebla Could you paste your reproducible code? I was getting the same issue as you before, where the message_codecs.dart file was being called when catching exceptions thrown by FirebaseAuth. It’s probably something I’m doing wrong.

@darshankawar

@mehdiRezzagHebla

@mehdiRezzagHebla

@dshundal94 I would love to check out your auth_service class maybe it’ll help up see what is wrong.

@dshundal94

@mehdiRezzagHebla Here is the link to the test repository: https://github.com/dshundal94/testFlutterFireAuth
I get the unhandled exception when trying to login or even when the FirebaseAuthExceptions pop up.
image
image

I know I can probably not explicitly call setState() when trying to update the errorString probably with changeNotifier, but nonentheless, I get messages_codec.dart file getting accessed when trying to login. Most likely, I’m not handling the errors in the proper way.

@mehdiRezzagHebla

@dshundal94 your code seems to be fine which makes me less comfortable since I don’t know why this is happening and it could happen any time for some reason I still cannot figure out, I mean imagine this happening in a production ready app.
Please keep me updated if you find anything, I will do the same from my end.

@dshundal94

@mehdiRezzagHebla Yeah, I’ve been tackling it for the past few days. I’ve just been trying to write out everything explicitly and see where I went wrong. Just a little frustrating since there seems to be hardly anything documented on why this would happen. I will update here if I find anything related to this.

@dshundal94

@mehdiRezzagHebla I updated my repository. Before I was getting some sort of [ERROR:flutter/lib/ui/ui_dart_state(166).cc] Unhandled Exception error in my debug console, now at least I’m not getting that. Although when I run the app in debug mode, it is still accessing message_codecs.dart and throwing a PlatformException.

I changed two things mainly:

  1. In my auth.dart file, I’m not error handling on my signIn function there.
  2. I changed my signIn function from Future(String) to Future(void) and doing the error handling here with try and catch method.

I don’t know if that helps, but I will continue to work at and update here if I find anything that will help.

@dshundal94

@mehdiRezzagHebla I think it might be a problem with how I set up my IDE. After unchecking the BREAKPOINTS: Uncaught Exceptions box, the debugger does not break at the message_codecs.dart file. My suspicion is that the code executes before the catch clause can capture the FirebaseAuthException, but after stepping through the debugger, the catch clause will execute the code written in it without writing an error to the debug console. This seems to be a bug with dart debugging though, because we do catch the exception in our code, yet we still reach a breakpoint when debugging.

Would you know where to follow up on this?

@zeshuaro

I am using vscode and experiencing the same problem with @dshundal94. Similarly, I was able to solve it by unchecking the ‘Uncaught Exceptions’ checkbox. Afterwards, it runs fine and the FirebaseAuthException was caught. So not sure if the problem is coming from vscode debugger or the firebase auth plugin.

@mehdiRezzagHebla

@dshundal94 sorry for the delayed response (timezone difference).
Thank you for spending the effort on tackling this, it seems intriguing, I think it is plausible that the IDE’s debugger config is what’s behind the problem, I am currently debugging an unrelated one in my project, and though I currently have no idea on how to follow up on this, I will get back to it in a few hours and keep you posted with my findings, cheers.

@mehdiRezzagHebla

@dshundal94 just a side note on the latest dart v3.14.0 release does this have to anything to do with our issue?

#2699: When using “Debug my code” and an exception occurs with a call stack containing no user code, the top frame will now be selected to make it obvious that execution has paused.

@dshundal94

@mehdiRezzagHebla Thanks for looking at this! I think it has to do when handling Futures. Looks like its native to how Dart looks at the debug stack trace as explained in this issue. I guess the current solution would either just step through the code when in debug mode, or uncheck the unhandled exception checkpoint (although this means that it won’t catch the actual unhandled exceptions).

I think you can vote on this open issue here. Again, thanks for looking into this, appreciate the assist!!

@mehdiRezzagHebla

@dshundal94 I was lurking around and I fould this description of PlatformException:
Creates a PlatformException with the specified error code and optional message, and with the optional error details which must be a valid value for the MethodCodec involved in the interaction.
I am not sure but I think that it could have something to do with the formatting of PlatformException thrown by the Firebase_Firestore package, I mean a normal PlatformException would be like:

PlatformException(
title: 'Some Title Here',
content: 'Description here',
message: 'Some message here')

But when you look at the PlatformException not being handled, it does not respect this syntax, take a look at the screenshot you shared above.
@darshankawar @Ehesp any thoughts on this?

@dshundal94

@mehdiRezzagHebla Yeah, I saw that too and in my updated repository I don’t get the [ERROR:flutter/lib/ui/ui_dart_state(166).cc] Unhandled Exception: Password associated with this password is wrong message in my debug console. I no longer throw PlatformExceptions when error handling.

I still however, do get the original PlatformException being thrown by the dart language:
image

In the flutterfire lib, a FirebaseAuthException is thrown anytime a error occurs when trying to sign in with email and password. Here is a link in the flutterfirelib that convert PlatformException to FirebaseAuthException.

@firebase
firebase

locked and limited conversation to collaborators

Oct 5, 2020

Понравилась статья? Поделить с друзьями:
  • Magner 75 ошибка cse1 как исправить
  • Magner 150 digital ошибки
  • Magner 150 digital self test error 34
  • Magner 15 ошибка ch2 fail
  • Magix music maker error code 57