Trying to deploy to theme updates to a release pre...
# suitecommerce
m
Trying to deploy to theme updates to a release preview to test jSass to Dart conversion. Running into issues with authorization. When I try to create the token with
gulp theme:deploy --to --account 229676-sb3-rp
it correctly sends me to the browser to accept, but afterwards comes back with this error.
Copy code
[15:19:49] Continue the authentication process in the prompted browser.
(node:12734) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND 229676-sb3_rp.restlets.api.netsuite.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)
    at GetAddrInfoReqWrap.callbackTrampoline (internal/async_hooks.js:130:17)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:12734) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see <https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode>). (rejection id: 1)
(node:12734) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[15:20:00] The following tasks did not complete: theme:deploy, startDeploy
[15:20:00] Did you forget to signal async completion?
It seems to be improperly formatting the url to
<http://229676-sb3_rp.restlets.api.netsuite.com|229676-sb3_rp.restlets.api.netsuite.com>
which doesn't have proper DNS setup and instead based on my DNS test should be
<http://229676-sb3-rp.restlets.api.netsuite.com|229676-sb3-rp.restlets.api.netsuite.com>
notice the difference between the underscore and dash before
rp
. I tried to instead setup directly inside
.nstba
with:
Copy code
"SITE_NAME": {
    "token": "xxxx",
    "secret": "xxxx",
    "account": "229676-sb3-rp"
  }
But it now I get the error that I usually get when my
.env
file has the wrong credentials in it, but I have triple checked them at this point.
Copy code
[15:27:20] 'startDeploy' errored after 11 s
[15:27:20] Error in task gulp theme:deploy
Error Message
  Unexpected Error
[15:27:20] 'theme:deploy' errored after 25 s
Anybody have advice on how to resolve?
s
In my experience, I see the Unexpected Error error message when credentials that are stored in .nstba are incorrect. Normally, I would just recommend recreating the token in NetSuite and then repeat the process.
m
That's my experience as well. I have reset the Integration keys and created new access keys. Still the same error. My guess is it must be the account name being used. Does the format look correct?
229676-sb3-rp
s
I can’t say I’ve ever used the developer tools on a release preview account, so I don’t know
m
I was able to resolve with the following changes in
ns_npm_repository/oauth1/index.js
from
authToken.account = authToken.account.replace('-', '_');
to
authToken.account = authToken.account.replace(/-/g, '_');
from
sortedHeaders.push({ name: 'realm', value: account.replace('-', '_') });
to
sortedHeaders.push({ name: 'realm', value: account.replace(/-/g, '_') });
from
company.replace('_', '-'),
to
company.replace(/_/g, '-')
s
I see. Is this tracked in a case?
m
Yes, Case # 5627374