真机调试wx.request失败,无响应?

小程序 文章 2022-02-28 15:00 2196 0 全屏看文

AI助手支持GPT4.0

真机调试wx.request失败,无响应?Real machine debugging wx.request failed, no response?

真机调试wx.request失败,无响应?

1、已在小程序后台配置好了服务器域名。

2、服务器域名已经部署SSL证书。且SSL证书是443端口,且TLS目前是1.3,且域名已经ICP备案可查。

用postman和浏览器可访问https://xx.com/apixx/xx,全都正常。传参及返回都正常,在微信小程序开发工具内的模拟器内也一切正常,所有接口、数据、流程全都没问题。

现在开发工具内一切正常,在开发工具内把“不校验域名、SSL、TLS”的勾去掉,也没有问题。

3、只有一点特殊,服务器域名是裸域名。一般是https://www.xx.com,目前这个是https://xx.com


现在开发工具内一切正常,在开发工具内把“不校验域名、SSL、TLS”的勾去掉,也没有问题。

但目前使用真机调试、以及预览,wx.request无响应!!

目前用到了百度地图的接口,把百度地图的接口域名放到小程序后台的服务器域名,在真机调试下是可以调用。

目前怀疑是SSL证书,或者裸域名会不会有什么影响???请问哪位大神帮忙看看。另外有没有用过裸域名的朋友??裸域名有影响吗?

1. The server domain name has been configured in the applet background. 2. The server domain name has already deployed SSL certificate. The SSL certificate is port 443, the TLS is currently 1.3, and the domain name has been recorded in ICP. Accessible with postman and browser https://xx.com/apixx/xx , all normal. The transmission, participation and return are normal, and everything is normal in the simulator in the wechat applet development tool. All interfaces, data and processes are OK. Now everything is normal in the development tool. There is no problem removing the check box of "do not verify domain name, SSL and TLS" in the development tool. 3. There is only one special point. The server domain name is a bare domain name. Generally https://www.xx.com , this is https://xx.com Now everything is normal in the development tool. There is no problem removing the check box of "do not verify domain name, SSL and TLS" in the development tool. But at present, real machine debugging and preview are used, Wx No response to request!! At present, the interface of Baidu map is used. Put the interface domain name of Baidu map into the server domain name in the background of the applet, which can be called under real machine debugging. At present, it is suspected that SSL certificate or bare domain name will have any impact??? May I ask which God can help you. Have you ever used another domain name?? Does the naked domain name have an impact?

回答:

VBit:

真机调试,连电脑,wx.request 有错误返回吗

熊勇_Mass(承接软件项目):真机调试,连电脑,电脑端出现联调界面,但电脑端也是无返回。
VBit:network 请求发出去来吗
熊勇_Mass(承接软件项目):发出去了。我发一个视频吧,看能不能上传。
圣殿骑士:

勾选这个后,也不能调吗?

若认为该回答有用,给回答者点个[ 有用 ],让答案帮助更多的人

熊勇_Mass(承接软件项目):勾选 之后也不能调,就很奇怪,并且是两个开发人员两台不同的电脑都试过了。感谢回复
熊勇_Mass(承接软件项目):同一个微信小程序开发工具下,别的微信小程序项目都没问题的。
微喵网络:

互联网基础知识:xx.com和www.xx.com不是同一个域名

熊勇_Mass(承接软件项目):这个当然知道。目前小程序后台服务器域名配置的就是https://xx.com。小程序wx.request请求的也是https://xx.com。不可能犯这种低级错误。且在开发工具里是可以正常访问的,postman也可以。感谢回复

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
小程序授权获取的手机号,不是当前用户使用的手机号
做了一个图片放大预览的小段代码,一直提示Object。是怎么回事?
微信认证不通过,怎么用?
关于4.8公众号头像违规问题?希望社区老师帮忙处理
公众号发出来标题变成了网址,图片也变成了链接图标,点进去内容没变?
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8062
问题? 7288
如何快速搭建抽奖助手小程序(无需代码知识) 5071
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6026
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5639
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5230
如何解决渲染层网络错误Failed to load media? 16581
小程序找号找回 释放昵称? 2437
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 2518
删除部分微信用户个人数据的通知,怎么删除? 5567