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 connect to GitHub in Ubuntu 18.04 LTS #292

Closed
asitemade4u opened this issue May 11, 2018 · 14 comments
Closed

Unable to connect to GitHub in Ubuntu 18.04 LTS #292

asitemade4u opened this issue May 11, 2018 · 14 comments

Comments

@asitemade4u
Copy link

asitemade4u commented May 11, 2018

Environment info

  • OS: Ubuntu 18.04 LTS
  • App Version Lepton-1.6.2-x86_64.AppImage

Description of the problem / feature request / question:

  • I have a paid Developer account on GitHub. Several Gists (all private) are attached to the account.
  • I have created a .leptonrc file and put it in the user directory. I attach it below.
  • I have created a personal access token with a gists access, but eventually did not use it as the .leptonrc enterprise section does not apply here
  • When I launch Lepton, the GitHub login message is displayed with the barber pole -- I have been able to connect previously
  • but eventually, the message is dismissed with two successive error messages: Check your network condition 04 then the same with error code 00
  • then I come back to the login dialog with the GitHub Login button.
  • If I fill in the email and the GitHub password, the exact same thing happens.
  • It is the same if I fill in the GitHub user name instead of the email.

Also:

  • I tried the same while having the gufw firewall inactivated and it was the same

However, please note that:

  • I could once connect to GitHub through Lepton by launching it from the Terminal
  • The behavior is not consistent though: I just tried again and here is the full transcript I get in the terminal (I replaced by placeholders the token and the user name):
stsinc@M715:~$ '/home/stsinc/LogicielsJava/Lepton-1.6.2-x86_64.AppImage' 
installed: X-AppImage-BuildId=52a2c190-3a21-11a8-368b-ed994581ae1e image: X-AppImage-BuildId=52a2c190-3a21-11a8-368b-ed994581ae1e

(lepton:23054): dconf-WARNING **: 14:58:47.025: Unable to open /home/stsinc/.local/share/flatpak/exports/share/dconf/profile/user: Permission non accordée
info: [conf] Looking for .leptonrc at /home/stsinc/.leptonrc
error: [.leptonrc] Please correct the mistakes in your configuration file: [/home/stsinc/.leptonrc].
Error: Error parsing your configuration file: [/home/stsinc/.leptonrc]: Unexpected token } in JSON at position 150
info: 

----- Lepton v1.6.2 linux-----

