Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do if you cannot update your customization settings #1606

Open
ghost opened this issue Jun 30, 2022 · 1 comment
Open

What to do if you cannot update your customization settings #1606

ghost opened this issue Jun 30, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 30, 2022

Package

  • @kintone/customize-uploader 6.0.5

Why

I created my own deployment tool in a project that is more general than Kintone CLI.
As a mechanism for deployment tools, you need to upload and update customized JS and CSS files.

The file upload itself works fine, but in rare cases it may not be possible to update the customization settings.
The cause is unknown, but when I look at the Kintone app settings in my browser, I keep getting the message "Preparing for processing". This is obviously not normal, but it will resolve in a few minutes.

Perhaps because of this effect, updateCustomizeSetting () does not return the resulting revision.

import KintoneApiClient from "@kintone/customize-uploader/dist/KintoneApiClient"

const param = {
  app: "1",
  scope:"ALL",
  desktop: {
    js: [],
    css: [],
  },
  mobile: {
    js: [],
    css: [],
  },
}
    
const result = await kintoneApiClient.updateCustomizeSetting(param)
console.log(result)    

スクリーンショット 2022-06-30 22 44 30

What

I noticed this and implemented error handling when nothing was returned, so it's okay right away.

I don't know how to reproduce the problem of not being able to update, so I'll leave it for a while, but I think it's hard to notice that it can't be updated with the current implementation.

At least I think it's better to raise an exception or return an error status than to return nothing, but what about?
I was thinking of creating a bug report, but I will post it here for the time being.
Also, since I am Japanese, I can respond even if I speak in Japanese.

@ueokande
Copy link
Member

ueokande commented Jul 1, 2022

Thank you for your reporting. The customize-uploader is designed for a CLI tool, so it does not officially provide internal packages as using import. You can use rest-api-client, and you can find an example from the following:

await this.client.app.updateAppCustomize({
app: APP_ID,
scope: "ALL",
desktop: resource,
mobile: resource,
})

The message "Preparing for processing" may occur when deploying an app is delayed in Kintone. We will reproduce your situation and improve an error or the use of the SDK if possible.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant