Christopher Dembek
04/04/2024, 3:36 PMError in task gulp extension:fetch
Error Message
Unexpected Error
We have also been able to create a new TBA token using the "new" option, but we encountered the following error.
An unexpected error has occurred. Please go back and try again.
With the URL <https://system.netsuite.com/app/login/secure/authorizetoken.nl?oauth_token=undefined>
Any suggestions? Is it possible for the Sandbox account to have an issue?Steve Goldberg
04/04/2024, 3:38 PMChristopher Dembek
04/04/2024, 3:39 PMSteve Goldberg
04/04/2024, 3:41 PMChristopher Dembek
04/04/2024, 3:42 PMSteve Goldberg
04/04/2024, 3:42 PMChristopher Dembek
04/04/2024, 3:42 PMChristopher Dembek
04/04/2024, 3:43 PMSteve Goldberg
04/04/2024, 3:46 PMSteve Goldberg
04/04/2024, 3:46 PMSteve Goldberg
04/04/2024, 3:46 PMChristopher Dembek
04/04/2024, 3:48 PMChristopher Dembek
04/04/2024, 3:50 PMChristopher Dembek
04/04/2024, 3:59 PMeminero
04/04/2024, 4:00 PMconst hostnameStep1 = this.vm ? hostName : `rest${molecule}.<http://netsuite.com|netsuite.com>`;
and change it for:
const hostnameStep1 = this.vm ? hostName : `system${molecule}.<http://netsuite.com|netsuite.com>`;
In some old version you must look for:
var hostnameStep1 = this.vm ? hostName : "rest" + molecule + ".<http://netsuite.com|netsuite.com>";
and change it for:
var hostnameStep1 = this.vm ? hostName : "system" + molecule + ".<http://netsuite.com|netsuite.com>";
Steve Goldberg
04/04/2024, 4:19 PMChristopher Dembek
04/04/2024, 7:56 PMeminero
04/04/2024, 7:58 PMChristopher Dembek
04/04/2024, 8:02 PM_setUrls() {
const molecule = this.molecule ? `.${this.molecule}` : '';
const hostName = this.vm && this.vm.replace(/https?:\/\//, '');
let hostnameStep1;
if (this.vm) {
hostnameStep1 = hostName;
} else if (this.account) {
hostnameStep1 = `${this.account}.restlets.api${molecule}.<http://netsuite.com|netsuite.com>`;
} else {
hostnameStep1 = `system${molecule}.<http://netsuite.com|netsuite.com>`;
}
Christopher Dembek
04/05/2024, 2:34 AMlet hostnameStep1;
if (this.vm) {
hostnameStep1 = hostName;
} else if (account) {
hostnameStep1 = `${account}.restlets.api${molecule}.<http://netsuite.com|netsuite.com>`;
} else {
hostnameStep1 = `system${molecule}.<http://netsuite.com|netsuite.com>`;
}
Updated code
let hostnameStep1;
if (this.vm) {
hostnameStep1 = hostName;
} else if (this.account) {
hostnameStep1 = `${this.account}.restlets.api${molecule}.<http://netsuite.com|netsuite.com>`;
} else {
hostnameStep1 = `system${molecule}.<http://netsuite.com|netsuite.com>`;
}
eminero
04/05/2024, 1:28 PMBerenice Domínguez
04/05/2024, 2:05 PM