oracle / netsuite-suitecloud-sdk

SuiteCloud Software Development Kit (SuiteCloud SDK) are the set of tools that allow you to customize accounts and create SuiteApps through SuiteCloud Development Framework (SDF).
https://www.netsuite.com/
Universal Permissive License v1.0
201 stars 62 forks source link

Extension v1.5.1 corrupts credential file #767

Closed gabrielgortabns closed 9 months ago

gabrielgortabns commented 11 months ago

Select the SuiteCloud tool where you encountered the issue

SuiteCloud Extension for VSCode

Version of the SuiteCloud Tool

1.5.1

Operating system

Windows 11

Node Version / VSCode Version

Node: v18.15.0, VSCode: v1.83.1

JAVA Version

java 17.0.7+8-LTS-224 or newer

Bug description

./.suitecloud-sdk/credentials gets corrupted with newer extension version. Tested with 1.4.2 and Java 17.0.7, everything works fine, but if Java or Extension is newer version, it corrupts the credentials file.

Steps To Reproduce

  1. execute suitecloud account:setup -i
  2. errors shows that ./.suitecloud-sdk/credentials is corrupted

Actual Output

No response

Expected Output

No response

Anything else?

related: https://github.com/oracle/netsuite-suitecloud-sdk/issues/716

antoniofruci commented 11 months ago

Hello @GabrielGorta, latest published version version is 1.5.1 Can you please confirm what's the version you are facing the issue with?

gabrielgortabns commented 11 months ago

oh, sorry, right, it was version 1.5.1, I misstyped (I edited the ticket).

antoniofruci commented 11 months ago

Starting with version 1.5.0 we have improved the credentials security mechanism. This means that if you use your credentials with any version >1.5.x you won't be able to use them again with any older version. Could this be the case?

gabrielgortabns commented 11 months ago

Maybe, will test it. Due to other issues our team switch often between newest version and version 1.4.2, that is last that works with ESM + TS template (issue: https://github.com/oracle/netsuite-suitecloud-sdk/issues/765), so it may be the issue. Will try to test it more, what exactly are conditions when credentials file get corrupted.

E: by testing it seems to corrupt file both when you update or downgrade.

alisyed-19 commented 10 months ago

@gabrielgortabns The newer version is chnaging how the credentials file is accessed! so first time you upgrade, the tools try to update the saving mechanism of credentials -> This should be a transparent change if everything goes well. If you downgrade the tools, the credentials gets corrupted.