微信云托管官网
[图片] 都是这种错误,使用的是lombok注解定义在类上
下面是控制台的输出,请帮忙看看,是什么原因: [2024-07-30 09:36:21] Started by user coding [2024-07-30 09:36:21] Running in Durability level: MAX_SURVIVABILITY [2024-07-30 09:36:22] [Pipeline] Start of Pipeline [2024-07-30 09:36:22] [Pipeline] node [2024-07-30 09:36:22] Running on Jenkins in /root/workspace [2024-07-30 09:36:22] [Pipeline] { [2024-07-30 09:36:22] [Pipeline] stage [2024-07-30 09:36:22] [Pipeline] { (检出 ZIP 包) [2024-07-30 09:36:22] Stage "检出 ZIP 包" skipped due to when conditional [2024-07-30 09:36:22] [Pipeline] } [2024-07-30 09:36:22] [Pipeline] // stage [2024-07-30 09:36:23] [Pipeline] stage [2024-07-30 09:36:23] [Pipeline] { (检出代码仓库) [2024-07-30 09:36:23] [Pipeline] sh [2024-07-30 09:36:23] + git clone ****** . [2024-07-30 09:36:23] Cloning into '.'... [2024-07-30 09:36:25] [Pipeline] sh [2024-07-30 09:36:25] + git checkout master [2024-07-30 09:36:25] Already on 'master' [2024-07-30 09:36:25] Your branch is up-to-date with 'origin/master'. [2024-07-30 09:36:25] [Pipeline] } [2024-07-30 09:36:25] [Pipeline] // stage [2024-07-30 09:36:25] [Pipeline] stage [2024-07-30 09:36:25] [Pipeline] { (构建 Docker 镜像) [2024-07-30 09:36:25] [Pipeline] sh [2024-07-30 09:36:25] + docker login -u ****** -p ****** ccr.ccs.tencentyun.com/tcb-******-tpkg/ca-pbnuehaw_express-9bgg:express-9bgg-027-20240730093618 [2024-07-30 09:36:25] WARNING! Using --password via the CLI is insecure. Use --password-stdin. [2024-07-30 09:36:25] WARNING! Your password will be stored unencrypted in /root/.docker/config.json. [2024-07-30 09:36:25] Configure a credential helper to remove this warning. See [2024-07-30 09:36:25] https://docs.docker.com/engine/reference/commandline/login/#credentials-store [2024-07-30 09:36:25] [2024-07-30 09:36:25] Login Succeeded [2024-07-30 09:36:25] [Pipeline] sh [2024-07-30 09:36:26] + docker build -f ././/Dockerfile -t ccr.ccs.tencentyun.com/tcb-******-tpkg/ca-pbnuehaw_express-9bgg:express-9bgg-027-20240730093618 ./ [2024-07-30 09:36:26] DEPRECATED: The legacy builder is deprecated and will be removed in a future release. [2024-07-30 09:36:26] Install the buildx component to build images with BuildKit: [2024-07-30 09:36:26] https://docs.docker.com/go/buildx/ [2024-07-30 09:36:26] [2024-07-30 09:36:26] Sending build context to Docker daemon 16.68MB [2024-07-30 09:36:26] Step 1/7 : FROM node:20.16.0 [2024-07-30 09:36:27] 20.16.0: Pulling from library/node [2024-07-30 09:36:27] ca4e5d672725: Pulling fs layer [2024-07-30 09:36:27] 30b93c12a9c9: Pulling fs layer [2024-07-30 09:36:27] 10d643a5fa82: Pulling fs layer [2024-07-30 09:36:27] d6dc1019d793: Pulling fs layer [2024-07-30 09:36:27] ea8e6f2ca326: Pulling fs layer [2024-07-30 09:36:27] 19951d6e9461: Pulling fs layer [2024-07-30 09:36:27] 247e8d31d16f: Pulling fs layer [2024-07-30 09:36:27] 282ebe8f0e48: Pulling fs layer [2024-07-30 09:36:27] 282ebe8f0e48: Verifying Checksum [2024-07-30 09:36:27] 282ebe8f0e48: Download complete [2024-07-30 09:36:27] ea8e6f2ca326: Download complete [2024-07-30 09:36:27] 247e8d31d16f: Download complete [2024-07-30 09:36:27] 30b93c12a9c9: Verifying Checksum [2024-07-30 09:36:27] 30b93c12a9c9: Download complete [2024-07-30 09:36:28] 19951d6e9461: Verifying Checksum [2024-07-30 09:36:28] 19951d6e9461: Download complete [2024-07-30 09:36:28] ca4e5d672725: Verifying Checksum [2024-07-30 09:36:28] ca4e5d672725: Download complete [2024-07-30 09:36:28] 10d643a5fa82: Verifying Checksum [2024-07-30 09:36:28] 10d643a5fa82: Download complete [2024-07-30 09:36:29] ca4e5d672725: Pull complete [2024-07-30 09:36:29] 30b93c12a9c9: Pull complete [2024-07-30 09:36:31] 10d643a5fa82: Pull complete [2024-07-30 09:36:43] d6dc1019d793: Verifying Checksum [2024-07-30 09:36:43] d6dc1019d793: Download complete [2024-07-30 09:36:47] d6dc1019d793: Pull complete [2024-07-30 09:36:47] ea8e6f2ca326: Pull complete [2024-07-30 09:36:48] 19951d6e9461: Pull complete [2024-07-30 09:36:48] 247e8d31d16f: Pull complete [2024-07-30 09:36:48] 282ebe8f0e48: Pull complete [2024-07-30 09:36:48] Digest: sha256:1ae9ba874435551280e95c8a8e74adf8a48d72b564bf9dfe4718231f2144c88f [2024-07-30 09:36:48] Status: Downloaded newer image for node:20.16.0 [2024-07-30 09:36:48] ---> 1a8e51cfa7a5 [2024-07-30 09:36:48] Step 2/7 : WORKDIR /usr/src/app [2024-07-30 09:36:48] ---> Running in c2afaa1b6a45 [2024-07-30 09:36:48] Removing intermediate container c2afaa1b6a45 [2024-07-30 09:36:48] ---> 9f4a601b61a6 [2024-07-30 09:36:48] Step 3/7 : COPY package*.json ./ [2024-07-30 09:36:48] ---> a7777461df94 [2024-07-30 09:36:48] Step 4/7 : RUN npm config set registry https://mirrors.tencent.com/npm/ [2024-07-30 09:36:48] ---> Running in 997ca628dc85 [2024-07-30 09:36:49] Removing intermediate container 997ca628dc85 [2024-07-30 09:36:49] ---> 57b46a5b40e1 [2024-07-30 09:36:49] Step 5/7 : RUN npm install [2024-07-30 09:36:49] ---> Running in 35f2c2597552 [2024-07-30 09:46:22] Sending interrupt signal to process [2024-07-30 09:46:22] Aborted by coding [2024-07-30 09:46:23] Sending interrupt signal to process [2024-07-30 09:46:23] Aborted by coding [2024-07-30 09:46:24] Sending interrupt signal to process [2024-07-30 09:46:24] Aborted by coding [2024-07-30 09:46:25] Sending interrupt signal to process [2024-07-30 09:46:25] Aborted by coding [2024-07-30 09:46:26] Terminated [2024-07-30 09:46:26] script returned exit code 143 [2024-07-30 09:46:26] [Pipeline] } [2024-07-30 09:46:26] [Pipeline] // stage [2024-07-30 09:46:26] [Pipeline] stage [2024-07-30 09:46:26] [Pipeline] { (推送 Docker 镜像到 TCR) [2024-07-30 09:46:26] Stage "推送 Docker 镜像到 TCR" skipped due to earlier failure(s) [2024-07-30 09:46:26] [Pipeline] } [2024-07-30 09:46:26] [Pipeline] // stage [2024-07-30 09:46:26] [Pipeline] } [2024-07-30 09:46:26] [Pipeline] // node [2024-07-30 09:46:26] [Pipeline] End of Pipeline [2024-07-30 09:46:26] Finished: ABORTED *** -----------构建express-9bgg-027----------- 2024-07-30 09:36:20 create_build_image : succ,
在容器中调用封装好的SDK包,出现域名访问不了的问题,要怎么替换? cn.binarywang.wx.miniapp.api.WxMaService; /** * 获取access_token. */ String GET_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; /** * The constant JSCODE_TO_SESSION_URL. */ String JSCODE_TO_SESSION_URL = "https://api.weixin.qq.com/sns/jscode2session"; /** * getPaidUnionId */ String GET_PAID_UNION_ID_URL = "https://api.weixin.qq.com/wxa/getpaidunionid"; /** * 导入抽样数据 */ String SET_DYNAMIC_DATA_URL = "https://api.weixin.qq.com/wxa/setdynamicdata"; 出现Caused by: java.net.UnknownHostException: api.weixin.qq.com: Name or service not known报错信息,在不改动容器网络配置的情况下怎么成功访问调用相关接口?
域名为示例域名: Traceback (most recent call last): 07/26 10:48:50 During handling of the above exception, another exception occurred: 07/26 10:48:50 +------------------------------------ 07/26 10:48:50 | requests.exceptions.ConnectionError: HTTPSConnectionPool(host='example.worker.dev', port=443): Max retries exceeded with url: /api/v1/category/index?user_id=0 (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable'))
微信云托管环境,按照微信开放平台更换服务器证书指引,在云托管的容器的/etc/hosts 文件中增加81.69.216.137 api.weixin.qq.com进行验证过程中,发现原本能免token调用的接口,现在报token缺失错误,返回信息如下:{"errcode":41001,"errmsg":"access_token missing rid: 66a1d322-2efb9da3-124de327"},将api.weixin.qq.com域名对应的host改为原来的,就能正常调用,请官方人员核实下此问题
使用腾讯云的互联内网调用,由于不在一个可用区域,延迟超级高
云托管对应的AppID:wxc850737e471a6b0d,资源复用的小程序AppId:wxfaa90cf3aa582e74。 小程序wxfaa90cf3aa582e74请求云托管资源时,提示: "data": { "code": "SERVICE_FORBIDDEN", "message": "Permission denied, code=1 For more information, please refer to https://docs.cloudbase.net/error-code/service", "requestId": "5b6b916f-4952-11ef-b7c9-525400b3ba3c" } 补充: 小程序wxfaa90cf3aa582e74开通云开发,在微信上选择云托管环境的时候,只能看到小程序wxfaa90cf3aa582e74的云托管下的应用ID,看不到云托管wxc850737e471a6b0d下的应用。 这要怎么处理呢? 谢谢!
php部署失败提示指定的入口文件不存在,是dockerfile没编写对吗? 2024-07-22 17:01:08 check_eks_virtual_service : process, DescribeVersion_user_error_Back-off restarting failed container, [service]:[Error: failed to create containerd task: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "index.php": executable file not found in $PATH: unknown,Back-off restarting failed container,] 2024-07-22 17:01:08 create_eks_virtual_service : succ, # 使用官方 PHP 7.3 镜像. # https://hub.docker.com/_/php FROM php:7.3-apache WORKDIR /JoyShopCms # 将本地代码复制到容器内 COPY . ./ # Apache 配置文件内使用 80 端口 RUN sed -i 's/80/80/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf # 将 PHP 配置为开发环境 # 如果您需要配置为生产环境,可以运行以下命令 # RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" # 参考:https://hub.docker.com/_/php#configuration RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" #设置多个入口文件 ENTRYPOINT [ "index.php","api.php","admin.php","wx_notify.php" ]
微信云托管服务器部署应用, 可以收到微信公众号用户发来的消息,但是回复不了用户 [图片]
微信小程序团队你好, 使用 Python在云托管尝试调用微信 API短信发送 data = { "env": 'xxx', "content": '哎哟嘿', "path": '/index.html', "phoneNumberList": ["+8613812345678"], "smsType": "Marketing", "useShortName": True } url = 'http://api.weixin.qq.com/tcb/sendsms' resp = requests.post(url, data=json.dumps(data, ensure_ascii=False).encode('utf-8')) 实际 requests 的 data 为 b'{"env": "xxx", "content": "\xe5\x93\x8e\xe5\x93\x9f\xe5\x98\xbf", "path": "/index.html", "phoneNumberList": ["+8613812345678"], "smsType": "Marketing", "useShortName": true}' 但是报错 200 OK Content-Length: 78 Content-Type: application/json Date: Sun, 21 Jul 2024 22:05:30 GMT Server: Tencent-CloudBase X-Cloudbase-Request-Id: 58204170-47ad-11ef-846c-525400a903d3 X-Cloudbase-Upstream-Status-Code: 200 X-Cloudbase-Upstream-Timecost: 242 X-Cloudbase-Upstream-Type: Tencent-CBR X-Request-Id: 58204170-47ad-11ef-846c-525400a903d3 X-Upstream-Status-Code: 200 X-Upstream-Timecost: 242 { errcode:47001 errmsg:"data format error rid: 669d862a-18bd6106-7587fc42" } x 已经在 云托管-云调用-微信令牌权限增加了 '/tcb/sendsms'测试是在云托管-云端调试进行的HTTP 已经使用 utf-8 对中文 content 编码了env 填写了配置的云开发环境 id, 在小程序内云调用函数没问题,短信也成功扣除。就是在云托管测试出错。 请问具体问题是什么?谢谢!
云托管已经部署spring boot应用,为什么环境管理者进入控制台要先部署才能进入到下图的管理界面 [图片]
https://developers.weixin.qq.com/minigame/dev/wxcloudrun/src/Billing/example.html [图片] 如果实例设置为0,那这样虽然是按需扣费,但是服务器每次都要等有人访问才启动,这样会导致有些人没办法使用。。 而如果设置实例为1,那这样又很贵,24小时都在扣钱。请问这要怎么办?
请问一下云托管部署后端服务服务后的计量收费细节是什么呢,如何看到产生的费用呢?
// 在服务启动时或者页面加载时初始化,注意这是异步的,需要等待完成,可以通过 this.cos 是否存在来判断是否完成。 initcos() /** * 封装的COS-SDK初始化函数,建议在服务启动时挂载全局,通过this.cos使用对象 */ async function initcos() { try { const res = await fetch('https://api.weixin.qq.com/_/cos/getauth', { method: 'GET' }) console.log('res',res); } catch (e) { console.log('COS初始化失败', e) } } [图片] [图片]
[图片]
前期我们是基于微信云托管开发的小程序,现在相应的app开发出来了,使用了腾讯云上的自建服务,想共享同一地区微信云托管上mysql中的数据,可以直接通过数据库内网ip连接云托管上的mysql吗?有没有什么限制?
vscode 本地调试时,自动创建的服务 wxcloud-localdebug-proxy 扣费吗?
我要开发一个小程序,用云托管模式来支付小程序运行所需的云资源。请问下这个是否能和我的腾讯云账号绑定,用我腾讯云账号里的费用来支付小程序的云托管费用。
我要开发一个小程序,用云托管模式来支付小程序运行所需的云资源。请问下这个是否能和我的腾讯云账号绑定,用我腾讯云账号里的费用来支付小程序的云托管费用。
例如,我用sequelize 库处理数据 ?
理解有误;参考了官方的服务模板,koa的示例代码。里面同样使用了 sequelize库 处理数据~
有同样问题的同学,可以参考官方服务模板 https://github.com/WeixinCloud/wxcloudrun-koa/tree/main
自己改改,或者按照技能经验 自行处理。
--------------------------------
刚刚翻看社区文章,看到微信提供了这个sdk,@cloudbase/node-sdk https://developers.weixin.qq.com/community/develop/article/doc/0000e2a4cccbe8b2695bed5d256c13
我觉得,这个可以在官方文档 微信云托管-MYSQL 章节添加以下~ 新手开局直接使用云托管,需要面临如何处理托管数据库的业务数据处理问题,希望官方考虑一下~
这个是构建时要加一个处理器用来识别lombok
gradle是加 annotationProcessor
maven好像是加annotationProcessorPaths
你可以研究一下