Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add twitter data source #57

Open
pfrcks opened this issue May 9, 2020 · 2 comments
Open

Unable to add twitter data source #57

pfrcks opened this issue May 9, 2020 · 2 comments

Comments

@pfrcks
Copy link

pfrcks commented May 9, 2020

Currently on go 1.13.5

root@778c41ca01ec:~/timeliner/cmd/timeliner# ./timeliner add-account twitter/pfrcks                  
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7c363f]

goroutine 1 [running]:
github.com/mholt/timeliner.authorizeWithOAuth2(0xb24986, 0x7, 0x0, 0x0, 0x0, 0x80, 0xa9a0c0, 0xc000130f01, 0xc0000f6e00, 0xc000130f70)
        /root/timeliner/oauth2.go:57 +0x5f
github.com/mholt/timeliner.DataSource.authFunc.func1(0x7ffcf4a2cee9, 0x6, 0xb246df, 0x7, 0xb24986, 0x7, 0x0)
        /root/timeliner/datasource.go:116 +0x5e
github.com/mholt/timeliner.(*Timeline).Authenticate(0xc0001e77c0, 0x7ffcf4a2cee1, 0x7, 0x7ffcf4a2cee9, 0x6, 0x0, 0xc0001e77e0)
        /root/timeliner/account.go:79 +0x582
github.com/mholt/timeliner.(*Timeline).AddAccount(0xc0001e77c0, 0x7ffcf4a2cee1, 0x7, 0x7ffcf4a2cee9, 0x6, 0x1, 0x0)
        /root/timeliner/account.go:63 +0x2e5
main.main()
        /root/timeliner/cmd/timeliner/main.go:94 +0x554
root@778c41ca01ec:~/timeliner/cmd/timeliner# 
@mholt
Copy link
Owner

mholt commented May 14, 2020

Huh, weird -- I've never encountered that. Top of stack is:

src, err := OAuth2AppSource(oc.ProviderID, oc.Scopes)

Do you have a chance to dig in a little more as to why? I'm afraid I won't have time to work on it for a while :(

@gabriel-samfira
Copy link

gabriel-samfira commented Mar 8, 2021

This seems to be caused by the fact that OAuth2AppSource() is never set by loadConfig() in main.go. In the absence of a config file, loadConfig() returns nil.

LE: This happens if you omit to specify a config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants