request 合法域名校验出错,不在以下 request 合法域名列表中解决方法。

出错提示:

a1ba4cc729688aa78df691089ebea7ed.jpg

方案一: 打开项目之后,打开【详情】,把【不校验合法域名、web-view(业务域名)、TLS 版本以及 HTTPS 证书】勾上。

f62c8da8fab2c1c05b20a0dcae5e2a54.png

方案一说的是在开发阶段的临时解决方法

方案二适用于上线上面: 方案二:登录小程序管理平台,设置->开发设置->域名设置->添加域名

c2d683262e2f98d5c0707bf4fe05a1d4.png

添加域名:

28c6fad49b310e26c96a5244b6f00e0e.png

必须是https协议。

总是出现Exiting on user cancel,导致不能正常安装。

这是yum的一个bug导致的问题。修改/usr/lib/python2.7/site-packages/urlgrabber/grabber.py

vi /usr/lib/python2.7/site-packages/urlgrabber/grabber.py
1510             elif errcode == 42:
1511                 # this is probably wrong but ultimately this is what happens
1512                 # we have a legit http code and a pycurl 'writer failed' code
1513                 # which almost always means something aborted it from outside
1514                 # since we cannot know what it is -I'm banking on it being
1515                 # a ctrl-c. XXXX - if there's a way of going back two raises to
1516                 # figure out what aborted the pycurl process FIXME
1517                 raise KeyboardInterrupt

修改后:

1510             #elif errcode == 42:
1511                 # this is probably wrong but ultimately this is what happens
1512                 # we have a legit http code and a pycurl 'writer failed' code
1513                 # which almost always means something aborted it from outside
1514                 # since we cannot know what it is -I'm banking on it being
1515                 # a ctrl-c. XXXX - if there's a way of going back two raises to
1516                 # figure out what aborted the pycurl process FIXME
1517             #    raise KeyboardInterrupt

然后以root用户运行如下命令升级:

yum clean metadata
yum clean all
yum upgrade

升级完成后运行yum命令安装即可。