info: [conf] Looking for .leptonrc at /home/stsinc/.leptonrc
info: [conf] The resolved configuration is ...
info: "logger": {"level":"debug"}
info: "proxy": {"enable":false,"address":"socks://localhost:1080"}
info: "snippet": {"sorting":"updated_at","sortingReverse":true,"expanded":true,"newSnippetPrivate":false}
info: "editor": {"tabSize":4}
info: "enterprise": {"enable":false,"host":"","token":"","avatarUrl":""}
info: "type": "literal"
debug: -----> registering login-page-ready listener
info: Checking for update
info: Update for version 1.6.2 is not available (latest version: 1.6.2, downgrade is disallowed.
debug: -----> Inside getCachedUserInfo
debug: -----> [true] cachedProfile is <username>
debug: -----> [true] cachedToken is <token>
debug: -----> Inside LoginPage componentWillMount with loggedInUserInfo{"token":"<token>","profile":"<username>","image":"/home/stsinc/.config/Lepton/profile/<username>.png"}
debug: -----> Registering listener for auto-login signal
debug: -----> sending login-page-ready signal
info: [signal] sending auto-login signal
debug: -----> Received "auto-login" signal with loggedInUserInfo {"token":"<token>","profile":"<username>","image":"/home/stsinc/.config/Lepton/profile/<username>.png"}
debug: -----> Inside LoginPage handleContinueButtonClicked with loggedInUserInfo{"token":"<token>","profile":"<username>","image":"/home/stsinc/.config/Lepton/profile/<username>.png"}
debug: -----> Inside launchAuthWindow with token <token>
init: 2697.267ms
debug: -----> calling initUserSession with cached token <token>
debug: -----> Inside initUserSession with access token <token>
info: [Dispatch] updateAccessToken
debug: [REST] Getting user profile with token <token>
debug: -----> from GET_USER_PROFILE with profile {"login":"<username>","id":11460106,"avatar_url":"https://avatars3.githubusercontent.com/u/11460106?v=4","gravatar_id":"","url":"https://api.github.com/users/<username>","html_url":"https://github.com/asitemade4u","followers_url":"https://api.github.com/users/<username>/followers","following_url":"https://api.github.com/users/<username>/following{/other_user}","gists_url":"https://api.github.com/users/<username>/gists{/gist_id}","starred_url":"https://api.github.com/users/<username>/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asitemade4u/subscriptions","organizations_url":"https://api.github.com/users/asitemade4u/orgs","repos_url":"https://api.github.com/users/<username>/repos","events_url":"https://api.github.com/users/<username>/events{/privacy}","received_events_url":"https://api.github.com/users/asitemade4u/received_events","type":"User","site_admin":false,"name":"Stephen Sinclair","company":"<username>","blog":"http://<username>.com","location":"New York, NY","email":null,"hireable":true,"bio":null,"public_repos":0,"public_gists":0,"followers":0,"following":1,"created_at":"2015-03-13T13:15:15Z","updated_at":"2018-05-11T18:34:58Z"}
debug: [REST] [V2] Getting all gists of <username> with token <token>
debug: [REST] [V2] Requesting gists with page 1
error: The request has failed: TypeError: M.err is not a function
debug: -----> Failure with {}
error: The request has failed: 
{}
info: [Dispatch] updateUserSession INACTIVE
info: The app window is closed

`
- I do not understand where the **error in the JSON** file lies. Here is the `.leptonrc` JSON file:
```json
{
    "snippet": {
        "expanded": true,
        "newSnippetPrivate": true,
        "sorting": "updated_at", 
        "sortingReverse": true,
    },
    "editor" : {
        "tabSize": 4,
    },
    "logger": {
        "level": "debug",
    },
    "proxy": {
        "enable": false,
    },
}
`

What am I doing wrong?
Best,
Stephen
@hackjutsu
Copy link
Owner

@asitemade4u Thank you for reporting the bug. Your .leptonrc looks good and Lepton has successfully logged in but failed somewhere when trying to fetch the first gist.

I'll try some digging these days and come back to you soon:)

@hackjutsu
Copy link
Owner

hackjutsu commented May 12, 2018

By the way, does it work for some older version? This might be related to some recent changes.

It looks like the crash comes from this stupid typo logger.err --> logger.error

logger.err(`-----> Failed to cache user info. ${JSON.stringify(e)}`)

@hackjutsu
Copy link
Owner

@asitemade4u Could you have a try for 1.6.3-beta?

@asitemade4u
Copy link
Author

asitemade4u commented May 12, 2018

Hi @hackjutsu , I tried the beta both by clicking on the app and by launching it from the Terminal.
Unfortunately, both yield the same result as the previous version. Same errors.
BTW, my .leptonrc is still declared in error.

@hackjutsu
Copy link
Owner

hackjutsu commented May 12, 2018

@asitemade4u Maybe the JSON parser expects no comma for the last object field.

{
  "snippet": {
    "expanded": true,
    "newSnippetPrivate": true,
    "sorting": "updated_at",
    "sortingReverse": true
  },
  "editor": {
    "tabSize": 4
  },
  "logger": {
    "level": "debug"
  },
  "proxy": {
    "enable": false
  }
}

By the way, does some older Lepton version work for me?

@asitemade4u
Copy link
Author

asitemade4u commented May 12, 2018 via email

@asitemade4u
Copy link
Author

No, the flatpak note was not related to Lepton.
The good news is that it works now, with the beta version: the correction of the .leptonrc file has fixed the issue, as it seems.
If any issue occurs in the next few days (I will be testing it thoroughly), I will let you know.
A BIG thank you @hackjutsu !!

@asitemade4u
Copy link
Author

asitemade4u commented May 12, 2018

OK, more info.
It works when I launch the appimage from the terminal.
It does not work when I double click on the AppImage application file.
I attach the output when launched from the terminal (and working fine).
terminal_output.txt

@asitemade4u
Copy link
Author

Well, sorry to bring bad news. I closed the Terminal, cleaned the browser cache (just to be sure), and tried to open Lepton from the Terminal again.
It did not work, and I attach the full output.
20180512 Terminal Output.txt

Hope this helps!

@hackjutsu
Copy link
Owner

hackjutsu commented May 12, 2018

@asitemade4u Interesting logs. I'll take a look.


Just checked on Ubuntu 18.04 LTS, failed to reproduce the issue.

jietu20180513-204235 2x


@asitemade4u Updated to 1.6.3-beta.1. Hope this fix will work. 4e58fb0

@hackjutsu
Copy link
Owner

hackjutsu commented May 16, 2018

@asitemade4u Does 1.6.3-beta.1 works for you?

@asitemade4u
Copy link
Author

asitemade4u commented May 16, 2018

I re-downloaded the alpha today and launched it from the Terminal.
It seems to be working fine.
It is also working when launched directly.
I will let you know in I encounter any other issue in the next few days.
THANKS!

@cosmo1024
Copy link

cosmo1024 commented May 16, 2018 via email

@asitemade4u
Copy link
Author

asitemade4u commented May 16, 2018 via email

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

No branches or pull requests

3 participants