mcndt / obsidian-toggl-integration

A Toggl integration plugin for the popular knowledge base application Obsidian.
GNU General Public License v3.0
282 stars 20 forks source link

[Bug] 'Error reaching Toggl API' #84

Closed QuaCKeReD closed 2 years ago

QuaCKeReD commented 2 years ago

Not noticed this before, but am seeing a constant stream of the following errors in dev mode;

plugin:obsidian-toggl-integration:16433 Error reaching Toggl API
eval @ plugin:obsidian-toggl-integration:16433
rejected @ plugin:obsidian-toggl-integration:65
processTicksAndRejections @ node:internal/process/task_queues:96
Promise.then (async)
step @ plugin:obsidian-toggl-integration:66
eval @ plugin:obsidian-toggl-integration:67
__awaiter @ plugin:obsidian-toggl-integration:63
updateCurrentTimer @ plugin:obsidian-toggl-integration:16423
eval @ plugin:obsidian-toggl-integration:16418
plugin:obsidian-toggl-integration:16434 

RequestError: getaddrinfo ENOTFOUND api.track.toggl.com
    at ClientRequest.eval (plugin:obsidian-toggl-integration:12833:111)
    at Object.onceWrapper (node:events:510:26)
    at ClientRequest.emit (node:events:402:35)
    at ClientRequest.origin.emit (plugin:obsidian-toggl-integration:7331:20)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
    at __node_internal_ (node:internal/errors:686:10)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)

I am still seeing Toggle data in Obsidian and, the errors show whether the Toggle pane is in view, or not. Also, whether the setting for real time daily total is enable, or not. However, the settings page fails on Test API Connection... 🤷🏻‍♂️

kquinsland commented 2 years ago

ENOTFOUND is a DNS failure. Not related to this plugin. You have something else wrong on your network / computer.

You should be able to use any DNS lookup tool like dig and get output like so:

me@host:~$ dig +short api.track.toggl.com
34.120.83.142
mcndt commented 2 years ago

I think @kquinsland is right here; there is some issue with your DNS resolution. Here I also have no such errors looking up the DNS record:

$ nslookup api.track.toggl.com
Server:  [...]
Address:  [...]

Non-authoritative answer:
Name:    api.track.toggl.com
Address:  34.120.83.142
mcndt commented 2 years ago

Closing for now. Feel free to reopen if you think there is still a problem with the plugin.