-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
stop working for me (Solved) #135
Comments
i follow the instructions from other issue to get de develoepr console logs, after replaceing some confidential info, here is the log `console.ts:137 [Extension Host]% {} console.ts:137 [Extension Host] exited with code 0 mainThreadExtensionService.ts:78 [VignaeshRamA.sfdx-package-xml-generator]Unexpected token '�', "{�[39"... is not valid JSON |
after update: extension.js i set const envVars = Object.assign({}, process.env, { FORCE_COLOR: "0" }); at the beginning of the script, then in every child.exec i set ent env: envVars, there are 6 places where to add this line, and now the extension is working fine: here an example of the replacement:
|
Hi, are you using Mac?
Thanks,
Vignaesh Ram A
…On Tue, Jan 21, 2025, 20:09 ozkrgonzalez ***@***.***> wrote:
i follow the instructions from other issue to get de develoepr console
logs, after replaceing some confidential info, here is the log
console.ts:137 [Extension Host]% {}
console.ts:137 [Extension Host] getAPIVersion invoked
console.ts:137 [Extension Host] stdout: {
"status": 0,
"result": {
"id": "SOMEID",
"apiVersion": "63.0",
"accessToken": "SOME.Access.TOKEN",
"instanceUrl": "https://someORG.sandbox.my.salesforce.com",
"username": ***@***.***",
"clientId": "PlatformCLI",
"connectedStatus": "Connected",
"alias": "MySandBox"
},
"warnings": [
"This command will expose sensitive information that allows for subsequent
activity using your current authenticated session.\nSharing this
information is equivalent to logging someone in under the current
credential, resulting in unintended access and escalation of
privilege.\nFor additional information, please review the authorization
section of the
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm
."
]
}
console.ts:137 [Extension Host] exited with code 0
console.ts:137 [Extension Host] bufferOutData {
"status": 0,
"result": {
"id": "SOMEID",
"apiVersion": "63.0",
"accessToken": "SOME.Access.TOKEN",
"instanceUrl": "https://someORG.sandbox.my.salesforce.com",
"username": ***@***.***",
"clientId": "PlatformCLI",
"connectedStatus": "Connected",
"alias": "MySandBox"
},
"warnings": [
"This command will expose sensitive information that allows for subsequent
activity using your current authenticated session.\nSharing this
information is equivalent to logging someone in under the current
credential, resulting in unintended access and escalation of
privilege.\nFor additional information, please review the authorization
section of the
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm
."
]
}
mainThreadExtensionService.ts:78
[VignaeshRamA.sfdx-package-xml-generator]Unexpected token '�', "{�[39"...
is not valid JSON
$onExtensionRuntimeError @ mainThreadExtensionService.ts:78
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1243
fire @ event.ts:1274
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:378
mainThreadExtensionService.ts:79 SyntaxError: Unexpected token '�',
"{�[39"... is not valid JSON at JSON.parse () at ChildProcess.
(c:\Users\donka.vscode\extensions\vignaeshrama.sfdx-package-xml-generator-2.1.0\out\extension.js:82:29)
at ChildProcess.emit (node:events:518:28) at ChildProcess._handle.onexit
(node:internal/child_process:293:12)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:79
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
B @ event.ts:1243
fire @ event.ts:1274
fire @ ipc.net.ts:652
l.onmessage @ localProcessExtensionHost.ts:378
—
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDYPO63F4QOLFYLDRFFNDD2LZL3NAVCNFSM6AAAAABVST6RCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBUHEYTOMJQGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
no, windows 11 |
I'm still getting this error, nearly daily. Usually restarting VS Code resolves it but it's not consitent. |
i use this extension a lot, but i don't know when stop working, i tried go back to an older version but no luck, when i go to features, runtime status, i got this error:
Runtime Status
Activation
Activated by onCommand:sfdxPackageGen.chooseMetadata event: 0ms
Uncaught Errors (3)
Unexpected token '�', "�[97m{�[39"... is not valid JSON
Unexpected token '�', "�[97m{�[39"... is not valid JSON
Unexpected token '�', "�[97m{�[39"... is not valid JSON
i don't know if it's a file in my workspace or what is that json, is there any log to see?
EDIT: after see the logs, the problem is that at least y my enviroment, the command sf org display --json, returns the json with colors, so the unknow chars:
�[97m → bright white
�[94m → clear blue
�[92m → clear geen
�[32m → creen
�[39m → other color,
so the function getAPIVersion doesn't know what to do
The text was updated successfully, but these errors were encountered: