kintone/js-sdk

Error messages if failed to upload customize files

macrat opened this issue · 4 comments

Thank you for the useful tool!
I had a problem that was a bit confusing. So I want to share it.

Package

  • @kintone/customize-uploader 5.0.19

Why

Our environment have a proxy with authentication, but we don't have to use proxy when access to Kintone because it in the white list.
So, I had to remove HTTPS_PROXY environment variable before try kintone-custom-uploader out. And I forgot this.

I think this situation is exactly the same as when set wrong value to HTTPS_PROXY, or forget to set HTTPS_PROXY even if need it.

And then, I saw the below error message.

$ KINTONE_BASE_URL=https://xxxx.cybozu.com KINTONE_USERNAME=xxxx KINTONE_PASSWORD=xxxx ./node_modules/.bin/kintone-customize-uploader kintone-manifest.json --lang en
Start uploading customization files
Failed to upload JavaScript/CSS files
An error occured, retry
Start uploading customization files
Failed to upload JavaScript/CSS files
An error occured, retry
Start uploading customization files
Failed to upload JavaScript/CSS files
KintoneRestAPIError: [404] [GAIA_BL01] 指定したファイル(id: null)が見つかりません。 ([ID or something was here])
    at KintoneResponseHandler.handleErrorResponse (/path/to/project/node_modules/@kintone/rest-api-client/lib/KintoneResponseHandler.js:57:15)
    at /path/to/project/node_modules/@kintone/rest-api-client/lib/KintoneResponseHandler.js:35:123
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I was very confuse by this error message because it said "Not found the specified file".
And took long time to notice that it is my mistake about the proxy.

What

I'm guessing the error message that I saw was caused from /k/v1/preview/app/customize.json API.
But the main problem in this case was the response of /k/v1/file.json was wrong.

I hope the command to show more meaningful error message if it failed to communicate with the Kintone server like this case, for the users can understand easily what happen.

@macrat
Thank you for your feedback! & Sorry for the late reply.
We'll use your opinion as a reference for future developments.

Hello there i have tried to create kintone plugin but when it reaches to Succeeded: dist/plugin.zip it directly stopped to proceed how to fix it

@pizzou
Thank you for reporting an issue!
Please provide the following information because we have to reproduce your situation.

(If it is problem not about customize-uploader, please open another new issue)

## Target Package

<!-- Please fill the version of the package -->

- @kintone/customize-uploader 0.0.0

## Environment

<!-- What environment did you test? -->

- Operating System:
- Browser:
- Node.js version:

## Current Behavior

<!-- What is the current behavior you saw?  -->

## To Reproduce

<!-- How to reproduce the behavior -->

## Expected Behavior

<!-- What is the behavior you expected?  -->