0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

kintone plugin-uploader でタイムアウトの暫定対策メモ

Last updated at Posted at 2021-05-19

kintone プラグイン開発環境を新しいPC に構築したところ、plugin-uploader でタイムアウトするエラーが発生。とりあえず、暫定対策したのでメモしておきます。
※ 2021/05/19 時点

PC 環境

新しく出た Surface Laptop 4 の出来がよさそうだったので購入。
US キーボードが日本版だと選べないので、Amazon US から購入したが、日本に送れる PC がi5の1台のみ。

  • Surface Laptop 4 13.5 Core i5-1135G7 8GB memory
    • $1,299.00 + $130.39 Shipping (Amazon 発注から約5日でUSから納品)
  • Windows 10 PRO
    • Microsoft Store で購入 ¥12,568

kintone プラグイン開発環境

create-pluginを使ってプラグインの雛形を作成しよう! からの一式を順番にインストール
※ 2021/05/18 時点の最新版

  • create-plugin 4.0.1
  • plugin-packer 5.0.1
  • plugin-uploader 5.0.1
    • puppeteer 9.1.1

plugin-uploader でタイムアウト

前のPCでも、plugin-uploader でタイムアウトすることがあったが、新環境ではほとんどタイムアウトする。
デバッグすると、プラグインファイルをアップロードするボタンをクリックする処理がうまく動いていないようだ。
plugin-uploader を調べると、これまで使っていたバージョンとかなり異なる。
puppeteer は、ブラウザーを制御するライブラリ。

※ これまで動作していたplugin-uploaderのバージョン

  • plugin-uploader 4.2.0
    • puppeteer 5.5.0

plugin-uploader でタイムアウトの暫定対策

どうもボタンをクリックするタイミングがうまくいっていないようなので、ボタンクリックを2重にしてみたところ、アップロードされるようになった。
本対策としては、yield file.uploadFile(pluginPath) の処理完了を待ってボタンクリックするといいかもしれないが、暫定対策なのでこれでOK。

plugin-uploader/dist/index.js
        yield file.uploadFile(pluginPath);
        yield page.click('button[name="ok"]');
        yield page.click('button[name="ok"]');

GitHub の Issue , pull request

後で気が付いたのだが、GitHub に、Issue と暫定対策の Pull request が上がっている。
こちらの暫定対策では、puppeteer を V8 に戻すと動作するようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?