NodeMCU,Lua http.get()" Disconnected with error 8" - 什么是错误8? [英] NodeMCU, Lua http.get() "Disconnected with error 8" - what is error 8?

查看:229
本文介绍了NodeMCU,Lua http.get()" Disconnected with error 8" - 什么是错误8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用http.get(url,header,function)从Firebase获取数据。

Im trying to use http.get(url, headers, function) to get data from Firebase.

Othersites(也是https网站)工作正常,我得到了我希望回应,但firebase给了我一个错误8.

Othersites (also https sites) work fine and i get the response i expect, but firebase gives me a error 8.

我找不到任何关于此错误的文档(或任何错误) - 有谁知道这意味着什么?

I cant find any documentation of this error (or any errors) - does anyone know what it means?

http.get("https://<my-firebaseID>.com/somefile.json", "", function(code, data)
    if (code < 0) then
      print("HTTP request failed")
    else
      print(code, data)
    end
  end)


NodeMCU custom build by frightanic.com
    branch: master
    commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0
    SSL: true
    modules: adc,bit,cjson,file,gpio,http,i2c,net,node,pwm,spi,struct,tmr,uart,websocket,wifi,wps,tls
 build  built on: 2017-02-23 10:24
 powered by Lua 5.1.4 on SDK 2.0.0(656edbf)



HTTP client: Disconnected with error: 8
HTTP client: Connection timeout
HTTP client: Connection timeout

谢谢

推荐答案

我可以提供正确但仍然不满意的答案 - 这是一个已知问题,请参阅 https://github.com/nodemcu/nodemcu-firmware/issues/1707 。如果您构建启用了调试的固件,您可能会看到类似于该问题中报告的消息。

I can provide a correct but still dissatisfactory answer - it's a known issue, see https://github.com/nodemcu/nodemcu-firmware/issues/1707. If you build a firmware with debug enabled you'll likely see messages similar to the one reported in that issue.

这篇关于NodeMCU,Lua http.get()&quot; Disconnected with error 8&quot; - 什么是错误8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