core icon indicating copy to clipboard operation
core copied to clipboard

Saving programs no longer works?

Open CyberShadow opened this issue 8 years ago • 11 comments

  1. Clicking "Run" no longer copies the code to the address bar (at least, I think it used to do that?)
  2. Typing in a program and clicking "Shorten" has no effect.

CyberShadow avatar Sep 09 '17 23:09 CyberShadow

  1. "Run" never did that, AFAIR
  2. "Shorten" should work, let me take a look...

PetarKirov avatar Sep 10 '17 07:09 PetarKirov

We're using https://is.gd/ for URL shortening. The chrome dev tools report a network related issue:

std.exception.ErrnoException@../../../.dub/packages/vibe-d-0.8.0/vibe-d/core/vibe/core/drivers/libevent2.d(322): Failed to connect to [2400:cb00:2048:1:0:0:681f:eac]:443 (Network is unreachable)
??:? [0x8c4d4e]
??:? [0x8ca332]
exception.d:586 [0x6f9ddb]
utils.d:59 [0x73bb66]
libevent2.d:322 [0x727221]
net.d:129 [0x75a526]
client.d:609 [0x63da14]
client.d:527 [0x63b5b4]
client.d:499 [0x638c84]
client.d:101 [0x6382d0]
client.d:77 [0x637d1b]
apiv1.d:119 [0x409d79]
rest.d:1135 [0x4b6d76]
rest.d:1135 [0x4b62a2]
router.d:212 [0x64b79e]
router.d:620 [0x64ec7c]
router.d:553 [0x64b445]
router.d:205 [0x64b183]
server.d:2043 [0x659bfc]
server.d:1791 [0x657859]
server.d:1783 [0x656b89]
server.d:1657 [0x656624]
libevent2_tcp.d:618 [0x7350ee]
core.d:632 [0x4e054d]
core.d:1269 [0x7180e4]
??:? [0x8c7ef8]"

PetarKirov avatar Sep 10 '17 10:09 PetarKirov

Not sure if it's the same issue, but this seems to be the case again. Clicking shorten does nothing.

schveiguy avatar Jul 30 '18 13:07 schveiguy

Hmm, the exception in the HTTP log is:

object.Exception@../../../.dub/packages/vibe-core-1.4.1/vibe-core/source/vibe/core/net.d(72)
 Failed to lookup host 'is.gd'.
----------------
??:? [0x89aa9e]
??:? [0x8ba7aa]
??:? [0x8a62bd]
exception.d:516 [0x46a5c4]
exception.d:436 [0x418d35]
net.d:72 [0x7237e6]
net.d:32 [0x723231]
client.d:622 [0x6356ff]
client.d:537 [0x63367e]
client.d:509 [0x63118c]
client.d:103 [0x630931]
client.d:77 [0x6305d2]
apiv1.d:124 [0x407191]
rest.d:1502 [0x4c8389]
rest.d:1502 [0x4c7787]
router.d:218 [0x6478ea]
router.d:674 [0x64a291]
router.d:607 [0x647636]
router.d:211 [0x647434]
server.d:2247 [0x64fe76]
server.d:241 [0x64e271]
server.d:233 [0x64db73]
server.d:2006 [0x658b44]
task.d:559 [0x736094]
task.d:577 [0x733bc1]
task.d:388 [0x7335a4]
??:? [0x89d661]

I already tried restarting the Docker images, but that doesn't seem to work. Network resolution seems to work fine on the host machine itself.

wilzbach avatar Jul 30 '18 13:07 wilzbach

The only PR that we merged within the last days was an update of the release compiler :O https://github.com/dlang-tour/core/pull/686

wilzbach avatar Jul 30 '18 14:07 wilzbach

~~Perhaps the tour is being throttled or blocked by is.gd?~~

Disregard that, the error clearly indicates an issue with DNS resolution.

I'd suggest to check the configuration of the system it's running on, and add more failover DNS resolvers.

CyberShadow avatar Jul 30 '18 14:07 CyberShadow

Perhaps the tour is being throttled or blocked by is.gd?

No I can reach them fine from the host (same IP) and even when ssh-ing into the Docker image. Also, the "Export to Gist" button doesn't work either and yields a similar hostname resolution error to api.github.com, so it looks more something that's wrong with Vibe.d :/

wilzbach avatar Jul 30 '18 14:07 wilzbach

How does it do name resolution, does it use libc or implement it manually?

CyberShadow avatar Jul 30 '18 14:07 CyberShadow

Manually: https://github.com/vibe-d/eventcore/blob/abdbc91c4bf1159eaed125ad7c7a5a7e613aa8e1/source/eventcore/drivers/posix/dns.d#L60

I opened another PR to deploy the vibe.d version of libevent (https://github.com/dlang-tour/core/pull/710), but if that doesn't work I'm out of ideas.

wilzbach avatar Jul 30 '18 14:07 wilzbach

So switching back to libevent worked, but I'm not sure how to report the issue because I can't reproduce the error locally (hell - I can't even build the release binary locally!).

wilzbach avatar Jul 30 '18 15:07 wilzbach

Hm... looks to me like it's using libc getaddrinfo: https://github.com/vibe-d/eventcore/blob/abdbc91c4bf1159eaed125ad7c7a5a7e613aa8e1/source/eventcore/drivers/posix/dns.d#L89

schveiguy avatar Jul 30 '18 15:07 schveiguy