Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你好,我这儿报 Non-whitespace before first tag错误 #3

Open
wangzhongjie opened this issue Apr 23, 2021 · 3 comments
Open

你好,我这儿报 Non-whitespace before first tag错误 #3

wangzhongjie opened this issue Apr 23, 2021 · 3 comments

Comments

@wangzhongjie
Copy link

wangzhongjie commented Apr 23, 2021

Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: {
at error (/Users/xxxyyy/Documents/tiancai/node_modules/sax/lib/sax.js:651:10)
at strictFail (/Users/xxxyyy/Documents/tiancai/node_modules/sax/lib/sax.js:677:7)
at beginWhiteSpace (/Users/xxxyyy/Documents/tiancai/node_modules/sax/lib/sax.js:951:7)
at SAXParser.write (/Users/xxxyyy/Documents/tiancai/node_modules/sax/lib/sax.js:1006:11)
at Parser.exports.Parser.Parser.parseString (/Users/xxxyyy/Documents/tiancai/node_modules/xml2js/lib/parser.js:323:31)
at Parser.parseString (/Users/xxxyyy/Documents/tiancai/node_modules/xml2js/lib/parser.js:5:59)
at Parser.tryCatcher (/Users/xxxyyy/Documents/tiancai/node_modules/bluebird/js/release/util.js:16:23)
at Parser.ret [as parseStringAsync] (eval at makeNodePromisifiedEval (/Users/xxxyyy/Documents/tiancai/node_modules/bluebird/js/release/promisify.js:184:12), :14:23)
at AccountPay._request (/Users/xxxyyy/Documents/tiancai/node_modules/allinpay/libs/account_pay.js:132:38)
at process._tickCallback (internal/process/next_tick.js:68:7) cause: {}, isOperational: true }

会不会通联那边最近3年修改过加密方式呢?
PS,另外P12私钥文件导出pem文件你用的是什么方法?谢谢

@calvinxiao
Copy link
Owner

PS,另外P12私钥文件导出pem文件你用的是什么方法?谢谢

看看这个 https://stackoverflow.com/questions/15144046/converting-pkcs12-certificate-into-pem-using-openssl

@calvinxiao
Copy link
Owner

你看看和这个是不是相关的 https://github.com/isaacs/sax-js/issues/138,这个项目没有跟进 allinpay 的文档,而生产环境已经没有在用已经两年多了

@wangzhongjie
Copy link
Author

已解决,要解析钥匙, 然后 -----BEGIN PRIVATE KEY-----${key}-----END PRIVATE KEY----- 才行,你这个仓库对我帮助很大谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants