{"action":"created","issue":{"url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/329","repository_url":"https://api.github.com/repos/StackExchange/dnscontrol","labels_url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/329/comments","events_url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/329/events","html_url":"https://github.com/StackExchange/dnscontrol/issues/329","id":302754431,"number":329,"title":"panic: runtime error: invalid memory address or nil pointer dereference","user":{"login":"domelu","id":4022264,"avatar_url":"https://avatars2.githubusercontent.com/u/4022264?v=4","gravatar_id":"","url":"https://api.github.com/users/domelu","html_url":"https://github.com/domelu","followers_url":"https://api.github.com/users/domelu/followers","following_url":"https://api.github.com/users/domelu/following{/other_user}","gists_url":"https://api.github.com/users/domelu/gists{/gist_id}","starred_url":"https://api.github.com/users/domelu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domelu/subscriptions","organizations_url":"https://api.github.com/users/domelu/orgs","repos_url":"https://api.github.com/users/domelu/repos","events_url":"https://api.github.com/users/domelu/events{/privacy}","received_events_url":"https://api.github.com/users/domelu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-06T15:48:20Z","updated_at":"2018-03-07T14:22:45Z","closed_at":null,"author_association":"NONE","body":"## JS\r\nvar registrar = NewRegistrar('none', 'NONE');\r\nvar DNS_R53 = NewDnsProvider(\"r53\", \"ROUTE53\");\r\n\r\nD('example.com', registrar, DnsProvider(DNS_R53),\r\nIGNORE('test')\r\n)\r\n\r\n## GO version\r\nBinary from https://github.com/StackExchange/dnscontrol/releases/download/v0.2.5/dnscontrol-Linux\r\n\r\n## python -m json.tool creds.json\r\n{\r\n    \"bind\": {},\r\n    \"bind_internal\": {},\r\n    \"r53\": {\r\n        \"KeyId\": \"xxx\",\r\n        \"SecretKey\": \"xxx\"\r\n    }\r\n}\r\n\r\n## Route53 zone type\r\npublic\r\n\r\n## Comments\r\ntest.example.com = \"Traffic policy record\" (CNAME)\r\n\r\n## CLI\r\ndnscontrol-Linux preview -creds creds.json --js example.com.js\r\n\r\n## Result\r\nInitialized 1 registrars and 1 dns service providers.\r\n******************** Domain: example.com\r\n----- Getting nameservers from: r53\r\n----- DNS Provider: r53...panic: runtime error: invalid memory address or nil pointer dereference\r\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xabb265]\r\n\r\ngoroutine 1 [running]:\r\ngithub.com/StackExchange/dnscontrol/providers/route53.(*route53Provider).GetDomainCorrections(0xc4203ea360, 0xc42009a080, 0xc4204a2fea, 0x3, 0xc420282748, 0x1, 0x0)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/providers/route53/route53Provider.go:168 +0x275\r\ngithub.com/StackExchange/dnscontrol/commands.run(0x7ffdb322d89b, 0x19, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffdb322d88b, 0xa, 0x0, ...)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/commands/previewPush.go:133 +0x5f1\r\ngithub.com/StackExchange/dnscontrol/commands.Preview(0x7ffdb322d89b, 0x19, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7ffdb322d88b, 0xa, 0x0, ...)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/commands/previewPush.go:80 +0x74\r\ngithub.com/StackExchange/dnscontrol/commands.glob..func3.1(0xc420084dc0, 0x100, 0xc420084dc0)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/commands/previewPush.go:24 +0x4e\r\ngithub.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli.HandleAction(0xbf53c0, 0xc420045f30, 0xc420084dc0, 0xc420011800, 0x0)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli/app.go:490 +0xd2\r\ngithub.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli.Command.Run(0xd88148, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xdabb04, 0x4e, 0x0, ...)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli/command.go:210 +0xa95\r\ngithub.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli.(*App).Run(0xc4201c5860, 0xc4200100c0, 0x6, 0x6, 0x0, 0x0)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/vendor/github.com/urfave/cli/app.go:255 +0x6f8\r\ngithub.com/StackExchange/dnscontrol/commands.Run(0xc42006a600, 0x57, 0xb39812)\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/commands/commands.go:49 +0x18a\r\nmain.main()\r\n\t/home/tlimoncelli/src/github.com/StackExchange/dnscontrol/main.go:18 +0x34"},"comment":{"url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/comments/371153323","html_url":"https://github.com/StackExchange/dnscontrol/issues/329#issuecomment-371153323","issue_url":"https://api.github.com/repos/StackExchange/dnscontrol/issues/329","id":371153323,"user":{"login":"tlimoncelli","id":6293917,"avatar_url":"https://avatars3.githubusercontent.com/u/6293917?v=4","gravatar_id":"","url":"https://api.github.com/users/tlimoncelli","html_url":"https://github.com/tlimoncelli","followers_url":"https://api.github.com/users/tlimoncelli/followers","following_url":"https://api.github.com/users/tlimoncelli/following{/other_user}","gists_url":"https://api.github.com/users/tlimoncelli/gists{/gist_id}","starred_url":"https://api.github.com/users/tlimoncelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlimoncelli/subscriptions","organizations_url":"https://api.github.com/users/tlimoncelli/orgs","repos_url":"https://api.github.com/users/tlimoncelli/repos","events_url":"https://api.github.com/users/tlimoncelli/events{/privacy}","received_events_url":"https://api.github.com/users/tlimoncelli/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T14:22:45Z","updated_at":"2018-03-07T14:22:45Z","author_association":"CONTRIBUTOR","body":"sadly I don't know enough about AWS to know what a traffic flow policy record is :-(.  If you walk me through setting that up, that'd be great. However, I think I see the problem.\r\n\r\nThanks to your most recent panic output, it looks like the problem is with *set.TTL.  Could you add this debug statement?\r\n\r\n```\r\n$ git diff\r\ndiff --git a/providers/route53/route53Provider.go b/providers/route53/route53Provider.go\r\nindex b7b386d..5c87cd4 100644\r\n--- a/providers/route53/route53Provider.go\r\n+++ b/providers/route53/route53Provider.go\r\n@@ -293,6 +293,7 @@ func nativeToRecords(set *r53.ResourceRecordSet, origin string) []*models.Record\r\n                        case \"SOA\":\r\n                                continue\r\n                        default:\r\n+                               fmt.Printf(\"DEBUG: TTL=%v\\n\", set.TTL)\r\n                                rc := &models.RecordConfig{TTL: uint32(*set.TTL)}\r\n                                rc.SetLabelFromFQDN(unescape(set.Name), origin)\r\n                                if err := rc.PopulateFromString(*set.Type, *rec.Value, origin); err != nil {\r\n```\r\n"}}
{"actor":{"display_login":"tlimoncelli"}}