SalesforceCommerceCloud / sfcc-ci

Salesforce Commerce Cloud CLI

Home Page:https://npmjs.com/package/sfcc-ci

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERR_INVALID_CHAR]: Invalid character in header content ["authorization"]

sridharpannewave opened this issue · comments

sfcc-ci Version

2.10.0

NodeJS Version

v12.22.12

sfcc-ci Path

/Users//.volta/bin/sfcc-ci

Host OS Details

ProductName: macOS
ProductVersion: 13.1
BuildVersion: 22C65

What happened?

hi

I'm getting the below error while using this line of code

sfcc.instance.upload(creds.hostname, zipFileName, token, {}, (err) => {
 
   if (err) return logger.error(`Upload error: ${err}`);

   sfcc.instance.import(creds.hostname, zipFileName, token, (err, res) => {
     if (err) return logger.error(`Import error: ${err}`);

   });
 });

Error Upload error: Error: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["authorization"]

Relevant log output

**Error**  Upload error: Error: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["authorization"]

Hi @sridharpannewave, there is most likely an invalid character in the token you are passing. Can you please check this incl. any \n at the end?