Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Latest commit

 

History

History
89 lines (63 loc) · 4.05 KB

Debugging_Log.md

File metadata and controls

89 lines (63 loc) · 4.05 KB

Debugging - Let's Fix Those Problems 💪

Here is a rundown of common problems that may occur & its solutions!

Outline

npm install command is not working

  1. Verify the Node.js & npm versions inside the React_Workshop_by_Kintone folder
  2. Just installed Node.js? Verify you configured Node.js versions inside the React_Workshop_by_Kintone folder
  • Mac: nodenv local 14.5.0
  • Windows: nvm use 14.5.0

React not updating after updating server.js?

After making changes to server.js, be sure to restart the Express server On the Terminal 2 - backend!

  • Stop the server: ctrl + c
  • Start the server: npm start

Then reload the browser showing the React App: localhost:3000

Error from Terminal 2 - backend?

Do you see an error on .../React_Workshop_by_Kintone/backend/node_modules/node-fetch/lib/index.js:272 like the following?

return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
                           ^
FetchError: invalid json response body at https://r.kintone.com/notfound/subdomain.html reason: Unexpected token < in JSON at position 0
    at /Users/g001494/Downloads/React_Workshop_by_Kintone/backend/node_modules/node-fetch/lib/index.js:272:32
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/g001494/Downloads/React_Workshop_by_Kintone/backend/server.js:43:24 {
  type: 'invalid-json'
}

This error is related to your Kintone credentials.

  1. Verify that you have created a .env file with your Kintone credentials inside the backend folder
  2. Verify the Kintone credentials are correct: Subdomain, App ID, and API Token
  3. Verify that the Kintone App is configured as done in the Create a Kintone Web Database App section
  4. Verify that the Kintone Web Database App is updated after generating the Kintone API Token

No response when starting the Express server?

  1. Make sure you are inside the backend folder when starting the Express server.
    • cd ~/Downloads/React_Workshop_by_Kintone/backend
    • npm start
  2. Verify that you have renamed .env.example to .env
    • Be sure to enter your Subdomain, App ID, and API Token in the .env file

Got a UnhandledPromiseRejectionWarning error?

(node:5379) UnhandledPromiseRejectionWarning: FetchError: request to https://.kintone.com/k/v1/records.json?app= failed, reason: getaddrinfo ENOTFOUND .kintone.com

Got a GAIA_IA02 error?

  • Enter the App's API Token in .env file as APITOKEN = ""
  • Be sure to hit the save button & the Update App button to implement the API Token change.

Got a GAIA_IQ11 Specified field (Record_number) not found error?

If you got this error, then your Record Number field's field code is not set to Record_number.

Error Message:

{"code":"GAIA_IQ11","id":"vgK7CfZlVME2T65afg8g","message":"Specified field (Record_number) not found."}

Fix:

  1. Add the Record Number field to the App
  2. Set the field code to Record_number
  3. Save & Update the App