cancel
Showing results for 
Search instead for 
Did you mean: 

GmailのListMessageが不安定

kojikitaura
Level 4
ビジネスオブジェクト「Email - POP3/SMTP」のListMassageアクションについて教えて下さい。
弊社環境で初めて導入したのですが、成功率がまばらで原因が分かりません。
統計をとっていないので正確な成功率が分かりませんが、少なくとも5割程度だと思います。
最低でも8割くらいに持っていきたいです。
Gmailを使用中ですが同様の事象をご経験された方がいらっしゃればご教示いただきたいです。

[環境]
Gmail法人契約
安全性の低いアプリ:許可
二段階認証:有効
アプリパスワード発行済み

毎回エラーコメントは同様のものが出ます。
エラー:Internal : コードステージによって例外がスローされたため、コードステージを実行できませんでした。転送接続からデータを読み取れません: 既存の接続はリモート ホストに強制的に切断されました。。

受信メールをPOP3で取ってきたいのですが、上手くいきません。
送受信サーバーやポートは弊社環境はGmailでよく使われている汎用的なものでした。

開発時、もともとListMassegeは一度も成功しなかったのですが、安全性の低いアプリの許可と、
二段階認証の有効化、アプリパスワード発行をして設定したところ、成功するようになりました。
但し、成功率は冒頭に記載したとおりです。
またSMTPサーバーに接続して送信する分には成功率100%です。

またBluePrism社のサポートとやり取りをしたのですが明確な回答には至りませんでした。
サポートの作成した「コンシューマGmailのアカウントに接続してListMessageをするオブジェクト」を
頂戴して、インポートして弊社環境で実施したところ100%成功しました。
コンシューマGmailは問題なく、弊社の法人版Gmailに何かあるのでしょうか。

以上何卒宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------
26 REPLIES 26

@ewilson さん

連続で失礼します。
情報共有ですが、弊社環境で朝から時間を空けてListMessageを2回動かしてみましたが、いずれも1発目では成功しています。
​仮説が正しい可能性がでてきました。

少し話はそれますが、
メールの容量に依存するので一概には言えないかと思いますが、今後受信メールをチェックするプロセスを構築するにあたって、
どういった構成にするのが望ましいでしょうか。
今、ListMessageが失敗した際に、ブロックで復元→再開の設定をしているのですが、一度失敗したら、成功した試しがありません。
[再開の際の設定]
・待機:60sec
・リトライ数:5回

ポーリング間隔の話がありましたが、もう少し待機時間を長くとると成功するのでしょうか。

以上何卒宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

@kojikitaura,

Something I notice about the VBO is that we only perform a disconnect/close on the POP3 connection when performing a delete action on messages. I'm wondering if we were to expose a Close action if that would help in your situation. In other words, if you receive an error, perform the exception handling, try the action again, and still get an error maybe closing the connection and re-opening might help? Let me think about this a bit.

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@kojikitaura,

FYI - This page discusses the bandwidth limitations that Google imposes: https://support.google.com/a/answer/1071518?hl=en

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson

I think you got his messeges right but I share the summery of them for your reference. Hope this helps.

----

Regarding Gmail's bandwidth limit, it means that it will be restricted when the target account sends/receives a large number of emails in a short time, correct?

In this process, ListMessage is executed after authenticating with Configure by RPA, then the inbox is synchronized from the POP3 server, which means it is not receiving emails on the Gmail server. In this case, will there still be restrictions by Gmail?

FYI - In our environment, we took some time off from the morning and tried running ListMessage twice. In both tries, the first one was successful. So my hypothesis could be correct.

FYI-2, I don't think I can generalize it because it depends on the size of the email, but what kind of configuration would be suitable when building a process to check incoming emails?

My current set-up: when ListMessage fails --> Resume with a block, re-start.  But it never works once it fails.


[Set up for re-start]

Wait: 60 sec

Retry: 5 times

You mentioned the polling interval. Do you think it would be successful if the wait is a little longer?​​​​

------------------------------
-------------------------------
Nodoka Matsumoto
Customer Success Manager
Blue Prism
------------------------------
------------------------------- Nodoka Matsumoto Customer Success Manager Blue Prism

@kojikitaura,

The question of bandwidth here is between the Digital Worker and the GMail server. Whether you're retrieving a single email or listing all of the emails in the inbox you are using bandwidth between the client and Google.

What I think we'll do is add a Disconnect or Close action to the VBO. That way yu can essentially reset the VBO and underlying network connection. I think that may help in your situation. We'll get that added today and posted to the DX ASAP.

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Version 10.2 of the VBO has been posted to the DX. It now includes a public action titled Disconnect. I would recommend adding a call to this action in your exception handling logic. So when you get the error from GMail you will disconnect, wait a few seconds, and then try to list the messages again.

https://digitalexchange.blueprism.com/dx/entry/3439/solution/email---pop3smtp

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson さん
​ご回答ありがとうございます。
早速VBOをリリースしていただいたとのことで、非常に助かりました。

弊社環境で取り込みを行ってみたのですが、下記のようなエラーとなってしまい、取り込みが
できませんでした。
Maildata.dllとMimekit.dllが見つからないというエラーのようでした。

弊社のBluePrismのバージョンは7.0.1です。
以上何卒宜しくお願い致します。

------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

Hello @kojikitaura,

Those are additional DLL's that have been added as requirements of the newer versions of this VBO. They're needed to support OAuth authentication with POP3 in some cases.


If you check the asset card on the DX, you should see an additional download option for a zip file that contains those DLLs. Just drop them in the Blue Prism Automate folder​ and you should be good to go.

Cheers,



------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson さん

ありがとうございます。
アセットカードはどこから確認できるのでしょうか。

いただいたDXのリンク内にあるダウンロードボタンをクリックすると​「Email - POP3_SMTP v10.2.bprelease」だけが落ちてきます。
zipファイルのダウンロード場所が見当たりません。

以上何卒宜しくお願い致します。



------------------------------
koji kitaura
member
Alpen Co., Ltd.
------------------------------

@kojikitaura,

By "asset card" I mean the Digital Exchange page where the VBO resides. See the screenshot below. There's a link under the Additional Collateral​ heading that points to the zip file containing the DLLs.

1908.png

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------