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

关于小程序 sdk.config.json 内不再自动填入腾讯云密钥的通知 #13

Closed
jas0ncn opened this Issue Oct 11, 2018 · 13 comments

Comments

Projects
None yet
@jas0ncn
Copy link
Member

jas0ncn commented Oct 11, 2018

出于安全考虑,即日起,我们不再帮助用户无感知的申请腾讯云云 API 密钥,受此影响,腾讯云微信小程序解决方案 Wafer2 提供的 sdk.config.json 中的 qcloudSecretIdqcloudSecretKey 字段将为空,这会导致登录失败,并返回错误提示:ERR_REQUEST_PARAM

你可以通过以下两种方式修复该问题:

1. 关闭腾讯云代理登录,使用微信小程序 AppID 和 AppSecret 登录:

修改 server/config.js 中的 useQcloudLoginfalse,并填写上 appIdappSecret 字段(分别为微信小程序的 AppID 和 AppSecret),重新部署代码即可。

2. 手动填写腾讯云云 API 密钥:

登录腾讯云云 API 密钥控制台申请云 API 密钥,并在 server/config.jsCONF 中添加如下三个字段:

    qcloudAppId: '你的腾讯云 AppID',
    qcloudSecretId: '你的腾讯云 SecretId',
    qcloudSecretKey: '你的腾讯云 SecretKey',

重新部署代码即可生效。

由于上传接口也会使用到腾讯云云 API 密钥,如遇到上传接口报错,也请参考如上 2 的方法排查。

对您使用带来的不便,敬请谅解。

@jas0ncn jas0ncn changed the title 关于小程序 sdk.config.json 内不再填入腾讯云密钥的通知 关于小程序 sdk.config.json 内不再自动填入腾讯云密钥的通知 Oct 11, 2018

@jas0ncn jas0ncn closed this Oct 11, 2018

@jas0ncn

This comment has been minimized.

Copy link
Member Author

jas0ncn commented Oct 11, 2018

PHP 环境同理操作

1. 关闭腾讯云代理登录,使用微信小程序 AppID 和 AppSecret 登录:

修改 server/config.php 中的 useQcloudLoginfalse,并填写上 appIdappSecret 字段(分别为微信小程序的 AppID 和 AppSecret),重新部署代码即可。

2. 手动填写腾讯云云 API 密钥:

登录腾讯云云 API 密钥控制台申请云 API 密钥,并在 server/config.php$config 中添加如下三个字段:

    'qcloudAppId' => 1200000000, // 腾讯云 AppID,必须是数字
    'qcloudSecretId' => '你的腾讯云 SecretId',
    'qcloudSecretKey' => '你的腾讯云 SecretKey',
@wsheng0python

This comment has been minimized.

Copy link

wsheng0python commented Nov 10, 2018

使用第二种方法申请云API密钥,问题解决。
使用第一种方法,问题未解决。

@NicoTic

This comment has been minimized.

Copy link

NicoTic commented Nov 11, 2018

使用第一种方法,问题解决。

@crofsun

This comment has been minimized.

Copy link

crofsun commented Nov 13, 2018

采用第二种方法解决了,第一种还是报的参数错误。

@ChrisAtLondon

This comment has been minimized.

Copy link

ChrisAtLondon commented Nov 21, 2018

第一种方法修改完以后记得要重新部署server端代码。

@xrlu0929

This comment has been minimized.

Copy link

xrlu0929 commented Nov 27, 2018

我手残。。combine了两种 好了。。。

@luwy007

This comment has been minimized.

Copy link

luwy007 commented Dec 16, 2018

请问使用新版开发工具,在点击上传代码之后,开发环境的服务就会重新部署吗

@tangyongjing

This comment has been minimized.

Copy link

tangyongjing commented Jan 3, 2019

请问使用新版开发工具,在点击上传代码之后,开发环境的服务就会重新部署吗

同问

@epoll486

This comment has been minimized.

Copy link

epoll486 commented Jan 6, 2019

请问使用新版开发工具,在点击上传代码之后,开发环境的服务就会重新部署吗

同问

image

@limingbaiaixiezuo

This comment has been minimized.

Copy link

limingbaiaixiezuo commented Jan 18, 2019

什么情况???
Error: 响应错误,{"code":-1,"error":"ERR_GET_SESSION_KEY\n{\"code\":5100,\"message\":\"(-1)服务内部错误,请稍后重试或联系客服人员解决。\",\"codeDesc\":\"ResourceOpFailed\"}"} at success (http://127.0.0.1:45531/appservice/vendor/wafer2-client-sdk/lib/login.js:85:38) at Function.function.e.(anonymous function) (http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:546456) at http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:101855 at be (http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:259651) at pt.<anonymous> (http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:390782) at pt.emit (http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:294578) at vi (http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:391290) at http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:391927 at http://127.0.0.1:45531/appservice/__dev__/WAService.js:1:254754 at e (http://127.0.0.1:45531/appservice/appservice?t=1547805571602:1148:2640)

@MKC-Mankii

This comment has been minimized.

Copy link

MKC-Mankii commented Feb 21, 2019

改了这么久,为什么不更新一下官方文档呢?
https://cloud.tencent.com/document/product/619/11447

@wenrenqiang

This comment has been minimized.

Copy link

wenrenqiang commented Feb 24, 2019

@limingbaiaixiezuo 遇到同样问题解决没?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.