kintone-uploader freezing on connecting to the site

Hey folks!

New to kintone plugin/app dev here, trying to use the npm create-kintone-plugin and kintone-plugin-uploader to smooth my workflow.

But when I try “npm start” or run the uploader directly, it has my input my username and password for the Kintone URL, then just hangs on “open SUBDOMAIN.kintone.com/login?saml=off”.

Without the uploader working, to see the effects of my builds in Kintone, I have to:

  1. Run “npm run build” in the terminal

  2. In the admin Plugins settings screen, import a plugin via file, and select the new plugin.zip created by the build packer

  3. Reload the plugin settings page itself, so the new build manifests on the site

I’ve checked that my login used on the terminal has administrator permissions, I’m following the API doc instructions, and there are no codes or thrown errors. I’ve triple checked I’m using the correct username and password (And it will throw an error if the login info is correct, just to confirm the failstate).

Is there anything I’m missing to make the uploader function on updated code saving, or at least upload when the command line is run, instead of the multi-step process I’m using now?

Alternatively, is there an alternate method of testing my plugin’s effects and code changes “live”, so I can better practice, experiment, and learn?

Thanks so much; I appreciate any help anyone can offer.

-Chris Foster

Hello @Christopher_Foster ,

Welcome to the Kintone Developer Forum & thank you for posting your question!

Sorry to hear that you are currently unable to take advantage of the kintone-plugin-uploader devtool.

Let’s get your problem fixed! :muscle:

:zap: Note: I have replaced your subdomain with SUBDOMAIN for privacy reasons

Verified that the kintone-plugin-uploader is working :white_check_mark:

I went through the Create Plug-in Templates using create-plugin tutorial and verified that the kintone-plugin-uploader is working for my demo environment

Questions

  1. Did you install @kintone/plugin-uploader as a bundle when you were installing @kintone/create-plugin? (Or did you install them independently?)
  2. Did you install both @kintone/plugin-uploader & @kintone/create-plugin globally?
  3. When promoted input your Kintone subdomain, did you include the https://?
? Input your kintone's base URL (https://example.cybozu.com): https://SUBDOMAIN.kintone.com

Common Mistake

I noticed that when I installed @kintone/plugin-uploader locally as a bundle with @kintone/create-plugin, I need to include the https:// when inputting my Kintone subdomain.

Otherwise, I get an error similar to what you describe.

Solution

A simple way to make your development flow simpler would be to pre-configure your Kintone login credentials in your environmental variable.

  1. Install plugin-uploader globally: npm install -g @kintone/plugin-uploader
  2. Set the environment variables for the subdomain and login information.

For Windows(PowerShell)

Set environment variables with Kintone information:

set-item "env:KINTONE_DOMAIN" <subdomain>.kintone.com
set-item "env:KINTONE_USERNAME" <user name>
set-item "env:KINTONE_PASSWORD" <user password>
set-item "env:HTTPS_PROXY or HTTP_PROXY" <proxy settings>

Command prompt execution:

kintone-plugin-uploader --domain $env:KINTONE_DOMAIN --username $env:KINTONE_USERNAME --password $env:KINTONE_PASSWORD plugin.zip

For Mac

Set environment variables with Kintone information:

export KINTONE_DOMAIN=<subdomain>.kintone.com
export KINTONE_USERNAME=<user name>
export KINTONE_PASSWORD=<user password>
export HTTPS_PROXY or HTTP_PROXY=<proxy settings>

Command prompt execution:

kintone-plugin-uploader --domain $KINTONE_DOMAIN --username $KINTONE_USERNAME --password $KINTONE_PASSWORD plugin.zip

For More Details

Refer to the Upload Plug-in Files using plugin-uploader tutorial > Inputting authentication information using environment variables section for more information.

Video Guide

Here is our playlist with videos related to Kintone Plug-in Development:

Kintone Plug-in Development Playlist - YouTube